Shareworks Authentication Token API
The Authentication Token API from Shareworks — 3 operation(s) for authentication token.
The Authentication Token API from Shareworks — 3 operation(s) for authentication token.
openapi: 3.0.1
info:
title: Shareworks Admin REST Authentication Token API
description: Shareworks Admin REST API
version: 1.0.0
servers:
- url: https://shareworks.solium.com/rest/admin
description: Production
- url: https://sum-qa02.shareworks.com/rest/admin
description: Sandbox
security:
- accessToken: []
tags:
- name: Authentication Token
paths:
/v1/auth/tokens:
post:
tags:
- Authentication Token
summary: POST Auth Token
description: Create a JWT authentication request and retrieve an access token
operationId: issue
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccessTokenResponse'
'400':
description: The request was unacceptable, often due to missing a required parameter, malformed query, or malformed request body.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'401':
description: You request was successful and valid but you do not have access to this resource.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'403':
description: When a request tries to access a resource that doesn't belong to them.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'422':
description: There was a validation error. Check the error message to see what values caused the error.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'500':
description: Servers are not working as expected.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
/v1/refresh/tokens:
post:
tags:
- Authentication Token
summary: POST Refresh Auth Token
description: Create a JWT authentication request and get a new access token
operationId: refresh
parameters:
- name: Shareworks-Request-Id
in: header
description: An identifier unique to this request. If a connection is broken or a response does not come in a timely manner, submit the same request again with this same identifier. Shareworks ensures that duplicate requests with the same identifier will only be processed once and will all return the same response.
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessTokenRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccessTokenResponse'
'400':
description: "The request was unacceptable, often due to missing a required parameter, malformed query, or malformed request body.\n\nAlso occurs when using Shareworks-Request-Id header if: \n- A previous request with the identifier has been submitted but is not yet complete \n - errors[] will include {code: 461, message: A request with the provided Shareworks-Request-Id is currently in-progress} \n- A previous, but different, request was already processed with the same identifier \n - errors[] will include {code: 460, message: The provided Shareworks-Request-Id header is not unique for this user}"
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'401':
description: You request was successful and valid but you do not have access to this resource.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'403':
description: When a request tries to access a resource that doesn't belong to them.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'422':
description: There was a validation error. Check the error message to see what values caused the error.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'500':
description: Servers are not working as expected.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
/v1/terminate/tokens:
post:
tags:
- Authentication Token
summary: POST Terminate Token
description: 'Revoke access to the token '
operationId: terminateSession
parameters:
- name: Shareworks-Request-Id
in: header
description: An identifier unique to this request. If a connection is broken or a response does not come in a timely manner, submit the same request again with this same identifier. Shareworks ensures that duplicate requests with the same identifier will only be processed once and will all return the same response.
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessTokenRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AccessTokenResponse'
'400':
description: "The request was unacceptable, often due to missing a required parameter, malformed query, or malformed request body.\n\nAlso occurs when using Shareworks-Request-Id header if: \n- A previous request with the identifier has been submitted but is not yet complete \n - errors[] will include {code: 461, message: A request with the provided Shareworks-Request-Id is currently in-progress} \n- A previous, but different, request was already processed with the same identifier \n - errors[] will include {code: 460, message: The provided Shareworks-Request-Id header is not unique for this user}"
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'401':
description: You request was successful and valid but you do not have access to this resource.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'403':
description: When a request tries to access a resource that doesn't belong to them.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'422':
description: There was a validation error. Check the error message to see what values caused the error.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
'500':
description: Servers are not working as expected.
content:
application/json:
schema:
$ref: '#/components/schemas/RestApiErrorResponse'
encoding:
? ''
: contentType: application/json
components:
schemas:
ErrorWithCode:
title: Validation Error
required:
- code
- message
type: object
properties:
message:
type: string
description: Message describing the error
code:
type: integer
description: Unique code for the validation error
format: int32
RestApiErrorResponse:
title: Error Response
required:
- code
- errorId
- message
type: object
properties:
code:
type: string
description: Code representing the type of error
message:
type: string
description: Message describing the error
errors:
type: array
description: List of all further error details, usually due to validation checks
items:
$ref: '#/components/schemas/ErrorWithCode'
errorId:
type: string
description: Identifier for the error
AccessTokenRequest:
title: Access Token Body
required:
- accessToken
type: object
properties:
accessToken:
$ref: '#/components/schemas/AccessToken'
AccessToken:
title: Access Token Body
required:
- value
type: object
properties:
value:
type: string
description: Access Token Value
description: Token to accompany all API requests for authentication purposes
AccessTokenResponse:
title: Token Response
required:
- accessToken
- expiresIn
- issuedAt
- issuer
- tokenType
type: object
properties:
accessToken:
type: string
description: Token to accompany all API requests for authentication purposes
expiresIn:
type: integer
description: Token expiry period in seconds
format: int32
scope:
type: string
description: Access scope for the token
issuedAt:
type: integer
description: Issued instant for the token (Unix epoch time)
format: int64
issuer:
type: string
description: Issuer of the token
audience:
type: string
description: Audience for the token
tokenType:
type: string
description: Type of the token
securitySchemes:
accessToken:
type: http
scheme: bearer
bearerFormat: JWT