Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning
titlePage in development

This page is in development and as such, its contents may be incorrect

The servers API provides functionality that allows a administrator to perform actions such as adding and configuring a server to crawl, or beginning or stopping a crawl

Table of Contents

Section

Get all servers

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

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

Pagination query string parameters

Section

Get all servers, filtered

Lists servers 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/servers/getAll

Pagination query string parameters

Filters: The server filter definition here

Response

Code Block
languagejs
{
  "server": [
    {
      "id": "5d0b35d5-c946-44e7-9be5-97c9ad9036a3",
      "type":   "filesystem",        
      "description": "Local Storage",
      "credential": "cred_0",
      "properties": { This is a dynamic JSON object}
    },
    {
      "id": "5d0b35d5-c946-44e7-9be5-97c9ad9036a4",
      "type": "smb",
      "description": "Remote Storage",
	  "credential": "cred_1",
      "properties": { This is a dynamic JSON object}
    }
  ],
  "from": 100,
  "size": 10,
  "totalItems": 10000
} 

Status: 200




Section

Get a single server

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

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/servers/:id


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the server to return


Response

Code Block
languagejs
{
  "server": {
      "id": "5d0b35d5-c946-44e7-9be5-97c9ad9036a4",
      "type": "smb",
      "description": "Remote Storage",
	  "credential": "cred_1",
      "properties": { This is a dynamic JSON object}
    }
}

Status: 200, 404




Section

Add server(s)

Add servers to Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

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


Body Parameters

NameTypeRequiredDescription
typestringRequired

The type of server to add

descriptionstringRequiredAn optional description of the server
credentialstringOptionalCredential id can be specified for the server
throttlePolicystringOptionalThrottle policy id
routingPoliciesstring arrayOptionalRouting policies ids
propertiesJSONRequiredDynamic JSON object with server properties


Example

Code Block
languagejs
POST /aspire/_api/servers
[{
   "type": "filesystem",
   "description": "Local storage",
   "throttlePolicy": "throttlePolicyId",
   "routingPolicies": ["routingPolicyId1", "routingPolicyId2"],
   "properties": { This will be a dynamic JSON object }
 },
 {
   "type": "filesystem",
   "description": "Remote Storage",
   "credential": "cred_1",
   "properties": { This will be a dynamic JSON object }
}]


Response

Code Block
languagejs
{
  "server": [
    {
      "id": "5d0b35d5-c946-44e7-9be5-97c9ad9036a3",
      "type":   "filesystem",        
      "description": "Local Storage",
      "properties": { This is a dynamic JSON object}
    },
    {
      "id": "5d0b35d5-c946-44e7-9be5-97c9ad9036a4",
      "type": "smb",
      "description": "Remote Storage",
	  "credential": "cred_1",
      "properties": { This is a dynamic JSON object}
    }
  ]
} 

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 server(s)

Update servers in Aspire, this endpoint need the at least the ADMINISTRATOR role to be executed.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/servers/:id

PUT /aspire/_api/servers


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the connector to update


Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the server to update
credentialstringxCredential id can be specified for the server
throttlePolicystringxThrottle policy id
routingPoliciesstring arrayxRouting policies ids
propertiesJSONxDynamic JSON object with server properties

x - at least one field must be present


Example

Code Block
languagejs
PUT /aspire/_api/servers
{
  "AAABcID5GBc=": {
    "id": "AAABcID5GBc=",
    "description": "Local Storage",
    "properties": { This is a dynamic JSON object}
  },
  "AAABcIueWUc=": {
    "id": "AAABcIueWUc=",
    "description": "Remote Storage",
    "credential": "cred_2"
  }
}

Response

Code Block
languagejs
{"response":{"credentialserver":[{"updated":true,"id":"AAABcID5GBc="},{"updated":true,"id":"AAABcID5GBd="}]}} 


Status
: 200, 404, 406



Section

Update servers, filtered

Update servers 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/servers/updateAll

Filters: The server filter definition here

Update body parameter

Code Block
{
  "update" : {
    "description" : "DESCRIPTION"
	"credential" : "credentialId",
	"throttlePolicy" : "throttlePolicyId",
	"properties" : {},
	"routingPolicies" : ["RP_ID1", "RP_ID2", "RP_ID3", ...]
	"routingPolicies.add" : ["RP_ID1", "RP_ID2", "RP_ID3", ...]
	"routingPolicies.remove" : ["RP_ID1", "RP_ID2", "RP_ID3", ...]
  }
}

Response

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

Status: 200, 406

Section

Delete multiple servers, filtered

Delete multiple servers 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/servers/deleteAll

Filters: The server filter definition here

Response

Code Block
languagejs
{
  "message": "optional response message"
}

Status: 200



Section

Delete servers(s)

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

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/servers/:id

DELETE /aspire/_api/servers

POST /aspire/_api/servers/delete


Path Parameters and Query parameters

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


Body Parameter

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


Examples

Code Block
languagejs
DELETE /aspire/_api/servers/AAABcID5GBc

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

POST /aspire/_api/servers/delete
{
  "ids":["AAABcID5GBc","AAABcID5GBd"]
}


Response

Code Block
languagejs
{
  "message": "delete result response message"
}

Status: 200, 404, 406






Section

Filters
Anchor
FiltersAnchor
FiltersAnchor

 Some endpoint queries require a filter. A filter is basically a JSON object with the following format:

Seed filter:

Code Block
languagejs
  "filter" : {
    "ids" : ["ID1", "ID2", "ID3", ...],
    "type" : "TYPE",
    "description" : "DESCRIPTION",
	"credentials" : "credentialId",
	"throttlePolicy" : "throttlePolicyId",
	"routingPolicies" : ["RP1", "RP2", "RP3", ...]
  }