General
API Concepts
Servers
Env | Url | Description |
---|---|---|
PROD | https://idp.peax.ch/auth/realms/peax-id-prod/protocol/openid-connect/token | IDP - Authentication Server |
PROD | https://proxy.peax.ch | API Endpoints |
STAGE | https://idp-stage.peax.ch/auth/realms/peax-id-stage/protocol/openid-connect/token | IDP - Authentication Server |
STAGE | https://proxy-stage.peax.ch | API Endpoints |
Version management
Authentication
curl --location --request POST '{IDP_URL}/auth/realms/peax-id-prod/protocol/openid-connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cache-Control: no-cache' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_secret={client_secret}' \
--data-urlencode 'client_id={client_id}'
Response
{
"access_token": "eyJh...",
"expires_in": 300,
"refresh_expires_in": 1800,
"refresh_token": "eyJh...",
"token_type": "bearer",
"not-before-policy": 0,
"session_state": "b11eb21c-1a08-4488-ab4d-6dba81b2c11e",
"scope": "profile email"
}
Pagination
1.
Requesting /documents?page=2&size=15 will retrieve records 16-30.
2.
Error Handling
{
"code": "400",
"messageKey": "InvalidRequest",
"info": [
{
"name": "timestamp",
"value": "2024-02-28T12:34:56Z"
},
{
"name": "requestId",
"value": "abc123"
}
],
"errors": [
{
"fieldName": "email",
"validationMessage": "Email format is invalid."
},
{
"fieldName": "password",
"validationMessage": "Password must be at least 8 characters long."
}
]
}
Error Codes
Code | Name | Cause |
---|---|---|
400 | Bad request |
|
401 | Unauthorized | Access token expired or no access token |
403 | Forbidden | Not authorized |
404 | Not Found | No resource found |
409 | Conflict | Business validation error |
410 | Gone | Resource is not existing any more. |
500 | Internal server error | Unexpected error at server site |
Character Set
Modified at 2025-01-23 13:20:27