Public Routes (EN-US)

Lighthouse API Public Routes Usage Description


API Documentation

Base URL

https://api.piercloud.io

HTTP Client Authentication

All HTTP clients need to be registered on the Pier Cloud platform to obtain access credentials. For more information, visit the link.


Authentication

1. Generate Access Token

Generate an access token for the HTTP client.

  • URL: /auth

  • Method: POST

  • Description: Returns the access token and other information based on the provided credentials.

Headers

Name
Type
Required
Description

Content-Type

string

Yes

Must be application/json

Body

{
  "client_id": "string",
  "client_secret": "string"
}

Example Request

curl -X POST https://api.piercloud.io/auth \
     -H "Content-Type: application/json" \
     -d '{
           "client_id": "client_id",
           "client_secret": "client_secret",
         }'

Successful Response (201 Created)

{
  "code": "success",
  "data": {
    "access_token": "JWT Token",
    "expires_in": "Expiration time in seconds",
    "refresh_expires_in": 0,
    "token_type": "Bearer",
    "not-before-policy": 0,
    "session_state": "",
    "scope": "List of access permissions for the HTTP client"
  }
}

Error Response (400 Bad Request)

{
  "code": "bad-request/invalid-parameters",
  "message": "error message"
}

Error Response (401 Unauthorized)

{
  "code": "failed",
  "message": "invalid or expired token"
}

Last updated