Introduction
If you want to check how the configured API works on the client side, you must test it with Swagger to display your configured schema and create/update the data to post it to the other resource. This will allow you to download the exposed data in JSON format and provide the URL of the API for other resources to consume it.
Prerequisites
- The file you need must already exist.
- The Client ID and App Secret must be generated for the registered client application
- The DataPatch scope must be selected for the registered client application.
|
Quick Steps |
| 1 |
Open the Expose Web API file |
| 2 |
Open Swagger, then click the Authorize button |
| 3 |
Enter the authorization details, then select the scope and click the Authorize button |
| 4 |
Click the Close button |
| 5 |
Click the POST button, then click the Try it out button |
| 6 |
Enter the parameters in the schema, then click the Execute button |
| 7 |
Download the data file, if required |
Detailed Steps
Step 1. Open the Expose Web API file.
Open the file you want to test. This example uses the apiPostCustomer file.
Step 2. Open Swagger, then click the Authorize button.
You're going to use Swagger to test the Web API.
Authorization is important to make the application secure and to control who can have access to it.
Step 3. Enter the authorization details, then select the scope and click the Authorize button.
Here, you need to enter the Client ID and App Secret generated while registering the client application.
Select the desired scope depending on your data operation. In this case, select DataPatch as the scope. Click the Authorize button.
Scope determines the end points of the API that the client application can access.
Step 5. Click the POST button, then click the Try it out button.
Swagger opens the Parameters and Responses panels.
The locked icon will appear when you are successfully authorized.
Step 6. Enter the parameters and schema details, then click the Execute button.
In this case, Customer ID is the default parameter and is required.
This example uses Customer ID and City parameters. Enter “1” and “Berlin” respectively. Add/Update the required data in the schema that you want to post.
Step 7. Download the data file, if required.
Swagger generates an API link that can be used in other applications. Click the Download button to download the API response in a JSON file.
You can get the response in the downloaded file.
What are the improvements over S3 Version 6?
This is a new process.
Related Articles
Create an Expose Post Web API File
Edit the Expose Post Web API File
This post is part of the Web API topic. Click here to open Web API Overview
#Develop
#Development Studio
#Task Steps
#Everyone
#Text Help
#Xelence
#API
#WebAPI