The following REST APIs are available for checking server status, connection parameters, and working with FMPS logs.
A GET method that returns the status of the server component.
http://<FMPS_server>:<port>/ping
Returns a HTTP 200 (Successful) response with JSON object containing information about the server’s status.
Code | Type | Description |
---|---|---|
500 |
String | A error occurred while retrieving the server’s status. |
A GET method that retrieves the server’s connection parameters.
http://<FMPS_server>:<port>/v16/connectionParameter
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
{
"content-type": "application/json",
}
Returns a HTTP 200 (Successful) response with JSON object containing server’s connection parameters.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A POST method that enables or disables logging. By default, logs are turned off. You can also configure logs from the application’s user interface, for more details see Specify default log settings.
In addition to enabling logs, you can also configure the log level. The possible values for log level are: FATAL, ERROR, WARN, INFO, andDEBUG. By default, log level is set to INFO.
You can either enable the logs or set the log level, or configure both by providing the required parameters in query string of the API.
http://<FMPS_server>:<port>/v16/enableLogging?enable=[]&level=[]
Name | Type | Description |
---|---|---|
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
enable | Integer | Query parameter that enables (1) or disables (0) logs. |
level | String | Query parameter that sets the level of logging information to capture. Possible values are: FATAL, ERROR, WARN, INFO, andDEBUG. |
?enable=0
?level=ERROR
Returns a HTTP 200 (Successful) response.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
403 |
String | Access not granted. |
A GET method that retrieves the last n number of logs for a specific task. It uses the task ID and the number specified in the parameters to retrieve the logs.
http://<FMPS_server>:<port>/v16/logs/task/list/:id/:lastnrun
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
id | String | The unique ID of the task for which you want to retrieve the logs. |
lastnrun | Integer | The number of last n logs to retrieve for the given task. |
5e4302fafdfdfadsfdfasgafsafgsag
5
Returns a HTTP 200 (Successful) response with the last n logs for the task.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A GET method that retrieves the logs for a specific task using the run ID. It uses the task ID and the run ID in the parameters to retrieve the logs. In addition, you can also specify the type of logs to retrieve in the query string.
http://<FMPS_server>:<port>/v16/logs/task/run/:id/:runid
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
id | String | The unique ID of the task for which you want to retrieve the logs. |
runid | Integer | ID of the run task for which you want to retrieve the logs. |
5e4302fafdfdfadsfdfasgafsafgsag
5e4302fafdfdfadsfdfasgafsafgsag
Returns a HTTP 200 (Successful) response with the logs for the given task and run ID.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
A GET method that retrieves all clients that are available and ready to take publishing tasks from the server.
http://<FMPS_server>:<port>/v16/worker/getallworkers
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Returns a HTTP 200 (Successful) response with an array of all clients (or workers).
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |