Getting Started
If there’s a Hello World for AutomatedAPI, this is it.
Automated API is built to make api generation little more than a click. To make that clear, let’s take a look at the simplest of simple, nearly canonical, most basic API definition that could exist and still have some relation to what you might readily find as an OpenAPI entre.
Yet another Pet API
- Head on over to the customer portal, login and click that oh so obvious of links at the top of the page (HINT: it says ‘Portal’).
- Then click the Create API link
- Now we get to the meat of this demo, copy the entry below into the window.
- Hit the button to navigate to the next screen.
{
"openapi":"3.0.0",
"info":{
"title":"",
"version":"1"
},
"paths":{},
"components":{
"schemas":{
"Pet":{
"required":[
"name"
],
"properties":{
"name":{
"type":"string"
},
"tag":{
"type":"string"
}
}
}
}
}
}
At this point you should be at a review screen which will tell you that you are about to have a service created called Pet.When you click finish, the api will be queued for production and once created will be accessible via a base set of operations for managing your Pet api.
Operations
Once the service is generated (it’s automated and shouldn’t take long), you’ll be able to do the following.
GET (collection) | https://proxy.automatedapi.com/[user name]/[service name]/values |
GET (by id) | https://proxy.automatedapi.com/[user name]/[service name]/values/[id] |
POST (for new items) | https://proxy.automatedapi.com/[user name]/[service name]/create |
DElETE (by id) | https://proxy.automatedapi.com/[user name]/[service name]/delete/[id] |
A Few Notes on the subset of the OpenAPI spec which is utilized here
1 All pieces are ignored except for the components->schema component, “openapi”, “info” and “paths” are requirements of our parser but can be submitted as shown above. There are not used for the generation process. 2 ‘ref’ entries within models are not currently processable, they will generate an error on submission. 3 For consistency, an internal ID is automatically created for all API objects, so it is advisable, unless they are meant to represent foreign keys, can be left out of your definitions. Foreign Key constraints are not at this time supported by Automated API services and databases. 4 In beta, security is not strictly enforced. While security is a feature on the near horizon, you should be aware that all APIs generated in beta will be public until they are recompiled after the security features are built.