Rules¶
Resource | Operation | Description |
---|---|---|
DELETE | DELETE /v1/teams/(team_id)/rules/(rule_id) | Delete a rule. |
GET | GET /v1/teams/(team_id)/rules/(rule_id) | Return a specific rule. |
GET /v1/teams/(team_id)/rules | List the rules of a team. | |
POST | POST /v1/teams/(team_id)/rules/(rule_id)/execute | Lorem ipsum. |
POST /v1/teams/(team_id)/rules | Add a new rule. | |
PUT | PUT /v1/teams/(team_id)/rules/(rule_id) | Edit an existing rule. |
-
POST
/v1/teams/
(team_id)/rules/
(rule_id)/execute
¶
-
GET
/v1/teams/
(team_id)/rules/
(rule_id)¶ Return a specific rule.
Example request:
GET /teams/66859c4a-3e0a-4968-a5a4-4c3b8662acb7/rules/ff130e9b-d226-4465-9612-a93e12799091 HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK { "checks": [], "createdAt": "2018-05-17T12:01:09Z", "description": "Compute the QOS of our servers", "id": "ff130e9b-d226-4465-9612-a93e12799091", "name": "Servers", "updatedAt": "2018-11-09T15:33:06Z" }
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – the rule
-
PUT
/v1/teams/
(team_id)/rules/
(rule_id)¶ Edit an existing rule.
Example request:
PUT /v1/teams/66859c4a-3e0a-4968-a5a4-4c3b8662acb7/rules/ff130e9b-d226-4465-9612-a93e12799091 HTTP/1.1 Host: example.com Accept: application/json { "name": "My edited rule" }
Example response:
HTTP/1.1 200 OK { "checks": [], "createdAt": "2018-05-17T12:01:09Z", "description": "Compute the QOS of our servers", "id": "ff130e9b-d226-4465-9612-a93e12799091", "name": "My edited rule", "updatedAt": "2018-11-09T15:33:06Z" }
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – the edited rule
-
DELETE
/v1/teams/
(team_id)/rules/
(rule_id)¶ Delete a rule.
Example request:
DELETE /v1/teams/66859c4a-3e0a-4968-a5a4-4c3b8662acb7/rules/ff130e9b-d226-4465-9612-a93e12799091 HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK {}
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – the rule has been deleted
-
GET
/v1/teams/
(team_id)/rules
¶ List the rules of a team.
Example request:
GET /teams/66859c4a-3e0a-4968-a5a4-4c3b8662acb7/rules HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK { "rules": [{ "checks": [], "createdAt": "2018-05-17T12:01:09Z", "description": "Compute the QOS of our servers", "id": "ff130e9b-d226-4465-9612-a93e12799091", "name": "Servers", "updatedAt": "2018-11-09T15:33:06Z" }] }
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – the list of rules
-
POST
/v1/teams/
(team_id)/rules
¶ Add a new rule.
Example request:
POST /v1/teams/66859c4a-3e0a-4968-a5a4-4c3b8662acb7/rules HTTP/1.1 Host: example.com Accept: application/json { "name": "Servers", "description": "Compute the QOS of our servers" }
Example response:
HTTP/1.1 201 CREATED { "checks": [], "createdAt": "2018-05-17T12:01:09Z", "description": "Compute the QOS of our servers", "id": "ff130e9b-d226-4465-9612-a93e12799091", "name": "Servers", "updatedAt": "2018-11-09T15:33:06Z" }
Response Headers: - Content-Type – application/json
Status Codes: - 201 Created – the created rule