Skip to end of metadata
Go to start of metadata

Token

An (access) token grants access to the API with certain roles. If you want to create a token post a new object (without the token field) to the API. The returned object will have the token field filled. To allow an user to easier transfer the token to another device there also is the authcode field that is much shorter and easier to enter.

Fields

Field

Type

Description

token

string

The secret token string

created

long

UTC Unix time when this token was created

expires

long

UTC Unix time when this token will expire and will be deleted

timeout

long

UTC Unix time when this token will timeout due to inactivity. This will be increased when the token is used

user

string

The code of the user this token belongs to

rolemask

long

A mask that will limit the permissions of the token to a subset of those of the user. Note that this field is misnamed: a better name would have been "permissionmask".

authcode

string

A shorter code that can be used to (only once!) retrieve the token. Set this to "create" when posting a new token to associate an authcode with this token. It will be null otherwise.

Example

$ curl "https://xxxxxx.zportal.nl/api/v1/tokens?user=me&access_token=xxxxxxxxxxxxxxxxxxx"
{
  "response": {
    "status":200,
    "message":"",
    "startRow":0,
    "endRow":27,
    "totalRows":27,
    "data":[
      {
      },
      ...
    ]
  }
}

  • No labels