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

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
sortModexxstringOptionalxx

Sort mode

  • "asc" for ascending sort,
  • "desc" for descending sort


Response

Code Block
languagejs
{
  "server": [
    {
      "id": "5d0b35d5-c946-44e7-9be5-97c9ad9036a3",
      "type":   "filesystem",        
      "description": { "Local Storage",
      "created": 1596707252548,
	  "idupdated": "filesystem"1596707252548,
      "properties": { This is a dynamic JSON object}
    },
    {
      "nameid": "File System"5d0b35d5-c946-44e7-9be5-97c9ad9036a4",
      }"type": "smb",
      "description": "LocalRemote 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


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,
	  "idupdated": 1596707252548,
      "smb",
  properties": { This is a dynamic JSON object}
    },
    {
      "nameid": "SMB"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


Path Query String Parameters

NameTypeRequiredDescription
idstringRequiredThe id of the server to return


Response

Code Block
languagejs
{
  "server": {
      "id": "5d0b35d5-c946-44e7-9be5-97c9ad9036a397c9ad9036a4",
      "type": {"smb",
       "iddescription": "smbRemote Storage",
       "namecreated": "SMB"
     }1596707252548,
 	    "descriptionupdated": "SMB Net App"1596707252548,
   	  "createdcredential": 1596707252548"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 one or more servers to Aspire

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


Request Body Parameters

NameTypeRequiredDescription
xxtypestringRequired

The type of server to add

descriptionxxxxstringOptionalRequiredAn optional xx description of the server

Examples

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


ExampleAdd a single server

Code Block
languagejs
POST /aspire/_api/servers
[{
   "servertype": "c:\\testdata\\2500filesystem",
   "typedescription": "filesystemLocal storage"
}

Add multiple servers

Code Block
languagejs
POST /aspire/_api/servers
[{
,
   "serverproperties": "c:\\testdata\\2500",
  "type": "filesystem"
},
{
  "server": "c:\\testdata\\250000",
  "connector": "connector_1",
 { This will be a dynamic JSON object }
 },
 {
   "type": "filesystem",
   "description": "250,000Remote filesStorage",
   "credential": "cred_1",
   "policyproperties": "policy_1",
  "workflow": ["workflow_1","workflow_99"]{ 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-97c9ad9036a3",

  }]
}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 one or more servers 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 null

PUT /aspire/_api/servers/:id
Panel
borderColorblack
bgColor#fafafb

PUT /aspire/_api/servers


Request Body Parameters

NameTypeRequiredDescription
idstringRequiredThe identifier of the server to update
xxtypestringRequiredOptional

The type of server to add

descriptionxxxxstringOptionalAn optional xx of description of the server
credentialsstringOptionalCredentials can be specified for the server

Examples

Update a single server

propertiesJSONOptionalDynamic JSON object with server properties (from dxf)


Example

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

{
  "AAABcID5GBc=": {
    "id": "AAABcID5GBc=",
    "serverdescription": "c:\\testdata\\2500Local Storage",
    "type": "filesystem"
}

Update multiple servers

Code Block
languagejs
PUT /aspire/_api/servers
{  },
  "AAABcID5GBcAAABcIueWUc=": {
    "id": "AAABcID5GBcAAABcIueWUc=",
    "serverdescription": "c:\\testdata\\2500Remote Storage",
    "typecredential": "filesystemcred_2"
  },
}

Response

Code Block
languagejs
{
  "AAABcIueWUc=server": [
    {
      "id": "AAABcIueWUc=AAABcID5GBc",
      "servertype":   "c:\\testdata\\250000filesystem",        
      "connectordescription": "connector_1Local Storage",
      "descriptioncreated": 1596707252548,
	  "updated"250,000 files": 1596707252548,
      "properties": { This is a dynamic JSON object}
    },
    "credential{
      "id": "  "cred_1AAABcIueWUc=",
      "policytype": "policy_1smb",
      "workflowdescription": ["workflow_1"Remote Storage","workflow_99"]
  }
}

Response

Code Block
languagejs
{
    "servercreated": [{1596707252548,
	  "updated": 1596707252548,
	  "idcredential": "AAABcID5GBc=cred_1",

    },
  "properties": {
 This is  "id": "AAABcIueWUc=",
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 one or more multiple servers from Aspire., filtered by a specified criteria

Panel
borderColorblack
bgColor#fafafb

DELETE POST /aspire/_api/servers/:iddeleteAll


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 and Query String Parameters

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

ExamplesExample

Delete a single server

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

Delete multiple servers

Code Block
languagejs
DELETE /aspire/_api/servers?id=AAABcID5GBc=&id=AAABcIueWUc=


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

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.