io7m | single-page | multi-page | epub | Looseleaf User Manual
8.5. /v1/delete
Previous
8. Protocol V1
Up
9. Command-Line Interface
Next

# 8.6. Schema

1
The JSON schema that defines all JSON messages exchanged between the client and server in this version of the protocol is as follows:

### 8.6.2. Schema

    {
      "$id": "https://www.io7m.com/software/looseleaf/looseleaf-1.json",
      "$schema": "https://json-schema.org/draft/2020-12/schema",

      "$defs": {
        "SchemaIdentifier": {
          "type": "string",
          "const": "https://www.io7m.com/software/looseleaf/looseleaf-1.json"
        },

        "Error": {
          "type": "object",
          "properties": {
            "%schema": {
              "$ref": "#/$defs/SchemaIdentifier"
            },
            "errorCode": {
              "type": "string"
            },
            "message": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "errorCode",
            "message"
          ]
        },

        "Errors": {
          "type": "object",
          "properties": {
            "%schema": {
              "$ref": "#/$defs/SchemaIdentifier"
            },
            "errors": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Error"
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "errors"
          ]
        },

        "RUD": {
          "type": "object",
          "properties": {
            "%schema": {
              "$ref": "#/$defs/SchemaIdentifier"
            },
            "read": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "update": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            "delete": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "read",
            "update",
            "delete"
          ]
        },

        "Result": {
          "type": "object",
          "properties": {
            "%schema": {
              "$ref": "#/$defs/SchemaIdentifier"
            },
            "values": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "values"
          ]
        }
      },

      "anyOf": [
        {
          "$ref": "#/$defs/Error"
        },
        {
          "$ref": "#/$defs/Errors"
        },
        {
          "$ref": "#/$defs/RUD"
        },
        {
          "$ref": "#/$defs/Result"
        }
      ]
    }

8.5. /v1/delete
Previous
8. Protocol V1
Up
9. Command-Line Interface
Next
io7m | single-page | multi-page | epub | Looseleaf User Manual