Creating a data service from API Gateway
- On the Data Services page, click New.
- In the Create from Wizard dialog box, select API Gateway.
- Click Create.
- In the Create Data Service - Find API dialog box, specify this information:
- Search
- Optionally, specify a word related to the API.
- Suite
- Optionally, select an application suite.
- Methods
- Select the applicable HTTP methods.
- Click Search.
- From the search results, find the API and click Select.
To view the API’s input and output parameters, click Details.
- Optionally, in the Create Data Service > Name & Description section, modify the data service name, description, and assign tags.
- Click Next.
- Optionally, in the Create Data Service > Input section, perform these steps:
- In the Response Information section, specify this information:
- HTTP Method
- Select the type of HTTP action to take with the API request.
- API Relative URL
-
This field displays the relative URL for the API.
Click the Edit icon to change the relative URL.
Note: If you change the relative URL, the input parameters changes as well. - Request Header
-
This field displays the request header information for the API request.
Click the Edit icon to add or remove header parameters.
- View/Edit JSON
-
Click this icon to view and edit the JSON code schema and template.
Note: This button is enabled for PUT and POST APIs only. This button requires a JSON body.
- In the Input Parameters section, select Add Parameter.
- Specify this information:
- Required
- Click this check box to set a parameter as required.
- Alias
- Optionally, specify a name to replace the original parameter name.
- Default
-
Optionally, specify the value to filter data service on first load.
Note: The default value is used when a value is null or undefined. If a real value is present, the default value is ignored.
- To view information about JSONPath, click JSON Help.
- To delete a parameter, click theDelete icon.
- In the Response Information section, specify this information:
- Optionally, test the data service:
Note: The selected data service runs in the target system.
- Click Test Data Service.
- In the Test Data Service dialog box, specify values for the input parameters.
- Click Run Data Service.
- In the Response Body field, verify if the content is correct.
- Click OK.
- Click Next.
- Optionally, in the Create Data Service > Output section, perform these steps:
- In the Response Information section, select the response output type.
- JSON: This option requires the response data to be in JSON format.
- File: This option requires the response data to be imported from a file, as specified in the Response alias field.
- If you select File, specify the response alias.
- If you select JSON, specify this information:
- View/Edit JSON
-
Click this icon to view and edit the JSON code schema and template.
Note: This button is enabled for PUT and POST APIs only. This button requires a JSON body.
- Root Element
- Specify the JSON root element.
- Object ID
- Specify a unique key. This key is used for selecting items on refresh.
- In the Output Parameters section, select Add Parameter.
- Specify this information:
- Name
- Specify the name of the JSON output.
- Alias
- Specify a name to replace the original parameter name.
- Data Type
- Select the data format to be returned by the data service.
- To generate empty output parameters, click Generate Parameters.
- To view information about JSONPath, click JSON Help.
- Optionally, test the data service.
- In the Response Information section, select the response output type.
- Click Next.
- In the Create Data Service > Summary section, review the data service information.
- Click Finish.
On the Data Services page, the new data service is automatically added to the list.