api-ref
REST API
You can fetch and update your project schema by making REST requests to
the /schema
endpoint: api.takeshape.io/project/PROJECT-ID/schema
.
The endpoint accepts GET
and POST
requests.
Authentication
Your API requests will need to be authenticated with an API Key as a Bearer Token. Learn more about making API requests and creating API keys.
GET
Making a GET
request to your schema endpoint will return your
project's current schema in JSON format. For this request to succeed,
your API token must have permission to export the project.
If the project ID is not provided, or the schema cannot be found, this will return a 4xx error.
POST
Making a POST
request to your schema endpoint will update your schema
with the contents of your request body, which must be a complete schema
in JSON format.
Upon receiving the contents of the request, the schema will be validated. If the provided schema is invalid, the request will return a 4xx response.