Now we have created the HTTPBIN Application successfully, specifying the upstream URL. But we don't have any API endpoints.
In this section, we'll create an API endpoint that returns a JSON string from https://httpbin.org.
Enter the HTTPBIN Application detail page, and click on the Create API button.
API7 Cloud will open a popup window, filling in the API details.
Click on the Create button, API7 Cloud will create the API.
Now you have created the JSON API. Some contents you should know are:
- We set the API "Path" to
/json, and we click the "Strip Path Prefix" option, which means the
/v1/jsonwill be rewritten to "/json" before proxying to the backend;
- Only the
GETmethod is allowed;
Congratulations! You have created the JSON API. Now, let's send some requests to verify if it works!