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

Response

A JSON object containing a "data" object with the following property:

{
  "data": {
    "url": "https://example.com/schema.json"
  }
}

Response

A JSON object containing a "data" object with the following proprties:

{
  "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:

{
  "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:

{
  "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: