xAPI HTTP Interfaces

RESTful HTTP API

The VisCa MUST include the two header and HTTP Basic Authentication in every response.

Endpoint:http://www.visualcatch.org/visca/TCAPI/

Header

  • X-Experience-API-Version:1.0.1
  • Content-Type:application/json

HTTP Basic Authentication

  • Username
  • Password

Records API

Statement API

PUT a Statement

Stores Statement with the given id.

Endpoint:http://www.visualcatch.org/visca/TCAPI/statements

Parameter Property Description Required
statementId String Id of Statement to record Required
Request body your statement Required

POST Statements

Stores a Statement, or a set of Statements. Since the PUT method targets a specific Statement id, POST must be used rather than PUT to save multiple Statements, or to save one Statement without first generating a Statement id.

Endpoint:http://www.visualcatch.org/visca/TCAPI/statements

Parameter Property Description Required
Request body your statement Required

GET Statements

This method may be called to fetch a single Statement or multiple Statements. If the statementId or voidedStatementId parameter is specified a single Statement is returned.

Endpoint:http://www.visualcatch.org/visca/TCAPI/statements

Parameter Property Default Description Required
statementId String ID of Statement to fetch Optional
voidedStatementId String ID of voided Statement to fetch Optional
agent Agent or Identified Group Object (JSON) Filter, only return Statements for which the specified Agent or group is the Actor or Object of the Statement. Optional
verb Verb id (IRI) Filter, only return Statements matching the specified verb id. Optional
activity Activity id (IRI) Filter, only return Statements for which the Object of the Statement is an Activity with the specified id. Optional
registration UUID Filter, only return Statements matching the specified registration id. Note that although frequently a unique registration id will be used for one Actor assigned to one Activity, this should not be assumed. If only Statements for a certain Actor or Activity should be returned, those parameters should also be specified. Optional
related_activities Boolean False Apply the Activity filter broadly. Include Statements for which the Object, any of the context Activities, or any of those properties in a contained Sub-Statement match the Activity parameter, instead of that parameter's normal behavior. Matching is defined in the same way it is for the 'activity' parameter. Optional
related_agents Boolean False Apply the Agent filter broadly. Include Statements for which the Actor, Object, Authority, Instructor, Team, or any of these properties in a contained Sub-Statement match the Agent parameter, instead of that parameter's normal behavior. Matching is defined in the same way it is for the 'agent' parameter. Optional
since Timestamp Only Statements stored since the specified timestamp (exclusive) are returned. Optional
until Timestamp Only Statements stored at or before the specified timestamp are returned. Optional
limit Nonnegative Integer 0 Maximum number of Statements to return. 0 indicates return the maximum the server will allow. Optional
format String: ("ids", "exact", or "canonical") exact

If "ids", only include minimum information necessary in Agent, Activity, and Group Objects to identify them. For anonymous groups this means including the minimum information needed to identify each member.

If "exact", return Agent, Activity, and Group Objects populated exactly as they were when the Statement was received. An LRS requesting Statements for the purpose of importing them would use a format of "exact".

If "canonical", return Activity Objects populated with the canonical definition of the Activity Objects as determined by the LRS, after applying the language filtering process defined below, and return the original Agent Objects as in "exact" mode.

Canonical Language Process: Activity Objects contain Language Map Objects for name and description. Only one language should be returned in each of these maps.

In the event of format being 「canonical」, only one language should be returned in each of these maps. In order to choose the most relevant language, the LRS will apply the Accept-Language header as described in RFC 2616 (HTTP 1.1), except that this logic will be applied to each language map individually to select which language entry to include, rather than to the resource (list of Statements) as a whole.

Optional
attachments Boolean False If true, the LRS uses the multipart response format and includes all attachments as described previously. If false, the LRS sends the prescribed response with Content-Type application/json and cannot use attachments. Optional
ascending Boolean False If true, return results in ascending order of stored time Optional

