0 / 0
REST Stage in DataStage

REST stage in DataStage

The REST stage makes calls to APIs to retrieve data, send data, and perform other operations through RESTful endpoints.

The REST stage supports one input link and multiple output links, including a reject link. With the REST stage, you can retrieve paginated data, chain requests together, and define variables to reuse values. The REST stage has three tabs:

  • The Stage tab handles requests. Specify details for authentication, request body, saving the response, security, and pagination. You can also define variables to keep track of information such as the number of iterations. For more information, see Rest stage: Stage tab (DataStage).
  • The Input tab is where you define your input data.
  • The Output tab is where you define your output data. You must provide a derivation for each column. Specify JSON.toJson(RESPONSE_BODY) to pass a JSON string to a stage downstream. To pass a column's data directly to a stage downstream, specify the column as the derivation with format <link_name>.<column_name>. To add a reject link, add a primary link, select Is reject link, and select a column for reject messages.

Several examples are provided to help you quickly build and configure your API calls. These examples include demonstrations of how to make calls involving pagination, use variables, chain requests, and obtain authentication tokens. To use one, click Import example in the header of the stage editor and select an example. After import, set variable values and add output columns as needed to handle the data for your specific example.

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more