Web Service Method: Request Agent Status

Description

This method retrieves the status of an agent of a Search Space.

URL:/api/agents/status

Content-Type

application/json

Request

Supported Methods

GET

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.

HTTP Parameters

Parameter

Comment

Type

Required

searchSpaceId

ID of the search space

String

true

Response

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

Example

Get all Agents:

Example Request

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

Example Response

[
    {
        "agent": {
            "id": "https://makemeacocktail.com/feeds/blog.xml",
            "configuration": {
                "searchSpaceId": "42c0d2bb-10f5-4628-92de-b09b16dc3efd",
                "username": "rss-user",
                "privateContent": false,
                "periodMillis": 3600000,
                "context": "context A",
                "source": "Cocktails",
                "url": "https://makemeacocktail.com/feeds/blog.xml"
            }
        },
        "status": {
            "lastRun": 1538053915364,
            "running": false,
            "nextRun": 1538057515364
        }
    }
]