Document API

The three Document APIs provide document storage for learning activity providers and Agents. The details of each API are found in the following sections, and the information in this section applies to all three APIs.

State API

Generally, this is a scratch area for Activity Providers that do not have their own internal storage, or need to persist state across devices.

Single Document GET | DELETE

Endpoint:http://www.visualcatch.org/visca/TCAPI/activities/state

Parameter Property Description Required
activityId String The Activity id associated with this state. Required
agent JSON The Agent associated with this state. Required
stateId String The id for this state, within the given context. Required
registration UUID The registration id associated with this state. Optional

Single Document PUT | POST

Endpoint:http://www.visualcatch.org/visca/TCAPI/activities/state

Parameter Property Description Required
activityId String The Activity id associated with this state. Required
agent JSON The Agent associated with this state. Required
stateId String The id for this state, within the given context. Required
registration UUID The registration id associated with this state. Optional
Request body Your state document. Required

Multiple Document GET

Endpoint:http://www.visualcatch.org/visca/TCAPI/activities/state

Parameter Property Description Required
activityId String The Activity id associated with these states. Required
agent JSON The Agent associated with these states. Required
since Timestamp Only ids of states stored since the specified timestamp (exclusive) are returned. Optional
registration UUID The registration id associated with these states. Optional

Multiple Document DELETE

Endpoint:http://www.visualcatch.org/visca/TCAPI/activities/state

Parameter Property Description Required
activityId String The Activity id associated with this state. Required
agent JSON The Agent associated with this state. Required
registration UUID The registration id associated with this state. Optional

Agent Profile API

The Agent Profile API is much like the State API, allowing for arbitrary key / document pairs to be saved which are related to an Agent.

Combined Information GET

Endpoint:http://www.visualcatch.org/visca/TCAPI/agents

Parameter Property Description Required
agent Object (JSON) The Agent representation to use in fetching expanded Agent information. Required

Single Agent or Profile GET | DELETE

Endpoint:http://www.visualcatch.org/visca/TCAPI/agents/profile

Parameter Property Description Required
agent Object (JSON) The Agent associated with this profile. Required
profileId String The profile id associated with this profile. Required

Single Agent or Profile PUT | POST

Endpoint:http://www.visualcatch.org/visca/TCAPI/agents/profile

Parameter Property Description Required
agent Object (JSON) The Agent associated with this profile. Required
profileId String The profile id associated with this profile. Required
Request body Your Agent or Profile document.

Multiple Agent or Profile GET

Endpoint:http://www.visualcatch.org/visca/TCAPI/agents/profile

Parameter Property Description Required
agent Object (JSON) The Agent associated with this profile. Required
since Timestamp Only ids of profiles stored since the specified timestamp (exclusive) are returned. Optional

Activity Profile API

The Activity Profile API is much like the State API, allowing for arbitrary key / document pairs to be saved which are related to an Activity.

Full Activity Object GET

Endpoint:http://www.visualcatch.org/visca/TCAPI/activities

Parameter Property Description Required
activityId String The id associated with the Activities to load. Required

Single Document GET | DELETE

Endpoint:http://www.visualcatch.org/visca/TCAPI/activities/profile

Parameter Property Description Required
activityId String The Activity id associated with this profile. Required
profileId String The profile id associated with this profile. Required

Single Document PUT | POST

Endpoint:http://www.visualcatch.org/visca/TCAPI/activities/profile

Parameter Property Description Required
activityId String The Activity id associated with this profile. Required
profileId String The profile id associated with this profile. Required
Request body Your activity profile document. Required

Multiple Document GET

Endpoint:http://www.visualcatch.org/visca/TCAPI/activities/profile

Parameter Property Description Required
activityId String The Activity id associated with these profiles. Required
since Timestamp Only ids of profiles stored since the specified timestamp (exclusive) are returned. Optional

results matching ""

    No results matching ""