Adding an API¶
In order for Nadles API Gateway to properly serve requests to your API, it needs to be configured.
The configuration starts with adding an API definition.
From OpenAPI file¶
Nadles supports importing OpenAPI specifications. It is the easiest way to get your API up and running on Nadles.
-
Click "Import OpenAPI file".
-
Choose the subdomain for your API, select the OpenAPI file and click "Submit".
Note
By default, Nadles let's you choose a subdomain for your API, and the URL to access your API looks like
https://<subdomain>.p.nadles.com/
Later, you can configure Nadles API Gateway to use a custom domain for your API, e.g.
https://api.mydomain.com
. Learn more.The API definition is imported together with all endpoints. If there are several elements in the "servers" array, the first one is used. After importing, please check the correctness of the configuration on the API Settings page.
Manually¶
Adding a new API¶
-
On the API list page click "Add new API".
-
Fill in the details of the API.
- Name: the name of your API. This name your customers will see on the checkout page.
-
Base URL: The base URL for all API endpoints.
The full URL, to which Nadles API Gateway will forward users' requests, is formed as
Base URL + Endpoint URL
. -
Short description, Full description, Link to your Terms of Service, Link to your API documentation: are shown to your customers on the checkout page.
-
Nadles Gateway API subdomain: by default, Nadles let's you choose a subdomain for your API, and the URL to access it looks like
https://<subdomain>.p.nadles.com/
Later, you can configure Nadles API Gateway to use a custom domain for your API, e.g.
https://api.mydomain.com
. Learn more.
-
Click "Submit".
-
After successfully adding the API, you are redirected to its dashboard.
-
On the dashboard there is now a Nadles API URL that should be used by your customers to make requests to the API.
To attach a custom domain to your API, check out this page.
Adding endpoints¶
-
Go to "Endpoints" section and click "Add new endoint".
-
Choose a HTTP method and enter the endpoint URL relative to the base URL.
-
Path parameters can be used in endpoint URLs. These parameters can be used later, in quota configuration.
-
Click "Submit".
Once all endpoints are added, it's time to set up user authentication.