Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Authentication

Introduction

This API document is a draft

External users will need to authenticate with an existing user in our database.

POST /auth

Returns requested log in user by Credential or ApiKey token.

Parameters

option: possible values: apikey or credentials

Example Requests

POST /auth?option=apikey
{ 
  "apiKey":
  { 
    "apiKey": "my-key-from-SC"
  } 
}
POST /auth?option=credentials
{ 
  "credentials": { 
    "username": "user@example.com", 
    "password": "my-password" 
  } 
} 

Example Responses

HTTP 200

{ 
   "token": 
   { 
     "accessToken": "eyJdWt5q4JtNuXsxZ-n1x819276NRsLl4I.... ", 
     "expires": "2022-09-10T17:04:52.9075669Z" 
   }, 
   "refreshToken": 
   { 
     "accessToken": "tfNmpKgU6huZno4LPMzmUWPjSwcxk....", 
     "expires": "2022-09-10T17:03:52.9225393Z" 
  }, 
  "errorMessage": null 
} 

HTTP 400, 404

{ 
  "type": "string", 
  "title": "string", 
  "status": 0, 
  "detail": "string", 
  "instance": "string", 
  "additionalProp1": "string", 
  "additionalProp2": "string", 
  "additionalProp3": "string" 
}