Custom Parameters API
This API returns the lists of custom parameters defined for registered users and guests.
URL: /admin/api/v1/tenants/{tenantId}/customParameters
Method: GET
Path variables
Field |
Data type |
Mandatory |
Description |
Validation |
---|---|---|---|---|
tenantId |
String |
Y |
It accepts:
Provide any of the above 2 values. |
|
Success response
In case of success, will just return success code 200 HttpStatus.OK with JSON content in the body as described below.
Response parameters
Field |
Data type |
Mandatory |
Description |
---|---|---|---|
version |
String |
Y |
Defines the version of the API. |
Status |
String |
Y |
Defines the response stauts. For successful response, its value will be “success” |
data |
Object |
Y |
This is the element which encapsulates the API response. |
key |
String |
Y |
- |
value |
String |
Y |
- |
Example JSON response
{
"version": "1",
"status": "success",
"data": {
"registered": [
{
"key": "k1",
"value": "v1"
},
{
"key": "k2",
"value": "v2"
}
],
"unregistered": [
{
"key": "k3",
"value": "v3"
},
{
"key": "aaabbb22",
"value": "u2"
}
]
}
}
Error responses
If validation of mandatory parameters is failed. In this scenario list of errors will be returned in JSON body. Status code will be 400. HttpStatus.BAD_REQUEST
Error response parameters
Field |
Data type |
Mandatory |
Description |
---|---|---|---|
version |
String |
Y |
Defines the version of the API. |
status |
String |
Y |
Defines the response stauts. For Error response, its value will be “failure” |
error |
Object |
Y |
This is the element which encapsulates the API error details. |
code |
Integer |
Y |
This is the Error code for the error. |
message |
Text |
Y |
This describes the error. |
errors |
List |
N |
This contains the list of errors in case of request validation failure. Its value will be empty list for all the error scenarios other than request validation failure. |
JSON error response structure in case of request validation errors
{
"version": "1",
"status": "failure",
"error": {
"code": 102001,
"message": "Invalid Request parameter(s)",
"errors": [
"Invalid key aaabbb1 1",
"Invalid key aaabbb 21"
]
}
}
In case of Bad Request, Forbidden Request and Internal server error scenarios, errors will be returned as empty list.
JSON error response structure in case of Bad request, Forbidden request or internal server errors
{
"version": "1",
"status": "failure",
"error": {
"code": 102003,
"message": "Bad request",
"errors": []
}
}
HTTP status codes, error codes, and messages
HTTP response code |
Error code |
Error message |
---|---|---|
400 |
102001 |
Invalid Request parameter(s) |
500 |
102002 |
Internal server error |
400 |
102003 |
Bad request |
403 |
102004 |
Request Forbidden |
Validation error messages
HTTP response code |
Error code |
---|---|
400 |
Invalid key |
400 |
Invalid value |
400 |
Invalid auth type |