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
Lists all the servers configured in the Aspire
GET /aspire/_api/servers
Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
from | integer | Optional | Indicates the initial page to be retrieved |
size | integer | Optional | Specifies the size of results page |
sortBy | string | Optional | Field by which results are sorted |
sortMode | string | Optional | Sort mode
|
expand | string | Optional | List 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 code | Description |
---|---|
200 | Success |
Lists servers configured in the Aspire, filtered by a specified criteria
POST /aspire/_api/servers/getAll
Query String Parameters
Name | Type | Required | Description |
---|---|---|---|
from | integer | Optional | Indicates the initial page to be retrieved |
size | integer | Optional | Specifies the size of results page |
sortBy | string | Optional | Field by which results are sorted |
sortMode | string | Optional | Sort mode
|
expand | string | Optional | List of fields to expand, * will expand everything |
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
filter | JSON | Required | Filters 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 code | Description |
---|---|
200 | Success |
Get information about a single server configured in Aspire
GET /aspire/_api/servers/:id
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The id of the server to return |
Name | Type | Required | Description |
---|---|---|---|
expand | string | Optional | List 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 code | Description |
---|---|
200 | Success |
404 | The given server id was not found |
Add servers to Aspire
POST /aspire/_api/servers
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
type | string | Required | The type of server to add |
description | string | Required | An optional description of the server |
credentials | string | Optional | Credentials can be specified for the server |
properties | JSON | Required | Dynamic 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 code | Description |
---|---|
201 | Created |
406 | Not acceptable - there was an issue validating the input |
Update servers in Aspire.
PUT /aspire/_api/servers
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the server to update |
type | string | Optional | The type of server to add |
description | string | Optional | An optional description of the server |
credentials | string | Optional | Credentials can be specified for the server |
properties | JSON | Optional | Dynamic 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 code | Description |
---|---|
201 | Created |
404 | Not found - a given server identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete multiple servers from Aspire, filtered by a specified criteria
POST /aspire/_api/servers/deleteAll
Body Parameters
Name | Type | Required | Description |
---|---|---|---|
filter | JSON | Required | Filters 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 code | Description |
---|---|
200 | Success |
404 | Not found - a given credential identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Delete a single server from Aspire.
DELETE /aspire/_api/servers/:id
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Required | The identifier of the server to delete |
Example
DELETE /aspire/_api/servers/AAABcID5GBc%3D
Response
{ "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given server identifier was not found |
406 | Not acceptable - there was an issue validating the input |
Returns the dxf for a specific server type
GET /aspire/_api/servers/type/:typeId/dxf
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
typeId | string | Required | The id of the type for which dxf is going to be retrieved |
Response
{ "dxf": {...} "message": "optional response message" }
Status
Response code | Description |
---|---|
200 | Success |
404 | Not found - a given service identifier was not found |
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" }