The policies API provides functionality that allows a administrator to add, delete or update policies
Table of Contents |
---|
Section | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get all policiesLists all the policies configured in the Aspire
Query String Parameters
Response
Status
|
Section | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get all policies, filteredLists policies configured in the Aspire, filtered by a specified criteria
Query String Parameters
Body Parameters
Response
Status
|
Section | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get single policyGets information about a single policy configured in Aspire
Query String Parameters
Response
Status
|
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AddmultiplepoliciesAdds multiple policies to Aspire
Request Body Parameters
Other parameters passed in the request body will depend on the type of policy being created: Throttle type:
Route type:
Example
Response
Status | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Response code | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||
201 | Created | ||||||||||||||||||||||||||||||||||||||||||||||||||||
406 | Not acceptable - there was an issue validating the input | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Add single policyAdds a single policy to Aspire
Request Body Parameters | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Name | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
type | string | Required | The type of policy to add
| ||||||||||||||||||||||||||||||||||||||||||||||||||
description | string | Optional | An optional description of the policy | ||||||||||||||||||||||||||||||||||||||||||||||||||
Name | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
timeUnit | string | Required | Time unit of the throttling policy | ||||||||||||||||||||||||||||||||||||||||||||||||||
timeUnitRate | int | Required | The rate at which each time unit is throttled | ||||||||||||||||||||||||||||||||||||||||||||||||||
numberOfDocuments | int | Required | Number of documents per time unit for the throttling policy | ||||||||||||||||||||||||||||||||||||||||||||||||||
Name | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
tags | array of strings | Required | Tags for the routing policy |
Code Block | ||
---|---|---|
| ||
POST /aspire/_api/policies
{
"type": "Throttle",
"description": "Europe Net Appliance throttle",
"timeUnit": "m",
"timeUnitRate": "1",
"numberOfDocuments": "100"
} |
Response
Code Block | ||
---|---|---|
| ||
{ "policy": [{ "id": "AAABcID5GBc=", "type": "throttle" "description": "Europe Net Appliance throttle", "timeUnit": "m", "timeUnitRate": "1", "numberOfDocuments": "100" }] } |
Status
Response code | Description |
---|---|
201 | Created |
406 | Not acceptable - there was an issue validating the input |
Section | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UpdatemultiplepoliciesUpdate multiple policies policies in Aspire.
Body Parameters
Other parameters passed in the request body will depend on the type of policy being created - see Add a Policy above Example
Response
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 | ||||||||||||||||||||||||||||||||
Section | |||||||||||||||||||||||||||||||||
Update single policyUpdate a single policy in Aspire.
Query String Parameters | |||||||||||||||||||||||||||||||||
Name | Type | Required | Description | ||||||||||||||||||||||||||||||
id | string | Required | The identifier of the policy to update | ||||||||||||||||||||||||||||||
Name | Type | Required | Description | ||||||||||||||||||||||||||||||
id | string | Required | The identifier of the policy to update | ||||||||||||||||||||||||||||||
type | string | Optional | The type of policy | ||||||||||||||||||||||||||||||
description | string | Optional | An optional description of the seed |
Code Block | ||
---|---|---|
| ||
PUT /aspire_api/policies/AAABcID5GBc%3D
{
"id": "AAABcID5GBc=",
"type": "throttle"
"description": "Europe Net Appliance",
"timeUnit": "s",
"timeUnitRate": "1",
"numberOfDocuments": "10"
} |
Response
Code Block | ||
---|---|---|
| ||
{ "policy": [{ "id": "AAABcID5GBc=", "type": "throttle" "description": "Europe Net Appliance", "timeUnit": "s", "timeUnitRate": "1", "numberOfDocuments": "10" }] } |
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 |
Section | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete multiple policies, filteredDelete multiple policies from Aspire, filtered by a specified criteria
Body Parameters
Response
See Response Body for details regrading the response body returned where multiple items are affected with some (or all) returning errors Status
|
Section | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete policyDelete a single policy from Aspire.
Query String Parameters
Example
Delete multiple policies Response
Status
|
Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Filters
Some endpoint queries require a filter. A filter is basically a JSON object with the following format: Credentials filter:
|