Response page of the REST step in DataStage
On the Response page of the REST step, you can specify the response body as a text, a binary data, a file, or a large object (LOB).
If you select Pass the received
body to, you need to select the following properties:
- A text node named body in the Output schema
- Select if the HTTP response body is text and the body node is created in the output schema.
- A binary node named body in the Output schema
- Select if the HTTP response body is binary and the body node of the binary type is created in the output schema.
- A node named bodyLobObject that a downstream connector will process as a binary large object
- Select to get the response body of type binary from the REST web service as a LOB object. The bodyLobObject node of the binary type is created in the output schema.
- A node named bodyLobObject that a downstream connector will process as a character large object
- Select to get the response body of type text from the REST web service as a LOB object. The bodyLobObject node of the character type is created in the output schema.
- A file whose path is set below
- Select to write the response data directly to a file. Then, you
need to specify values for the following properties:
- Output directory
- Specify the directory to store the file that contains the response body.
- Filename prefix
- Specify the prefix name of the file that contains the response body.
Note: If the prefix name of the file is not specified, the job creates the file with the prefix name restPayload.- File extension
- Specify the file extension, for example,.xml or .json.
- Content type
- Select the content type that you expect the response body to have based on the REST call.
- De-compress the received body
- Select to extract the HTTP response body if the Rest service sends the data in compressed format (.gzip).
- Custom headers
- You can extract the headers from the HTTP responses. If the HTTP response does not contain a value for the custom header, the REST step uses the default value that you specified in the headers area of the Response page.
- Custom cookies
- You can extract the cookies from the HTTP responses and send them to the output. If the HTTP response does not contain a value for the custom cookie, the REST step uses the default value that you specified in the cookies area of the Response page.