Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


The policy policies API provides functionality that allows a administrator to add, delete or update policies

toc
Easy Heading Free
navigationTitleOn this Page
navigationExpandOptionexpand-all-by-default

Section
List

Get all policies

Lists all the policies configured in the Aspire, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb
GET /aspire/_api/policy

Query String Parameters

NameTypeRequiredDescription
typestringOptionalFilter returned seeds to only those with the given type
policies

Pagination query string parameters

Sorting query string parameters

Section

Get all policies, filtered

Lists policies configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/policies/getAll

Pagination query string parameters

Sorting query string parameters

Common filter

descriptionstringOptionalFilter returned seeds to only those whose description matches the given expression

Response

Code Block
languagejs
themeRDark
{
    "count": {
        "totalItems": 3
    },
    "policy": [
        {
            "id": "AAABcID5GBc=10653921-1b27-40b5-9d7a-f54ef1e3ad01",
            "type": "filesystem",
    ...
  },
  "throttle",
            "description": "throttleDesc",
            "period": "minute",
            "value": 5
        },
        {
            "id": "AAABcIueWUc=14822610-a387-44cf-a5ed-3e05618efb57",
            "type": "filesystemthrottle",
            "description": "throttleDesc",
            "period": "day",
     ...
  }],
  "message": "optional response message"
}

Status

Response codeDescription200Success
       "value": 333
        },
        {
            "id": "e10af522-5830-4105-9886-3385499202ba",
            "type": "route",
            "description": "routim to cz",
            "routeTo": "CZZZ"
        }
    ]
}

Status: 200




: 200, 404

Section

Get single policy

Gets

Section

Get a single policy

Get information about a single policy configured in Aspire, this endpoint need the at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire_api/policy?id=:idGET /aspire_api/policypolicies/:id


Query String and Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the policy to return


Response

Code Block
languagejs
themeRDark
{
  "policyid": {"10653921-1b27-40b5-9d7a-f54ef1e3ad01",
    "idtype": "AAABcID5GBc=throttle",
    "typedescription": "filesystemthrottleDesc",
    ...
 }"period": "minute",

  "messagevalue": "optional response message"5
}

Status

Response codeDescription
200Success
404The given seed id was not found




:


Throttle type:

Section

Add policy(

s

ies)

Add one or more Adds policies to Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb
POST /aspire/_api/policypolicies


Request Body Parameters

NameTypeRequiredDescription
typestringRequired

The type of

connector to use for this seed (may be omitted if connector is specified)

policy to add

  • "throttle"
  • "route"
  • "deleteIncremental (5.0.2)"
descriptionstringOptionalRequiredAn optional description of the seedpolicy


Other parameters passed in the request body will depend on the type of policy being created - those required by Documentum will be different from those required by SharePoint. Some candidates are shown below

NameDescription
domainAn Active Directory/LDAP domain
usernameA username
passwordA password
emailA user email address
APIkeyAn API key
tokenan access token
NameTypeRequiredDescription
periodstringRequiredTime unit of the throttling policy - second, minute, hour, day
valueintRequiredNumber of documents per time unit for the throttling policy


Route type:

NameTypeRequiredDescription
routeTostringRequiredA route to tag


DeleteIncremental type:

Name TypeRequriedDescription
deletesPolicyDeletesPolicyRequired
  • IMMEDIATE  - policy will be processed immediately, also is taken to consideration, if should be done after errors (property deleteCheckAfterError).
  • AFTER_DAYS - policy will be processed after number of days, number of days are stored in property value.
  • AFTER_INCREMENTALS - policy will be processed after number of incrementals, number of incrementals are stored in property value.
deleteCheckAfterErrorsenum DeleteCheckAfterErrorsRequired for a variant IMMEDIATE

Checks if "delete" candidates still exist after an incremental when they are part of scan error.

  • ALWAYS - policy will be processed even if errors are found. 
  • NEVER - policy will be not processed when errors are found.
valueintRequired for a variant AFTER_DAYS, AFTER_INCREMENTALSNumber of days or iterations. Valid value is also -1, that means that sends the deletes immediately since the last time the URLs were accessed.


Example

Examples

Add a single policy

