You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »


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

Get all servers

Lists all the servers configured in the Aspire

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

{
  "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




Get all servers, filtered

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

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

{
  "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




Get a single server

Get information about a single server configured in Aspire

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

{
  "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




Add servers

Add servers to Aspire

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

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

{
  "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




Update servers

Update servers in Aspire.

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

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

Response

{
  "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




Delete multiple servers, filtered

Delete multiple servers from Aspire, filtered by a specified criteria

POST /aspire/_api/servers/deleteAll


Body Parameters

NameTypeRequiredDescription
filterJSONRequiredFilters retrieved servers. Check the filter definition here


Response

{
  "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




Delete single server

Delete a single server from Aspire.

DELETE /aspire/_api/servers/:id


Query String Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the server to delete

Example

DELETE /aspire/_api/servers/AAABcID5GBc%3D


Response

{
  "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




Get server type dxf

Returns the dxf for a specific server type

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

{
  "dxf": {...}
  "message": "optional response message"
}


Status

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




Filters

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

Credentials filter:

  "filter" : {
    "ids" : ["ID1", "ID2", "ID3", ...],
    "type" : "TYPE",
    "description" : "DESCRIPTION"
  }
When using delete endpoints, ids in the filter are mandatory.
  • No labels