The policies API provides functionality that allows a administrator to add, delete or update policies
Easy Heading Free | ||||
---|---|---|---|---|
| ||||
Section | |||||||
---|---|---|---|---|---|---|---|
Get all policiesLists all the policies configured in the Aspire, this endpoint need the at least the OPERATOR role to be executed.
Query String Parameters | |||||||
Name | Type | Required | Description | ||||
from | integer | Optional | Indicates the initial page to be retrieved | ||||
size | integer | Optional | Specifies the size of results page | ||||
sortBy | string | Optional | Field by which results are sorted | ||||
sortMode | string | Optional | Sort mode
|
Section | |||||||
---|---|---|---|---|---|---|---|
Get all policies, filteredLists policies configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the OPERATOR role to be executed.
Pagination query string parameters |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "policycount": [{ "id": "AAABcID5GBc=", "typetotalItems": "throttle", "description": "Europe Net Appliance throttle"3 }, "timeUnitpolicy": "m", "timeUnitRate": "1", "numberOfDocuments": "100" }, [ { "id": "AAABcIueWUc=10653921-1b27-40b5-9d7a-f54ef1e3ad01", "type": "routethrottle", "description": "All serversthrottleDesc", "tags "period": ["US","UKminute","DEU"] }] } |
Status
Lists policies configured in the Aspire, filtered by a specified criteria
Panel | ||||
---|---|---|---|---|
| ||||
|
Query String Parameters
"value": 5
},
{
"id": "14822610-a387-44cf-a5ed-3e05618efb57",
"type": "throttle",
"description": "throttleDesc",
"period": "day",
"value": 333
},
{
"id": "e10af522-5830-4105-9886-3385499202ba",
"type": "route",
"description": "routim to cz",
"routeTo": "CZZZ"
}
]
} |
Status: 200
Name | Type | Required | Description | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
from | integer | Optional | Indicates the initial page to be retrieved | |||||||||||||||||||
size | integer | Optional | Specifies the size of results page | |||||||||||||||||||
sortBy | string | Optional | Field by which results are sorted | |||||||||||||||||||
sortMode | string | Optional | Sort mode
| |||||||||||||||||||
Name | Type | Required | Description | |||||||||||||||||||
filter | JSON | Required | Filters retrieved policies. Check the filter definition here |
Code Block | ||
---|---|---|
| ||
{
"policy": [{
"id": "AAABcID5GBc=",
"type": "throttle",
"description": "Europe Net Appliance throttle",
"timeUnit": "m",
"timeUnitRate": "1",
"numberOfDocuments": "100"
},
{
"id": "AAABcIueWUc=",
"type": "route",
"description": "All servers",
"tags": ["US","UK","DEU"]
}]
} |
Status
Gets information about a single policy configured in Aspire, this endpoint need the at least the OPERATOR role to be executed.
Panel | ||||
---|---|---|---|---|
| ||||
|
Query String Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The id of the policy to return |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "policy": { "id": "AAABcID5GBc=10653921-1b27-40b5-9d7a-f54ef1e3ad01", "type": "throttle", "description": "Europe Net Appliance throttlethrottleDesc", "timeUnitperiod": "mminute", "timeUnitRatevalue": "1", "numberOfDocuments": "100" } } |
Status
5
} |
Status: 200, 404
Section | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Addmultiple policiespolicy(ies)Adds multiple policies to Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
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
DeleteIncremental type:
Example
Status | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response code | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
201 | Created | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
406 | Not acceptable - there was an issue validating the input | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Section | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Response
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", "timeUnitperiod": "mminute", "timeUnitRatevalue": "1100", "numberOfDocuments": "100" } |
Response
Code Block | ||
---|---|---|
| ||
{}, "policy": [{ "id": "AAABcID5GBcAAABcID5GBd=", "type": "throttleroute" "description": "Europe Net Appliance throttleAll servers", "timeUnitrouteTo": "mUS" }, { "timeUnitRateid": "1AAABcID5GBe=", "numberOfDocuments "type": "deleteIncremental", "description": "Days before delete", "deletesPolicy": "AFTER_DAYS", "value": "1001" }] } |
Status
,
{
"id": "AAABcID5GBf=",
"type": "deleteIncremental",
"description": "Iterations before delete",
"deletesPolicy": "AFTER_INCREMENTALS",
"value": "2"
},
{
"id": "AAABcID5GBg=",
"description": "default immediate policy",
"deletesPolicy": "IMMEDIATE",
"deleteCheckAfterErrors": "ALWAYS"
}
]
} |
See Response Body for details regarding the response body returned where multiple items are affected with some (or all) returning errors
Status: 201, 406
Section | |||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Update policy(ies)Update policies in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.
Body Parameters
x - at least one field must be present Example
Update multiple policiesUpdate multiple policies in Aspire.
Body Parameters | |||||||||||||||||||||||||||||||||||||||||||||||||
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=": {
"id": "AAABcID5GBc=",
"type": "throttle"
"description": "Europe Net Appliance",
"timeUnit": "s",
"timeUnitRate": "1",
"numberOfDocuments": "10"
},
"AAABcID5GBd=": {
"id": "AAABcID5GBd=",
"type": "route"
"description": "German server",
"tags": ["DEU"]
}
} |
Response
Code Block | ||
---|---|---|
| ||
{ "policy": [{ "id": "AAABcID5GBc=", "type": "throttle" "description": "Europe Net Appliance", "timeUnit": "s", "timeUnitRate": "1", "numberOfDocumentsvalue": "10100" }, "AAABcID5GBd=": { "id": "AAABcID5GBd=", "type": "route" "description": "German server", "tagsrouteTo": ["DEUUS"] }] } |
Status
,
"AAABcID5GBe=": {
"id": "AAABcID5GBe=",
"description": "default immediate policy",
"deleteCheckAfterErrors": "NEVER"
},
"AAABcID5GBf=": {
"id": "AAABcID5GBf=",
"description": "Iterations before delete",
"value": "3"
} |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{"policy":[{"updated":true,"id":"AAABcID5GBc="},{"updated":true,"id":"AAABcID5GBd="},{"updated":true,"id":"AAABcID5GBe="},{"updated":true,"id":"AAABcID5GBf="}]} |
Status: 200, 404, 406
Section | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Update policies, filteredUpdate policies configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.
|
Update a single policy in Aspire.
Panel | ||||
---|---|---|---|---|
| ||||
|
Query String Parameters
Body Parameters
Other parameters passed in the request body will depend on the type of policy being created - see Add a Policy above
Example
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": [
|
Response |
|
|
|
|
Status: 200, 406 |
Section | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete policy(ies)Delete one or more policies from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed. Delete multiple policies, filteredDelete multiple policies from Aspire, filtered by a specified criteria
Path Parameters and Query parametersBody Parameters
Response
See Response Body for details regrading the response body returned where multiple items are affected with some (or all) returning errors Status | |||||||||||||||||||||||||||||||||||||||
Response code | Description | ||||||||||||||||||||||||||||||||||||||
200 | Success | ||||||||||||||||||||||||||||||||||||||
404 | Not found - a given credential identifier was not found | ||||||||||||||||||||||||||||||||||||||
406 | Not acceptable - there was an issue validating the input | ||||||||||||||||||||||||||||||||||||||
Section |
Panel | ||||
---|---|---|---|---|
| ||||
|
Query String Parameters
Example
Code Block | ||
---|---|---|
| ||
DELETE /aspire_api/policies/AAABcID5GBc%3D |
Delete multiple policies
Response
Code Block | ||
---|---|---|
| ||
{
"message": "optional response message"
} |
Status
The identifier(s) of the policy (s) to delete |
Body Parameter
Name | Type | Required | Description |
---|---|---|---|
ids | string | Required | The identifier(s) of the policy(s) to delete |
Examples
Code Block | ||||
---|---|---|---|---|
| ||||
DELETE /aspire/_api/policies/AAABcID5GBc
DELETE /aspire/_api/policies?id=AAABcID5GBc&id=AAABcID5GBd
POST /aspire/_api/policies/delete
{
"ids":["AAABcID5GBc","AAABcID5GBd"]
}
|
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{
"message": "delete result response message"
} |
Status: 200, 404, 406
Section | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delete multiple policies, filteredDelete multiple policies from Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.
Response
Status: 200 |
Section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Export policy(ies)Export one or more policy from Aspire, this endpoint needs at least the OPERATOR role to be executed.
Path Parameters and Query parameters
Body Parameter
Examples
Response
Status: 200, 404, 406
|
Section |
---|
ImportThe import usage can be found here |
Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Filters
Connector filter:
| |||||||||||||
Section | |||||||||||||
Filters Anchor | | FiltersAnchor | FiltersAnchor |
Code Block | ||
---|---|---|
| ||
"filter" : { "ids" : ["id1ID1", "id2ID2", "id3ID3", ...], "type" : "TYPE", "description" : "DESCRIPTION", "artifact" : } | ||
Note | ||
When using delete endpoints, ids in the filter are mandatory."ARTIFACT"
}
} |