API DOCUMENT
Clusters
This API Document provides details about the endpoints, methods, parameters, and responses of the API, allows users to perform various operations related to Clusters epic.
By providing a detailed breakdown of endpoints, methods, parameters, and responses, developers can efficiently leverage the API to perform a myriad of operations related to Clusters epic. With clear documentation, developers can swiftly grasp the nuances of the API, enabling them to implement secure and robust authentication mechanisms, manage user lifecycles effectively, and harness chip-based authentication for enhanced security measures. Thus, API documentation serves as a cornerstone for developers, offering valuable insights and guidelines to leverage the API’s functionalities to their fullest potential.
Tenant User Login
This endpoint is where the tenant user can login with their credentials.
- Method: POST
- Endpoint: /api/auth/tenantUserLogin
Parameters: No additional parameters required.
Request Body: application/json
{
“password”: “P@ss1234”,
“email”: “test.tenant.user@sunbytes.io”
}
Responses
- 200 OK: Success response
{
“accessToken”: “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c”,
“firstName”: “Test First Name”,
“lastName”: “Test Last Name”
}
- 404 Not Found: ID does not exist.
{
“statusCode”: 404,
“message”: “Incorrect login credentials”,
“error”: “Not found”
}
- 500 Internal server error: An unexpected error occurred on the server.
{
“statusCode”: 500,
“message”: “Internal server error”
}
- 520 Web Server Returned an Unknown Error The origin server returned an empty, unknown, or unexpected response to Cloudflare.
Find Public Key by PCCID
This endpoint is used to get public key by PCCID.
- Method: POST
- Endpoint: /api/clusters/find-public-key-by-pccid
Parameters: No additional parameters required.
Request Body: application/json
{
“PCCID”: “800000001000000010000000000000014464b592da61f3fd5506fcb1f37f4bef”
}
Responses
- 201 OK: Success response.
{
“publicKey”: “string”
}
- 401 Unauthorized: Request lacks proper authentication.
{
“statusCode”: 401,
“message”: “Unauthorized”
}
- 403 Forbidden: Server understands the request but refuses to authorize it.
{
“statusCode”: 403,
“message”: “Invalid request – please supply combined PCCID or separate PCC and ID “,
“error”: “Forbidden”
}
- 404 Not Found: ID does not exist.
{
“statusCode”: 404,
“message”: “PCC User not found”,
“error”: “Not found”
}
- 500 Internal server error: An unexpected error occurred on the server.
{
“statusCode”: 500,
“message”: “Internal server error”
}
- 520 Web Server Returned an Unknown Error The origin server returned an empty, unknown, or unexpected response to Cloudflare.
Quick navigation
Still stuck in the code maze? No worries, our team is just an email away at support@sandgrain.eu. We speak fluent bug-fix!