Capabilities Tokens List - OsiriX-Foundation/KheopsAuthorization GitHub Wiki

Used to get a list of capabilities token for a given user.

URL : /capabilities

Method : GET

Auth Required : Authorization with a JWT Bearer token with the user as the sub claim.

URL Parameters

  • valid={boolean} (Optionnal) default value : false
  • album={albumID} (Optionnal) Show all the capabilities token for an album
  • limit={limit} (Optionnal)
  • offset={offset} (Optionnal)

Success Response

Header X-Total-Count contains the total number of capabilities token

  • Status : 200 OK

The results are sort by issued_at_time descending

[
    {
        "id": "KbSVRVsa0r",
        "title": "Twitter token",
        "issued_at_time": "2018-10-22T14:20:59.790Z",
        "not_before_time": "2018-10-22T14:20:59.734Z",
        "expiration_time": "2019-01-22T14:20:59.734Z",
        "revoked": false,
        "scope_type": "user"
    },
    {
        "id": "TCh6D5l9Jn",
        "title": "Facebook token",
        "issued_at_time": "2018-10-22T14:20:59.790Z",
        "not_before_time": "2018-10-22T14:20:59.734Z",
        "last_used": "2018-11-12T13:23:46.156Z",
        "expiration_time": "2019-01-22T14:20:59.734Z",
        "revoke_time": "2019-01-22T14:20:59.734Z",
        "revoked": true,
        "read_permission": true,
        "write_permission": false,
        "download_permission": true,
        "appropriate_permission": false,
        "scope_type": "album",
        "album": {
            "id": "hx7S6Q2nv0",
            "name": "The album name"
        },
        "created_by": {
            "email": "[email protected]",
            "sub": "c2fd0b66-dac4-4b98-9341-d4f3b303bd4e",
            "last_name": "user last name",
            "first_name": "user first name"
        }
    },
    {...}
]

Error Response

If the user is not found

  • Status : 404 Not Found