Clear API Reference
  • Developer Reference
  • Getting Started
    • Authentication
    • Content Launch
    • Single Sign-On
  • Guides
    • Account Provisioning and Launch
  • Experience API Reference
    • Statements
    • State
    • Activity Profile
    • Agent Profile
  • Clear API Reference
    • Introduction
    • Data Model
      • Actor
      • Criteria
    • Authentication
    • Actors
    • Reports
    • Leaderboards
    • Search
    • Notifications
    • Import
Powered by GitBook
On this page
  • List State
  • Retrieve State
  • Update State
  • Merge State
  • Remove State
  1. Experience API Reference

State

List State

GET https://{organisation}.clearlrs.com/xapi/activities/state

Returns a list of stateIds stored for the specified parameters.

Query Parameters

Name
Type
Description

activityId

string

1

agent

object

2

registration

string

3

Retrieve State

GET https://{organisation}.clearlrs.com/xapi/activities/state

Retrieves the state document

Query Parameters

Name
Type
Description

activityId

string

1

agent

object

2

stateId

string

3

registration

string

4

Update State

PUT https://{organisation}.clearlrs.com/xapi/activities/state

Replaces the state document for the given agent, activityId and stateId.

Query Parameters

Name
Type
Description

activityId

string

1

agent

object

2

stateId

string

3

registration

string

4

{
    "code": 400,
    "name": "Bad Request",
    "body": [
        {
            "name": "ValidationError",
            "description": "'query' must contain property  'activityId'",
            "property": "query",
            "value": {
                "document": ""
            }
        },
        {
            "name": "ValidationError",
            "description": "'query' must contain property  'agent'",
            "property": "query",
            "value": {
                "document": ""
            }
        },
        {
            "name": "ValidationError",
            "description": "'query' must contain property  'stateId'",
            "property": "query",
            "value": {
                "document": ""
            }
        }
    ]
}

Merge State

POST https://{organisation}.clearlrs.com/xapi/activities/state

Query Parameters

Name
Type
Description

activityId

string

1

agent

object

2

stateId

string

3

registration

string

4

Remove State

DELETE https://{organisation}.clearlrs.com/xapi/activities/state

Query Parameters

Name
Type
Description

activityId

string

1

agent

object

2

stateId

string

3

registration

string

4

PreviousStatementsNextActivity Profile

Last updated 6 years ago