Code Block
languagejs
themeRDark
POST /aspire_api/policies
[{
  "type": "filesystemthrottle",
  "description": "Europe Net Appliance throttle",
  "period": "minute"
  ...
}

Add multiple policys

Code Block
languagejs
[,
  "value": "100"
},
{
  "type": "route",
  "description": "German servers",
  "routeTo": "US"
},
{
  "type": "deleteIncremental",
  "description": "Days before delete",
  "deletesPolicy": "AFTER_DAYS",
  "value": "1"
},
{
  "type": "filesystemdeleteIncremental",
  "description": "Iterations before delete"Europe Net Appliance"
  ...,
  "deletesPolicy": "AFTER_INCREMENTALS",
  "value": "2"
},
{
  "type": "sharepointdeleteIncremental",
  "description": "SP Online"
  ...
}default immediate policy",
  "deletesPolicy": "IMMEDIATE",
  "deleteCheckAfterErrors": "ALWAYS"
},

]


Response

Code Block
languagejs
themeRDark
{
  "policy": [{
    "id": "AAABcID5GBc=",
    "type": "filesystemthrottle"
    "description": "Europe Net Appliance throttle",
    "period": "minute",
    ..."value": "100"
   },
   {
    "id": "AAABcID5GBd=",
    "type": "AAABcIueWUc=route"
    "description": "All servers",
    "routeTo": "US"
   },
	{
    "id": "AAABcID5GBe=",
    "type": "deleteIncremental",
  	"description": "Days before delete",
  	"deletesPolicy": "AFTER_DAYS",
  	"value": "1"
   },
	{
    "id": "AAABcID5GBf=",
    "type": "sharepointdeleteIncremental",
    "description": "SP Online"Iterations before delete",
    "deletesPolicy": "AFTER_INCREMENTALS",
    ..."value": "2"
  }] },
	{
    "id": "AAABcID5GBg=",
    "description": "default immediate policy",
  	"messagedeletesPolicy": "IMMEDIATE"optional response message"
}

Status

Response codeDescription201Created
,
  	"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

406Not acceptable - there was an issue validating the input




Not acceptable - there was an issue validating the input
Section

Update policy(

s

ies)

Update one or more policys 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 nullpolicies in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/

policy

policies/:id

PUT /aspire/_api/policies

Request Body Parameters

typedescription
NameTypeRequiredDescription
idstringRequiredThe identifier of the seed policy to update
descriptionstringRequiredThe type of connector to use for this seed (may be omitted if connector is specified)xA description
periodstringOptionalAn optional description of the seed

Other parameters passed in the request body will depend on the type of policy being created - see Add policy(s) above

Examples

xTime unit of the throttling policy - second, minute, hour, day
valueintxNumber of documents per time unit for the throttling policy, number of days or iterations for delete Incremental policy
routeTostringxA route to tag
deleteCheckAfterErrors

enum

DeleteCheckAfterErrors

xChecks if "delete" candidates still exist after an incremental when they are part of scan error.  (ALWAYS/NEVER)

x - at least one field must be present

ExampleUpdate a single policy

