HTTP

The purpose of this task is to execute a GET or POST HTTP call for each repository document. If the status is any of the following, then processing will continue, if not, the document will be skipped. This would be useful in cases where you would need to alter the state of an object in another system during migration.

200

OK

205

Reset Content

201

Created

206

Partial Content

202

Accepted

207

Multi-Status (WebDAV)

203

Non-Authoritative Information

208

Already Reported (WebDAV)

204

No Content

226

IM Used (HTTP Delta encoding)


Configuration

To use this task go to the task tab in your job. Select the task from the drop down and click the plus circle to configure the task. Click done after making any changes to save.

Condition check

It will execute the task when the condition's result is 'true', 't', 'on', '1', or 'yes' (case-insensitive), or run on all conditions if left empty. This condition is evaluated for each document, determining whether the task should be executed based on the specified values.

Example: If I only want to run this task for PDF documents I would use the expression: equals('#{rd.mimetype}',"application/pdf")

Username/Password

Credentials to access the endpoint

Action URL

The endpoint being contacted, without parameters.

POST or GET

Selects the HTTP Method.

Request parameters

In the form of param1=value1&m2=value2

Send body with request

The body can be raw text and can use the Expression language.

  • If the text begins with the symbols [ or {, then the body will be need to be valid JSON

Action to take if the call does not return 200 (OK)

  • Audit and Continue will process all documents regardless of the filter.

  • Skip the files will skip the files when they are found to meet any of the filter criteria.

  • Fail the job will processing any further documents

Timeout in milliseconds

How long to wait for the call to execute before attempting to continue.

  • If the timeout is reached, the action selected will be used.


Examples

Following is an example of how to configure the HTTP Task. We are sending a JSONArray as the body. This array will contain a single objects which contains the id and file length of the document. The example given also shows the same object without wrapping it in an array. Both are valid and will be checked for correct JSON syntax.


API Keys

Processor: HTTPTask

Key

Display Name

Type

use_condition Check a condition before executing this task. Boolean

task_condition

Condition

String

task_stop_proc

Stop Processing

Boolean

username

User Name:

String

password

Password:

String

action_url_field

Action URL

String

action_type_field

POST or GET

String

requestParams

Request parameters in the form key1=value1&key2=value2. Values can be expression language

String

sendBody

Send body with request

Boolean

post_field

Request Body in JSON format. Can include expression language values.

String

failAction

Action to take if document doesn't return success status codes (OK)

String

timeout

Client timeout in milliseconds

LONG