Web Service Method: Create an Agent for RSS Tracking and Indexing

Description

This method creates an agent to keep track of an RSS source and index RSS documents in fixed time intervals.

URL: /api/agents/create

Request

Supported Method

POST

Content-Type

application/json

JSON Request Object

Attribute Name

Type

Required

Field Name in Index

Comment

Default

searchSpaceId

String

true

Identifier of the search space

url

String

true

URL of the RSS feed

username

String

false

The creator of the RSS agent

null

periodMillis

Long

false

RSS feed ingestion interval in milliseconds

86400000

privateContent

Boolean

false

Content only visible for creator

false

source

String

true

dyn_lit_source

Name of the RSS feed

space

String

false

dyn_lit_space

Context / Space of the document created from RSS feed

null

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.

Response

The response body is empty and response code is 200 if the request is successful. Otherwise an error message is returned with the 'message' attribute in a JSON response.

Example

Create a Public RSS agent

Index news from BBC and keep track of new entries every hour:

{
  "searchSpaceId":"36abceda-24d2-4861-924f-ddb840305f65",
  "url":"http://feeds.bbci.co.uk/news/world/rss.xml",
  "periodMillis":3600000,
  "source":"BBC"
}
Create a Private RSS agent

Index news from BBC and keep track of new entries every hour. The indexed RSS document entries should be in a space named "private" and the content is only visible to the creator of this agent:

{
  "searchSpaceId":"36abceda-24d2-4861-924f-ddb840305f65",
  "url":"http://feeds.bbci.co.uk/news/uk/rss.xml",
  "periodMillis":3600000,
  "source":"BBC UK",
  "privateContent":true,
  "space":"private"
}