Versions Compared

Key

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

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

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


Query String Parameters

NameTypeRequiredDescription
fromintegerOptionalIndicates the initial page to be retrieved
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted
sortModestringOptional

Sort mode

  • "asc" for ascending sort,
  • "desc" for descending sort
expandstringOptionalList of fields to expand, * will expand everything


Response

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


Status

Response codeDescription
200Success




Section

Get all servers, filtered

Lists servers configured in the Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/servers/getAll


Query String Parameters

NameTypeRequiredDescription
fromintegerOptionalIndicates the initial page to be retrieved
sizeintegerOptionalSpecifies the size of results page
sortBystringOptionalField by which results are sorted
sortModestringOptional

Sort mode

  • "asc" for ascending sort,
  • "desc" for descending sort
expandstringOptionalList of fields to expand, * will expand everything


Body Parameters

NameTypeRequiredDescription
filterJSONRequiredFilters retrieved servers. Check the filter definition here


Response

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


Status

Response codeDescription
200Success




Section

Get a single server

Get information about a single server configured in Aspire

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/servers/:id


Query String Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the server to return
expandstringOptionalList of fields to expand, * will expand everything


Response

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


Status

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




Section

Add servers

Add servers to Aspire

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


Body Parameters

NameTypeRequiredDescription
typestringRequired

The type of server to add

descriptionstringRequiredAn optional description of the server
credentialsstringOptionalCredentials can be specified for the server
propertiesJSONRequiredDynamic JSON object with server properties (from dxf)


Example

Code Block
languagejs
POST /aspire/_api/servers
[{
   "type": "filesystem",
   "description": "Local storage",
   "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",
      "created": 1596707252548,
	  "updated": 1596707252548,
      "properties": { This is a dynamic JSON object}
    },
    {
      "id": "5d0b35d5-c946-44e7-9be5-97c9ad9036a4",
      "type": "smb",
      "description": "Remote Storage",
      "created": 1596707252548,
	  "updated": 1596707252548,
	  "credential": "cred_1",
      "properties": { This is a dynamic JSON object}
    }
  ]
} 


Status

Response codeDescription
201Created
406Not acceptable - there was an issue validating the input




Section

Update servers

Update servers in Aspire.

Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/servers


Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the server to update
typestringOptional

The type of server to add

descriptionstringOptionalAn optional description of the server
credentialsstringOptionalCredentials can be specified for the server
propertiesJSONOptionalDynamic JSON object with server properties (from dxf)


Example

Code Block
languagejs
PUT /aspire/_api/servers
{
  "AAABcID5GBc=": {
    "id": "AAABcID5GBc=",
    "description": "Local Storage",
    "type": "filesystem"
  },
  "AAABcIueWUc=": {
    "id": "AAABcIueWUc=",
    "description": "Remote Storage",
    "credential": "cred_2"
  }
}

Response

Code Block
languagejs
{
  "server": [
    {
      "id": "AAABcID5GBc",
      "type":   "filesystem",        
      "description": "Local Storage",
      "created": 1596707252548,
	  "updated": 1596707252548,
      "properties": { This is a dynamic JSON object}
    },
    {
      "id": "  "AAABcIueWUc=",
      "type": "smb",
      "description": "Remote Storage",
      "created": 1596707252548,
	  "updated": 1596707252548,
	  "credential": "cred_1",
      "properties": { This is a dynamic JSON object}
    }
  ]
} 


Status

Response codeDescription
201Created
404Not found - a given server identifier was not found
406Not acceptable - there was an issue validating the input




Section

Delete multiple servers, filtered

Delete multiple servers from Aspire, filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

POST /aspire/_api/servers/deleteAll


Body Parameters

NameTypeRequiredDescription
filterJSONRequiredFilters retrieved servers. Check the filter definition here


Response

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

See Response Body for details regrading the response body returned where multiple items are affected with some (or all) returning errors

Status

Response codeDescription
200Success
404Not found - a given credential identifier was not found
406Not acceptable - there was an issue validating the input




Section

Delete single server

Delete a single server from Aspire.

Panel
borderColorblack
bgColor#fafafb

DELETE /aspire/_api/servers/:id


Query String Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the server to delete

Example

Code Block
languagejs
DELETE /aspire/_api/servers/AAABcID5GBc%3D


Response

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


Status

Response codeDescription
200Success
404Not found - a given server identifier was not found
406Not acceptable - there was an issue validating the input




Section

Get server type dxf

Returns the dxf for a specific server type

Panel
borderColorblack
bgColor#fafafb
GET /aspire/_api/servers/type/:typeId/dxf


Query String Parameters

NameTypeRequiredDescription
typeIdstringRequiredThe id of the type for which dxf is going to be retrieved


Response

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


Status

Response codeDescription
200Success
404Not found - a given service identifier was not found




Section

Filters
Anchor
FiltersAnchor
FiltersAnchor

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

Credentials filter:

Code Block
languagejs
  "filter" : {
    "ids" : ["ID1", "ID2", "ID3", ...],
    "type" : "TYPE",
    "description" : "DESCRIPTION"
  }
Note
When using delete endpoints, ids in the filter are mandatory.