Skip to main content
POST
/
api
/
user
/
refresh
/
entitlements
Refresh user entitlements and permissions
curl --request POST \
  --url https://pria.praxislxp.com/api/user/refresh/entitlements \
  --header 'x-access-token: <api-key>'
{
  "success": true,
  "entitlements": [
    {
      "_id": "<string>",
      "entitlements": [
        "<string>"
      ],
      "accountType": "super",
      "status": "active",
      "user": "<string>",
      "institution": "<string>",
      "institution_data": {
        "_id": "<string>",
        "name": "<string>",
        "ainame": "<string>"
      },
      "account_data": {
        "_id": "<string>",
        "name": "<string>"
      },
      "created": "2023-11-07T05:31:56Z",
      "lastLogin": "2023-11-07T05:31:56Z",
      "lastKA": "2023-11-07T05:31:56Z",
      "favorite": true,
      "favoriteAssistants": [
        "<string>"
      ],
      "acceptedAccountPrivacyPolicyDate": "2023-11-07T05:31:56Z",
      "creditAwardedDate": "2023-11-07T05:31:56Z",
      "lticontextid": "<string>",
      "lastConversation": {
        "course_id": 123,
        "course_name": "<string>",
        "assistant": {
          "_id": "<string>",
          "name": "<string>",
          "picture_url": "<string>"
        },
        "history_count": 123,
        "last_dialogue_date": "2023-11-07T05:31:56Z"
      },
      "canvasApiToken": {
        "access_token": "24379~vCERVnFWh9yyEVQkafGWQL8WwUk9YKv2mEmMyv6WtkzUYkEHDRGtPP2aMMCYf4C9",
        "token_type": "Bearer",
        "user": {
          "id": 110,
          "name": "Hugo Lebegue",
          "global_id": "243790000000000110",
          "effective_locale": "en",
          "fake_student": false
        },
        "institutionid": "65cfebc32f5e1b37d4e52329",
        "canvas_region": "us-east-1",
        "expires_in": 3600,
        "created": 1,
        "refresh_token": "24379~MTDRu7Aw3RGk2DPmrNuAP2E37LcRHQ2A2wk978CMK3GTMFwkrJA8wQkeaKmxWvRA"
      },
      "digitaltwinrole": "<string>",
      "joinedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "accountManagerAccounts": [
    {
      "_id": "<string>",
      "name": "<string>"
    }
  ]
}

Authorizations

x-access-token
string
header
required

JWT token passed in x-access-token header

Response

Successfully refreshed user entitlements

success
boolean

Indicates if the operation was successful

entitlements
object[]

Array of user-institution records, sorted by favorite (desc), ainame (asc), institution name (asc). Null-institution duplicates are auto-cleaned.

accountManagerAccounts
object[]

Accounts where this user is an account manager (array of {_id, name} objects)