Cluster Application Command
Executes a command on a cluster application.
Request
| Property | Value |
|---|---|
| Method | POST |
| URL | /api/cluster/applications/{appId}/command |
| Content-Type | application/json |
| Authentication | Bearer Token |
Request
curl -X POST "{BASE_URL}/api/cluster/applications/{appId}/command" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | string | Yes | Application ID |
Request
curl -X POST "{BASE_URL}/api/cluster/applications/{appId}/command" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
data.attributes.command | string | Yes | Command to execute (see available commands below) |
Available Commands
| Command | Description |
|---|---|
forceRestart | Forces the application to restart |
kick | Kicks (disconnects) the application from the cluster |
block | Blocks the application from accepting new connections |
unblock | Unblocks the application, allowing new connections again |
Example Request (Force Restart)
Example Request (Kick)
Example Request (Block)
Example Request (Unblock)
{
"data": {
"attributes": {
"command": "forceRestart"
}
}
}
{
"data": {
"attributes": {
"command": "kick"
}
}
}
{
"data": {
"attributes": {
"command": "block"
}
}
}
{
"data": {
"attributes": {
"command": "unblock"
}
}
}
Response Body
| Code | Description |
|---|---|
| 200 | Success - Command executed |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid or missing token |
| 404 | Not Found - Application does not exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error |
| Parameter | Type | Description |
|---|---|---|
message | string | Response status message |
Metadata
| Parameter | Type | Description |
|---|---|---|
meta.executionTime | integer | Request processing time in milliseconds |
meta.generatedAt | integer | Response generation timestamp (Unix timestamp in ms) |
Successful Response (200)
{
"meta": {
"executionTime": 27,
"generatedAt": 1767789946006
},
"message": "Application has been force restarted"
}
Error Responses
Application Not Found (404)
Other Errors (4xx/5xx)
| Parameter | Type | Description |
|---|---|---|
message | string | Human-readable error message |
{
"message": "Application not found"
}
{
"message": "Error message"
}
Support Needed?
Create a free ticket and our support team will provide you necessary assistance.