Ticketing API Schema

API schema for Ticketing as a Service: the request objects and definitions used by the REST endpoints.

Overview

The Ticketing API schema defines the structure and specifications for interacting with Ticketing App through its API. It includes definitions for request and response objects, such as insertTicketRequest, updateTicketRequest, and insertCommentRequest, which describe the expected data format and properties for creating or updating tickets and adding comment.

Requests

insertTicketRequest

PropertyTypeRequiredNotes
ticketITicketYes
userIUserYes

updateTicketRequest

PropertyTypeRequiredNotes
ticketITicketYes
userIUserYes

updateTicketStatusRequest

PropertyTypeRequiredNotes
statusstringYesOne of: Started, Resolved, Closed, Reopened
resolutionstringNoOne of: fixed, cannotResolve, cancelled
commentstringNo
userIUserYes

insertCommentRequest

PropertyTypeRequiredNotes
commentstringYes
userIUserYes

insertAttachmentLinkRequest

PropertyTypeRequiredNotes
commentstringYes
attachmentsarray of IAttachmentLinkYes
userIUserYes
isPrivatebooleanYesDefault: false

Definitions

IUser

PropertyTypeRequiredNotes
idstringYes
namestringYes
emailstringYes

IPriority

Type: string · One of: Low, Medium, Important, Urgent

ITicket

PropertyTypeRequiredNotes
titlestringNo
requestorIUserNo
assigneeIUserNo
descriptionstringNo
priorityIPriorityNo
expectedDatestringNoFormat: date
tagsarray of ITicketTagNo
customFieldsobjectNo

No other properties are allowed.

ITicketTag

PropertyTypeRequiredNotes
tagCategoryIdstringYes
textstringYes

No other properties are allowed.

Full JSON schema

Show the full JSON schema
JSON
{
  "schemas": {
    "insertTicketRequest": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "ticket": {
          "$ref": "#/definitions/ITicket",
          "required": [
            "title",
            "requestor"
          ]
        },
        "user": {
          "$ref": "#/definitions/IUser"
        }
      },
      "required": [
        "ticket",
        "user"
      ]
    },
    "updateTicketRequest": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "ticket": {
          "$ref": "#/definitions/ITicket"
        },
        "user": {
          "$ref": "#/definitions/IUser"
        }
      },
      "required": [
        "ticket",
        "user"
      ]
    },
    "updateTicketStatusRequest": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "Started",
            "Resolved",
            "Closed",
            "Reopened"
          ]
        },
        "resolution": {
          "type": "string",
          "enum": [
            "fixed",
            "cannotResolve",
            "cancelled"
          ]
        },
        "comment": {
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/IUser"
        }
      },
      "required": [
        "status",
        "user"
      ]
    },
    "insertCommentRequest": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "comment": {
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/IUser"
        }
      },
      "required": [
        "comment",
        "user"
      ]
    },
    "insertAttachmentLinkRequest": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "comment": {
          "type": "string"
        },
        "attachments": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/IAttachmentLink"
          }
        },
        "user": {
          "$ref": "#/definitions/IUser"
        },
        "isPrivate": {
          "type": "boolean",
          "default": false
        }
      },
      "required": [
        "comment",
        "attachments",
        "user",
        "isPrivate"
      ]
    }
  },
  "definitions": {
    "IUser": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "email"
      ]
    },
    "IPriority": {
      "type": "string",
      "enum": [
        "Low",
        "Medium",
        "Important",
        "Urgent"
      ]
    },
    "ITicket": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "requestor": {
          "$ref": "#/definitions/IUser"
        },
        "assignee": {
          "$ref": "#/definitions/IUser"
        },
        "description": {
          "type": "string"
        },
        "priority": {
          "$ref": "#/definitions/IPriority"
        },
        "expectedDate": {
          "type": "string",
          "format": "date"
        },
        "tags": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ITicketTag"
          }
        },
        "customFields": {
          "type": "object"
        }
      },
      "additionalProperties": false
    },
    "ITicketTag": {
      "type": "object",
      "properties": {
        "tagCategoryId": {
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      },
      "required": [
        "tagCategoryId",
        "text"
      ],
      "additionalProperties": false
    },
    "IAttachmentLink": {
      "type": "object",
      "properties": {
        "src": {
          "type": "string"
        },
        "caption": {
          "type": "string"
        }
      },
      "required": [
        "src",
        "caption"
      ]
    }
  }
}

Got a Question or Need Help?

Reach out! Whether you're looking for support or have a cool suggestion for the app, we’re excited to hear from you!