Skedulo Token API
The Token API from Skedulo — 4 operation(s) for token.
The Token API from Skedulo — 4 operation(s) for token.
openapi: 3.0.0
info:
title: Authentication Admin Token API
description: Skedulo Authentication API
version: 1.0.0
servers:
- url: https://api.skedulo.com/auth
- url: https://api.uk.skedulo.com/auth
- url: https://api.ca.skedulo.com/auth
- url: https://api.au.skedulo.com/auth
tags:
- name: Token
paths:
/token:
post:
summary: Create API token
description: Create an API token with an optional expiry. This token can be used to authenticate as the same user that created it (with the same claims) for as long as the token is valid. Tokens may be revoked.
operationId: createApiToken
requestBody:
content:
application/json:
schema:
type: object
properties:
expiry:
description: Optional expiry. If omitted the token is valid forever.
type: string
format: date-time
responses:
'200':
description: Return the API token
content:
application/json:
schema:
type: object
required:
- result
properties:
result:
type: object
required:
- token
- jti
properties:
token:
type: string
format: base64
example: 5l8l/TyAG+282cBi0JoAp8Gj2WtnXjhxkHKu5J+ytWJcp5kHG9I7k...A==
jti:
type: string
example: x62ThdBIqHVmILpLKdHbZctTaEzySGGc
tags:
- Token
get:
security:
- Authorization: []
summary: Create or fetch an iCal token for the current user
description: ''
operationId: getToken
responses:
'200':
description: Returns the token
content:
application/json:
schema:
type: object
required:
- result
properties:
result:
type: object
required:
- value
properties:
value:
type: string
'400':
description: If the user does not have a resource id attached
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Token
/token/{jti}:
get:
summary: Get an API token
description: Get metadata for an API token by specifying its JTI.
operationId: fetchAllApiTokens
parameters:
- in: path
name: jti
description: The JWT Identifier for the API token
required: true
schema:
type: string
responses:
'200':
description: Metadata for the requested API token
content:
application/json:
schema:
type: object
properties:
result:
$ref: '#/components/schemas/ApiTokenInfo'
tags:
- Token
/token/revoke:
post:
summary: Revoke an API token
description: Revoke an API token so it can no longer be used to authenticate API requests.
operationId: revokeToken
requestBody:
content:
application/json:
schema:
type: object
properties:
jti:
description: JWT Identfier of the token to revoke. This can be found by decoding the token or by getting the list of tokens via the API.
type: string
responses:
'200':
description: The token was revoked
content:
application/json:
schema:
type: object
required:
- result
properties:
result:
type: object
tags:
- Token
/token/unrevoke:
post:
summary: Unrevoke an API token
description: Unrevoke an API token that has previously been revoked so it can be used again.
operationId: unrevokeToken
requestBody:
content:
application/json:
schema:
type: object
properties:
jti:
description: JWT Identfier of the token to unrevoke. This can be found by decoding the token or by getting the list of tokens via the API.
type: string
responses:
'200':
description: The token was unrevoked
content:
application/json:
schema:
type: object
required:
- result
properties:
result:
description: An empty object
type: object
tags:
- Token
components:
schemas:
ApiTokenInfo:
type: object
required:
- tenantId
- jti
- claims
- createdDate
- createdBy
properties:
tenantId:
type: string
example: sk_e0bb1f8aa1924a00b77a9c1f43b09e41
jti:
type: string
example: BM10SHoI4Z4nmhtElInXuJWLkeeqqyzy
claims:
$ref: '#/components/schemas/JwtClaims'
createdDate:
type: string
format: date-time
createdBy:
type: string
revokedDate:
type: string
format: date-time
revokedBy:
type: string
lastUpdated:
type: string
format: date-time
Error:
type: object
required:
- errorType
- message
properties:
errorType:
type: string
message:
type: string
JwtClaims:
description: Selection of the user claims from the JWT
type: object
additionalProperties: true
securitySchemes:
Authorization:
type: http
scheme: bearer
bearerFormat: JWT