Skip to main content

Web Service Method: Request Agents Configuration

Abstract

Web Service Method: Request Agents Configuration

Description

This method retrieves all configured agents of a Search Space.

URL:/api/agents

Content-Type

application/json

Request

Supported Methods

GET

HTTP Parameters

Parameter

Comment

Type

Required

searchSpaceId

ID of the search space

String

true

Response

This method returns agent configurations in JSON format. In case the request was not successful, an error message is returned with the 'message' attribute in a JSON response.

Note

The return to this request will display these errors in the following specific cases:

  • If the Search Space ID is wrong, you will receive a 404 'Bad Request' message, with specific information in a JSON message as to the value that was not found.

  • If the credentials were mistyped or wrong: a 403 Forbidden, and a JSON message 'Access denied' will be returned.

  • If you didn't specify a Search Space ID: the return will be made for the default Search Space.

    • If the default Search Space is private and you are not authenticated, you will also receive a 403 Forbidden in a JSON message.

Example

Get all Agents

Example Request

GET /GraphSearch/api/agents?searchSpaceId=fc101c6f-6a8a-4123-8d0a-7998be1cfd65

Example Response

[
  {
    "id": 2,
    "configuration": {
      "username": null,
      "privateContent": false,
      "periodMillis": 7200000,
      "spaceKey": null,
      "source": "BBC",
      "url": "http://feeds.bbci.co.uk/news/world/rss.xml"
    }
  },
  {
    "id": 7,
    "configuration": {
      "username": "yyz",
      "privateContent": true,
      "periodMillis": 3600000,
      "spaceKey": null,
      "source": "BBC UK",
      "url": "http://feeds.bbci.co.uk/news/uk/rss.xml"
    }
  }
]