Configure Settings for REST

This topic describes how to control the settings when working with REST APIs. Before reviewing this material, check out Try Out API Hub for Design Explore and Explore REST APIs.Try Out API Hub for Design ExploreExplore REST APIs

Set Request Parameters

Headers and Parameters

The Headers & Parameters control displays by default. You can update parameters as follows:

  • Enter parameters in the Path field.

  • Add new parameters to the table.

  • Change current parameter settings.

The following image shows the Headers & Parameters table.

API_screenshot_headers___parameters_01.png

Authorization settings

If your API requires authentication, use the Authorization Settings tab to specify your authorization type and your corresponding credentials.

The following image shows the Authorization Settings panel.

API_screenshot_authorization_settings_01.png

Body settings

In API Hub for Explore the body of an API request is in JSON format by default. The following image shows the menu to change the body request format to XML or plain text.

API_screenshot_body_01.png

You can type text into the Body text box or paste text in.

Connection settings

You use the Connection Settings panel to configure the following settings:

  • Enable URL Encoding

  • Follow Redirects

  • Timeout

The following image shows the Connection Settings panel.

API_screenshot_connection_01.png

View Responses

API Hub for Explore displays the response body at the bottom of the main work area. Click Headers to display the response headers, instead of the body. The following image shows the Headers option located at the left side of the Response section.

API_screenshot_response_-_headers_tab_01.png

View the Raw Data Stream

You have the option to view the raw data stream in API Hub for Explore, instead of parsed output. Simply click the Raw mode slider at the top right of the work area.

Publication date: