Create REST APIs
- Login to the Publisher Console (https://am.wso2.com/publisher) of the WSO2 API Manager.
- Click on the
REST APIbutton and then useImport Open APIoption. - Provide the OpenAPI definition of the API and click
Next. Select OpenAPI URL and provide the below link as theURL. ClickNext.http https://raw.githubusercontent.com/wso2/docs-apk/refs/heads/1.3.0/en/docs/assets/files/get-started/SampleAPIDefinition.json - Edit the information as given below and click Create.
| Field | Sample value |
|---|---|
| Name | SampleService |
| Context | /sample-api |
| Version | 0.1.0 |
| Endpoint | https://dev-tools.wso2.com/gs/helpers/v1.0 |
- Navigate to the Deploy section and click Deployments.
- Click Deploy New Revision.
- Optionally, provide a description for the revision.
- Select the Kubernetes Gateways in which you want to deploy the API and click Deploy.
- Navigate to Life Cycle tab. Then click Publish to publish the API.
- To verify the API deployment in the Kubernetes Gateway, execute the following command. You will see the status of the deployed apis as follows once completed.
bash
kubectl get apis -n apk