Code Block
languagejs
themeRDark
PUT /aspire_api/policies
{
  "AAABcID5GBc=": {
    "id": "AAABcID5GBc=",
    "typedescription": "filesystemEurope Net Appliance",
    "descriptionperiod": "Europe Net Applianceminute",
    "value": "100"
  ...
}

Update multiple policies

Code Block
languagejs
[{
},
  "AAABcID5GBd=": {
    "id": "AAABcID5GBcAAABcID5GBd=",
    "typedescription": "filesystemGerman server",
    "descriptionrouteTo": "Europe Net ApplianceUS"
  ...
},
"AAABcID5GBe=": {
    "id": "AAABcIueWUcAAABcID5GBe=",
    "typedescription": "sharepointdefault immediate policy",
    "descriptiondeleteCheckAfterErrors": "SP OnlineNEVER"
  ...
}]

Response

Code Block
languagejs
{
  "policy},
"AAABcID5GBf=": [{
    "id": "AAABcID5GBcAAABcID5GBf=",
    "typedescription": "filesystemIterations before delete",
    "descriptionvalue": "3"Europe Net Appliance"
    ...
   },
   {
 }


Response

Code Block
languagejs
themeRDark
{"policy":[{"updated":true,"id":"AAABcID5GBc="},{"updated":true,"id":"AAABcID5GBd="},{"updated":true,"id":"AAABcID5GBe="},{"updated":true,"id":"AAABcID5GBf="}]}


Status
: 200, 404, 406


Section

Update policies, filtered

Update policies configured in the Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/policies/updateAll

Common filter

Update body parameter

Code Block
themeRDark
{
  "update" : {
    "description" : "DESCRIPTION"
    "
id
period" : "
AAABcIueWUc=
PERIOD"
,

    "
type
value" : "
sharepoint
VALUE"
    "
description
routeTo" : "
SP Online
ROUTE_TO"
    
...
"deleteCheckAfterErrors" : "NEVER"
  
}],
}
}

Response

Code Block
languagejs
themeRDark
{
  "message": "
optional
update result response message"
}

Status

Response codeDescription
201Created
404Not found - a given seed identifier was not found
406

: 200, 406




Section

Delete policy(

s

ies)

Delete one or more policies from Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/policies/policy?id=:id

DELETE /aspire/_api/policy/:idpolicies

POST DELETE /aspire/_api/policies/policydelete


Query String, Path Parameters and Request Body ParametersQuery parameters

NameTypeRequiredDescription
idstringRequiredThe identifier(s) of the policy(s) to delete

Examples

Delete a single policy


Body Parameter

NameTypeRequiredDescription
idsstringRequiredThe identifier(s) of the policy(s) to delete


Examples

Code Block
languagejs
themeRDark
DELETE /aspire/_api/policies/AAABcID5GBc

DELETE /aspire/_api/policies?id=AAABcID5GBc&id=AAABcID5GBd

POST /aspire/_api/policies/delete
{
  "idids": ["AAABcID5GBc=","AAABcID5GBd"]
}


Delete multiple seedsResponse

Code Block
languagejs
themeRDark
[{
  "idmessage": "AAABcID5GBc=delete result response message"
},

Status: 200, 404, 406


Section

Delete multiple policies, filtered

Delete multiple policies from Aspire, filtered by a specified criteria, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/policies/deleteAll

Common filter


Response

Code Block
languagejs
themeRDark
{
  "
id
message": "
AAABcIueWUc=" }]
delete result response message"
}

Status: 200




Not acceptable - there was an issue validating the input
Section

Export policy(ies)

Export one or more policy from Aspire, this endpoint needs at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/policies/export

GET /aspire/_api/policies/export/:id

POST /aspire/_api/policies/exportAll

Info

Every configuration item has the option to export from the UI, using the single menu or by the bulk actions:

Image AddedImage Added

Note

Something important that you need to know is that when you export a config item that depends on another, the export will contain also all the dependencies.

Note

Take into consideration that components with resources loaded into elastic, will be exported, but the resource itself will not, so you will need to reupload the resource and go and select your resource in the component again.


Path Parameters and Query parameters

NameTypeRequiredDescription
idstringRequiredThe identifier(s) of the policy(ies) to export


Body Parameter

NameTypeRequiredDescription
idsstringRequiredThe identifier(s) of the policy(ies) to export


ExamplesDelete multiple policies (alternative form)

Code Block
languagejs
themeRDark
GET /aspire/_api/policies/export/AAABcID5GBc

DELETE /aspire/_api/policies/export?id=AAABcID5GBc&id=AAABcID5GBd

POST /aspire/_api/policies/export
{
  "idids": ["AAABcID5GBc=", "AAABcIueWUc=AAABcID5GBd"]
}


Response

Code Block
languagejs
themeRDark
{
  "export": {
    "policies": {
   "message": "optional response message"
}

Status

Response codeDescription
200Success
404Not found - a given seed identifier was not found
406
   "policy": [
        {
          "id": "<policy_id>",
          "type": "deleteIncremental",
          "description": "pD",
          "deletesPolicy": "IMMEDIATE",
          "deleteCheckAfterErrors": "ALWAYS"
        },
        ...
      ]
    }
  }
}

Status: 200, 404, 406


Section

Export multiple policies, filtered

Export multiple policies from Aspire, filtered by a specified criteria, this endpoint needs at least the OPERATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/policies/exportAll

Filters: The connection filter definition here

Response

Code Block
languagejs
themeRDark
{
  "export": {
    "policies": {
      "policy": [
        {
          "id": "<policy_id>",
          "type": "deleteIncremental",
          "description": "pD",
          "deletesPolicy": "IMMEDIATE",
          "deleteCheckAfterErrors": "ALWAYS"
        },
        ...
      ]
    }
  }
}

Status: 200




Section

Import

The import usage can be found here





Section

Filters
Anchor
FiltersAnchor
FiltersAnchor

Connector filter:

Code Block
languagejs
themeRDark
{  
  "filter" : {
    "ids" : ["ID1", "ID2", "ID3", ...],
    "type" : "TYPE",
    "description" : "DESCRIPTION",
	"artifact" : "ARTIFACT"
  }
}