Skip to main content

Web Service Method: Update Agent Configuration

Abstract

Web Service Method: Update Agent Configuration

Description

This method updates the configuration of an existing agent.

URL: /api/agents/{id}/update

Request

Supported Method

POST

Content-Type

application/json

Path Variables

Variable

Type

Required

Description

id

String

true

Agent ID

JSON Request Object

Attribute Name

Type

Required

Field Name in Index

Comment

Default

url

String

true

URL of the RSS feed

username

String

The creator of the RSS agent

null

periodMillis

Long

RSS feed ingestion interval in milliseconds

86400000

privateContent

Boolean

Content only visible for creator

false

searchSpaceId

String

true

SearchSpace Identifier

source

String

true

dyn_lit_source

Name of the RSS feed

space

String

dyn_lit_space

Context / Space of the document created from RSS feed

null

Response

The response body is empty if the request is successful. Otherwise 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

Update an RSS agent

Update the ingestion interval of an RSS agent from one hour to two hours:

POST /GraphSearch/api/agents/2 HTTP/1.1
Host: localhost
Content-Type: application/json

{
  "url":"http://feeds.bbci.co.uk/news/world/rss.xml",
  "periodMillis":7200000,
  "source":"BBC"
}

Note

The whole configuration of the agent must be present in the request body, otherwise the corresponding configuration will be updated to its default values.

Note

The example above will also update fields username and spaceKey to null and privateContent to false.