Update an Access Token

patch

/api/v2/tokens/{id}/

Make a PUT or PATCH request to this resource to update this access token. The following fields may be modified:

  • description: Optional description of this access token. (string, default="")

  • scope: Allowed scopes, further restricts user's permissions. Must be a simple space-separated string with allowed scopes ['read', 'write']. (string, default="write")

For a PATCH request, include only the fields that are being modified.

Request

Supported Media Types
Path Parameters
Query Parameters
Body ()
Root Schema : schema
Example:
{
    "scope":"write"
}
Back to Top

Response

Supported Media Types

200 Response

Body
Example Response (application/json)
{
    "application":"1",
    "created":"2018-02-01T08:00:00.000000Z",
    "description":"",
    "expires":"2018-02-01T08:00:00.000000Z",
    "id":"1",
    "modified":"2018-02-01T08:00:00.000000Z",
    "refresh_token":"************",
    "related":{
        "activity_stream":"/api/v2/tokens/1/activity_stream/",
        "application":"/api/v2/applications/1/",
        "user":"/api/v2/users/1/"
    },
    "scope":"write",
    "summary_fields":{
        "application":{
            "id":"1",
            "name":"test app"
        },
        "user":{
            "first_name":"",
            "id":"1",
            "last_name":"",
            "username":"admin"
        }
    },
    "token":"************",
    "type":"o_auth2_access_token",
    "url":"/api/v2/tokens/1/",
    "user":"1"
}
Back to Top