Create your API
As simple as a file
Section titled “As simple as a file”Attainable APIs are a single configuration file. You define your data structure
and provide some optional settings then POST
it to your account.
Data Structure
Section titled “Data Structure”Attainable’s Data Structure syntax is as easy as outlining your data. Data Stores are the top-level, and their fields are indented below them.
The following example will create a complete API with 2 data resources: Users and Addresses.
users: name: string birthday: datetime preferences: { color: string }
addresss: street: string city: string state: string postal_code: integer
Learn more about Attainable’s Data Structure.
POST your API
Section titled “POST your API”With your configuration file ready, you can simply POST it to Attainable and it will be created in your account. You’ll receive a URL and a default API Key to use as the Authorization Bearer token.
curl -XPOST https://attainable.dev/apis -D @./example.yaml \ -H Authorization: Bearer <TOKEN>
Further reading
Section titled “Further reading”- Read more about Data Structures