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

List of fields to expand, * will expand everything

Pagination query string parameters

Common filter


Response

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
expandstringOptional
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




Body Parameters

Response

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
NameTypeRequiredDescription
filterJSONRequiredFilters retrieved servers. Check the filter definition here
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 codeDescription200Success

Pagination query string parameters

Common filter




Section

Get a single server

Get information about a single server configured in Aspire

Panel
borderColorblack
bgColor#fafafb

GET /aspire/_api/servers/:id


Path Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the server to return

Query String Parameters

List of fields to expand, * will expand everything
NameTypeRequiredDescription
expandstringOptional


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


Path 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




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

Credentials filter:

Section

Get server type dxf (TODO)

Returns the dxf for a specific server type

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


Path 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
FiltersAnchorFiltersAnchor
Code Block
languagejs
  "filter" : {
    "ids" : ["ID1", "ID2", "ID3", ...],
    "type" : "TYPE",
    "description" : "DESCRIPTION"
  }
NoteWhen using endpoints that use this filter, the filter cannot be empty: at least one field of the filter must be specified.