The policy API provides functionality that allows a administrator to add, delete or update policies
Lists all the policies configured in the Aspire
GET /aspire_api/policy
Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
type | string | Optional | Filter returned seeds to only those with the given type |
description | string | Optional | Filter returned seeds to only those whose description matches the given expression |
Response
{ "policy": [{ "id": "AAABcID5GBc=", "type": "throttle", ... }, { "id": "AAABcIueWUc=", "type": "execution", ... }], "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
Get information about a single policy configured in Aspire
GET /aspire_api/policy?id=:id
GET /aspire_api/policy/:id
Query String and Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The id of the policy to return |
Response
{ "policy": { "id": "AAABcID5GBc=", "type": "throttle", ... }, "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | The given seed id was not found |
Adds one policy to Aspire
POST /aspire_api/policy
Request Body Parameters
Name | Type | Required | Description |
---|---|---|---|
type | string | Required | The type of policy to add |
description | string | Optional | An optional description of the seed |
Other parameters passed in the request body will depend on the type of policy being created
Examples
Add a single policy
{ "type": "Throttle" "description": "Europe Net Appliance throttle" ... }
Response
{ "policy": { "id": "AAABcID5GBc=", "type": "throttle" "description": "Europe Net Appliance" ... }, "message": "optional response message" }
Status
Response code | Description |
---|---|
201 | Created |
406 | Not acceptable - there was an issue validating the input |
Update a policy in Aspire. Updates will be treated as partial updates rather than overwrites. If a field is not present in the input, any previous value will remain after the update. If you wish to "delete" a value, pass a value of null
PUT /aspire_api/policy
Request Body Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the policy to update |
type | string | Required | The type of policy |
description | string | Optional | An optional description of the seed |
Other parameters passed in the request body will depend on the type of policy being created - see Policy API above
Examples
Update a single policy
{ "id": "AAABcID5GBc=", "type": "throttle" "description": "Europe Net Appliance" ... }
Response
{ "policy": { "id": "AAABcID5GBc=", "type": "throttle" "description": "Europe Net Appliance" ... }, "message": "optional response message" }
Status
Response code | Description |
---|---|
201 | Created |
404 | Not found - a given seed identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete one or more policies from Aspire.
DELETE /aspire_api/policy?id=:id
DELETE /aspire_api/policy/:id
DELETE /aspire_api/policy
Query String, Path and Request Body Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier(s) of the policy(s) to delete |
Examples
Delete a single policy
{ "id": "AAABcID5GBc=" }
Delete multiple seeds
[{ "id": "AAABcID5GBc=" }, { "id": "AAABcIueWUc=" }]
Delete multiple policies (alternative form)
{ "id": ["AAABcID5GBc=", "AAABcIueWUc="] }
Response
{ "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given seed identifier was not found |
406 | Not acceptable - there was an issue validating the input |