Client API: Container Apps: Rules
The 4 Client API operations for rules.
Part of Container Apps.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/client/servers/{uuid}/rules |
List rules for a server |
| POST | /api/v1/client/servers/{uuid}/rules |
Create a new rule |
| PUT | /api/v1/client/servers/{uuid}/rules/{rule_uuid} |
Update a rule |
| DELETE | /api/v1/client/servers/{uuid}/rules/{rule_uuid} |
Delete a rule |
List rules for a server
Section titled List rules for a serverGET /api/v1/client/servers/{uuid}/rules
List rules for a server.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
A 200 response is a list; each item has these fields:
| Field | Type |
|---|---|
[].id |
integer |
[].uuid |
string |
[].server_id |
integer |
[].name |
string |
[].trigger_type |
string |
[].trigger_config |
Trigger Config |
[].conditions |
array of any or object or null |
[].actions |
array of any or object |
[].enabled |
boolean |
[].created_at |
string (date-time) |
[].updated_at |
string (date-time) or null |
[].last_triggered_at |
string (date-time) or null |
Create a new rule
Section titled Create a new rulePOST /api/v1/client/servers/{uuid}/rules
Create a new rule.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
name |
string | yes |
trigger_type |
string | yes |
trigger_config |
Trigger Config | no |
conditions |
array of any or object or null | no |
actions |
array of any or object | yes |
enabled |
boolean | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
201 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 201 response:
| Field | Type |
|---|---|
id |
integer |
uuid |
string |
server_id |
integer |
name |
string |
trigger_type |
string |
trigger_config |
Trigger Config |
conditions |
array of any or object or null |
actions |
array of any or object |
enabled |
boolean |
created_at |
string (date-time) |
updated_at |
string (date-time) or null |
last_triggered_at |
string (date-time) or null |
Update a rule
Section titled Update a rulePUT /api/v1/client/servers/{uuid}/rules/{rule_uuid}
Update a rule.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
rule_uuid |
path | string | yes |
Request body
Section titled Request bodyapplication/json (required)
| Field | Type | Required |
|---|---|---|
name |
string or null | no |
trigger_type |
string or null | no |
trigger_config |
object or null | no |
conditions |
array of any or object or null | no |
actions |
array of any or object or null | no |
enabled |
boolean or null | no |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
id |
integer |
uuid |
string |
server_id |
integer |
name |
string |
trigger_type |
string |
trigger_config |
Trigger Config |
conditions |
array of any or object or null |
actions |
array of any or object |
enabled |
boolean |
created_at |
string (date-time) |
updated_at |
string (date-time) or null |
last_triggered_at |
string (date-time) or null |
Delete a rule
Section titled Delete a ruleDELETE /api/v1/client/servers/{uuid}/rules/{rule_uuid}
Delete a rule.
Authentication: an access token, sent as Authorization: Bearer <token>.
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
uuid |
path | string | yes |
rule_uuid |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |