API Technical specification
  • 03 Oct 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

API Technical specification

  • Dark
    Light
  • PDF

Article summary

Authentication API

The Authentication API allows clients to authenticate a user by providing an API key in the header and a username and password in the request body.

Authentication Endpoint: /api/authenticate

POST {BASE_URL}}/CIDSaas/default/api/authenticate

Request Headers

Name

Type

Required

Description

API-Key

String

Yes

The API key is used to authenticate the request.

Content-Type

String

Yes

Must be application/JSON.

Request Body

Name

Type

Required

Description

username

String

Yes

User’s username.

password

String

Yes

User’s password.

Request Syntax:

Sample response:

Get User Groups API

The Get User Groups API allows clients to retrieve the groups or roles associated with a specific user. Authentication is required, and the request must include an API key in the header.

GetuserGroup Endpoint: /api/ user-roles

POST {BASE_URL}}/CIDSaas/default/api/ user-roles

Request Headers

Name

Type

Required

Description

API-Key

String

Yes

The API key is used to authenticate the request.

Content-Type

String

Yes

Must be application/JSON.

Request Body

Name

Type

Required

Description

username

String

Yes

The username of the user to retrieve groups or roles.

Request Syntax

Sample response:

Get User Attributes API

The Get User Attributes API allows clients to retrieve various attributes associated with a specific user, Authentication is required, and the request must include an API key in the header.

Get user Attributes Endpoint: /api/user-details

POST {BASE_URL}}/CIDSaas/default/api/ user-details

Request Headers

Name

Type

Required

Description

API-Key

String

Yes

The API key is used to authenticate the request.

Content-Type

String

Yes

Must be application/JSON.

Request Body

Name

Type

Required

Description

username

String

Yes

The username of the

user to retrieve attributes.

Request Syntax:

Sample Response

Get User Authorized Applications API

The Get User Authorized Applications API allows clients to retrieve a list of applications that a specific user is authorized to access. Authentication is required, and the request must include an API key in the header.

Get user Attributes Endpoint: /api/ authorized-applications

POST {BASE_URL}}/CIDSaas/default/api/ authorized-applications

Request Headers

Name

Type

Required

Description

API-Key

String

Yes

The API key is used  to authenticate the request.

Content-Type

String

Yes

Must be application/JSON.

Request Body

Name

Type

Required

Description

username

String

Yes

The username of the user to retrieve authorized applications.

Request Syntax:

Sample Response:

Error Codes

CI Error Code

Description

API Response

E002

User locked

{"status":"error","error":{"code":"E002","message":"User account is locked."}}

E400

Invalid

Username

{"status":"error","error":{"code":"E400","message":"Invalid request"}}

E003

Invalid

Password

{"status":"error","error":{"code":"E003","message":"Invalid credentials"}}

E006

Change

Password

(First Time

Login)

{"status":"error","error":{"code":"E006","message":"This is your first time login.Please change your password"}}

E007

Password Expired

"status":"error","error":{"code":"E007","message":"User password is expired."}}

E009

Inactive Account

{"status":"error","error":{"code":"E009","message":"User account is inactive."}}

E010

No License

{"status":"error","error":{"code":"E010","message":"User does not have license."}}

E011

No application Authorized

{"status":"error","error":{"code":"E011","message":"No application is authorized."}}

E012

No roles found

{"status":"error","error":{"code":"E012","message":"No roles is assigned to the user."}}

E401

Invalid API

Key

{"status": "error","error": { "code": "E401", "message":

"Invalid API Key" }}


Was this article helpful?

What's Next