Ticketing As A Service
TeamsWork
TICKETING API SCHEMA
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.
{
"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"
]
}
},
"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
}
}
}