Skip to main content

Personal Access Token Service (1.0)

Download OpenAPI specification:Download

Provides users with the ability to create and manage access tokens, which provide authentication and authorization when interacting with the Model-Prime API.

Returns the user account information associated with the access token used in the request.

Responses

Response samples

Content type
application/json
{
  • "email": "robot@model-prime.com",
  • "organization": "Model-Prime"
}

Lists all currently active token configurations for the current user.

query Parameters
page_size
integer [ 1 .. 100000 ]

The number of results to display per response page. The default is the maximum.

page_number
integer >= 1
Default: 1

The desired page number, starting from 1. For instance, if page_size=100, then page_number=2 will contain items 201-300.

Responses

Response samples

Content type
application/json
{
  • "count": 0,
  • "items": [
    ]
}

Creates a new access token with the same authorization as the creator.

To use this token, supply an Authorization header with the token returned from this endpoint. Example: bill@example.com:mpat_rhlI7qcgWuhD2gFPpQVlzNfRCSpQ82sK Note that the token is treated like a password. It cannot be displayed again after initial generation.

Request Body schema: application/json
expiration
string <date-time>

The date which this access token will expire. Specifying no date indicates no expiration.

name
required
string

A user friendly name which can help distinguish this token from others.

Responses

Request samples

Content type
application/json
{
  • "expiration": "2019-08-24T14:15:22Z",
  • "name": "Bill's PC"
}

Response samples

Content type
application/json
{
  • "expiration": "2019-08-24T14:15:22Z",
  • "name": "Bill's PC"
}

Deletes the specified access token.

Deletes the specified access token. The token will no longer be useable.

path Parameters
id
required
string <uuid>

the unique identifier for the resource

Responses