API Documentation
Authentication
All API methods require an X-API-Key header with an API key. You can create an API key here.
Methods
GET /api/find?id=[$id]
Looks up a JSON schema by its $id value.
Parameters
- id: The $id value of a JSON schema
Response
A JSON object containing a "data" object with the following property:
- url: A URL to the matching definition file
{
"data": {
"url": "https://example.com/schema.json"
}
}
Response
A JSON object containing a "data" object with the following proprties:
- id: The created schema's ID
- url: A URL for the schema on Schemas.Pub
{
"data": {
"url": "https://schemas.pub/schemas/30/definition/341"
}
}
POST /api/schemas
Creates a new schema.
Body
The body of your request should be a Schemas.Pub manifest.
Response
A JSON object containing a "data" object with the following proprties:
- id: The schema's ID
- url: A URL for the schema on Schemas.Pub
{
"data": {
"id": 30,
"url": "https://schemas.pub/schemas/30"
}
}
PUT /api/schemas/[schema_id]
Updates the specified schema.
Body
The body of your request should be a Schemas.Pub manifest.
Response
A JSON object containing a "data" object with the following proprties:
- id: The schema's ID
- url: A URL for the schema on Schemas.Pub
{
"data": {
"id": 30,
"url": "https://schemas.pub/schemas/30"
}
}
Errors
Error responses will be a JSON object containing an "error": object with the following properties:
- code: A status code for the error
- message: An error message
- details: (Optional) Additional information about the message