Activity Profile Resource
Manages cross-learner state for an activity.
createActivityProfile
Creates or merges into an activity profile document by the activity identifier and activity profile identifier.
const activityId: string = "https://example.com/activities/test-activity";
const profileId: string = activityId + "/profiles/myProfileId";
const profile: DocumentJson = {
myKey: "myValue"
};
xapi.createActivityProfile({
activityId: activityId,
profileId: profileId,
profile: profile
});
The URI of the activity profile to be created or merged into.
The profile data to be stored.
The ETag of the original document if merging.
The ETag header type. Accepts "If-Match" or "If-None-Match".
This method returns an AxiosPromise with empty success data if successful.
setActivityProfile
Creates or overwrites an activity profile document by the activity identifier and activity profile identifier.
The URI of the activity profile to be created or overwritten.
The profile data to be stored.
The ETag of the original document.
The ETag header type. Accepts "If-Match" or "If-None-Match".
The content type of the profile data.
This method returns an AxiosPromise with empty success data if successful.
getActivityProfiles
Gets an array of activity profile identifiers by the activity identifier.
Only return Activity Profiles stored since specified Timestamp.
This method returns an AxiosPromise with the success data containing an array of activity profile identifiers if successful.
getActivityProfile
Gets an activity profile document by the activity identifier and the activity profile identifier.
The URI of the profile to be retrieved.
This method returns an AxiosPromise with the success data containing the stored Document if successful.
deleteActivityProfile
Deletes an activity profile document by the activity identifier and the activity profile identifier.
The URI of the profile to be deleted.
The ETag of the original document.
This method returns an AxiosPromise with empty success data if successful.