Skip to main content

Misc Endpoints

The page contains other useful endpoints.

Base Path: /api/v2

Operations​

Test Auth​

Test the authorization of a request. This endpoint can be used to test your credentials or to test your logic for building HTTP requests.

Use this endpoint to:

  • Validate your API credentials
  • Test your HTTP request construction
  • Verify the required headers are properly configured

It checks only the Authorization and X-User-Company-ID headers, and that Content-Type, when sent, is application/json. It doesn't read the request body.

Endpoint​

POST /test/auth

Response Codes​

CodeDescription
200 OKRequest parameters are valid:
- Credentials are valid
- Client ID is authorized for the company ID in X-User-Company-ID
400 Bad RequestRequest is malformed:
- X-User-Company-ID header is missing
- Content-Type is set to something other than application/json
401 UnauthorizedCredentials are invalid or missing, or the key can't act for the company ID in X-User-Company-ID
503 Service UnavailableAuthentication is temporarily unavailable; retry with backoff

Example​

Request:

curl -v -X POST https://<your-starboard-api-host>/api/v2/test/auth \
-H "Authorization: Basic {base64-encoded-credentials}" \
-H "Content-Type: application/json" \
-H "X-User-Company-ID: {your-company-id}"
Success Response​
HTTP/1.1 200 OK
Content-Type: application/json

{
"status": "OK"
}
Error Response Examples​

Missing Authorization:

HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
"error": "unauthorized",
"message": "Missing Authorization header"
}

Missing X-User-Company-ID:

HTTP/1.1 400 Bad Request
Content-Type: application/json

{
"error": "bad_request",
"message": "Missing X-User-Company-ID header"
}

Company ID the key can't act for:

HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
"error": "unauthorized",
"message": "X-User-Company-ID is not authorized for this client"
}