REST CallJob configuration specifications
A versatile job type that runs an arbitrary REST/HTTP/Solr command.
To create a REST Call job, sign in to Managed Fusion and click Collections > Jobs. Then click Add+ and in the Custom and Other Jobs section, select REST Call. You can enter parameters to configure the job. If the field has a default value, it is populated when you click to add the job.
The parameters for this job are:
-
ID. The user-defined name for this job. This is the
id
field in the configuration file. Required field. -
Endpoint URI. The name or location of the data this job searches. This is the
uri
field in the configuration file. Required field. -
Call method. The operation submitted in the request. Values are GET, POST, PUT, or DELETE. This is the
method
field in the configuration file. Required field. -
Query parameters. This section lets you enter
property name:property value
options submitted in the query. This is thequeryParams
field in the configuration file. Optional field. -
Request protocol headers. This section lets you enter
property name:property value
protocol headers submitted in the query. This is theheaders
field in the configuration file. Optional field. -
Request entity. The request string to submit for the query. This is the
entity
field in the configuration file. Optional field.
Example configuration
This example configures this type of job to delete your old signals data:
-
Navigate to Collections > Jobs.
-
Click Add and select REST Call.
The REST Call job configuration panel appears.
-
Enter an arbitrary ID for this job, such as "Delete-old-signals".
-
Enter the following endpoint URI, substituting the name of your signals collection for
signalsCollectionName
:solr://signalsCollectionName/update
-
In the Call Method field, select "post".
-
Under Query Parameters, enter the property name "wt" with the property value "json".
-
In the Request entity (as string) field, enter the following:
<root><delete><query>timestamp_tdt:[* TO NOW-2WEEKS]</query></delete><commit /></root>
See Working with Dates for details about date formatting.
Your job configuration should look similar to this:
You can configure a schedule for this job at System > Scheduler. |