Creating APIs
Creating your APIs is fast and easy from the attainable dashboard, or using the public API.
From the editor, follow these steps:
- Create an API.
- Give the API a name and choose a size.
- Deploy!
Using the public API, follow these steps:
- Create an API Key.
- Replace
<API_KEY>with yours in thecurlcommand below. - Deploy!
curl --request POST \ --url https://api.attainable.dev/apis/ \ --header 'Authorization: Bearer <API_KEY>' \ --header 'Content-Type: application/yaml' \ --data 'name: My First APIconfig: plan: microdata: users: email: string team: < teams preferences: color: string teams: name: string users: << users';And here is an example of the response you’ll receive:
{ "name": "My First API", "plan": "micro", "base_url": "https://grand-canyon-4321.attainable.dev", "docs_url": "https://grand-canyon-4321.attainable.dev/docs", "default_key": "<API_KEY>"}Using the URLs provided in the response,
you can begin using your API with the provided default_key
value as your Authentication token.