Перейти к основному содержимому

Tickets API (v1.1.0)

Managing tickets, comments, and ticket topics in the Control panel

Tickets

To discuss any issue you have, you can create tickets to Selectel technical support. You can work with created tickets: list, get, update, close, reopen, or rate a particular ticket.

Create ticket

Creates a ticket to Selectel technical support.

Authorizations:
X-Token
Request Body schema: application/json
files
Array of strings <uuid> (File) [ 1 .. 10 ] items [ items <uuid > ]

Files to add to the initial ticket comment.

comment_body
required
string [ 1 .. 50000 ] characters

Ticket initial comment.

summary
required
string [ 1 .. 255 ] characters

Ticket summary.

topic_key
string non-empty

Selected ticket topic.

notice_id
integer <int32>

Notice from which the ticket has to be created.

access_level
string (AccessLevel)
Enum: "account_users" "project_users" "all_users"

Access level of ticket.

keystone_projects
Array of strings (KeystoneProjects) = 1 items

Array of IAM project identifiers for which access is allowed for project_users access_level.

Responses

Request samples

Content type
application/json
{
  • "comment_body": "my first comment",
  • "summary": "new test ticket"
}

Response samples

Content type
application/json
{
  • "closed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "is_client_author": true,
  • "is_client_read": true,
  • "is_closed": true,
  • "is_resolved": true,
  • "number": 0,
  • "status": {
    },
  • "status_key": "in_progress",
  • "summary": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "vote": {
    },
  • "access_level": "account_users",
  • "keystone_projects": [
    ],
  • "notice_id": 0,
  • "splitted_from_ticket_number": 0
}

List tickets

Returns a list of tickets in the account.

Authorizations:
X-Token
query Parameters
only_opened
boolean

If true, returns tickets in the Closed status.

page
integer <int32> >= 1
Default: 1

Number of a page to be returned.

only_closed
boolean

If true, only tickets in the Closed status are returned.

q
string non-empty

Search query for Full-text search of tickets.

items_per_page
integer <int32> [ 1 .. 1000 ]
Default: 10

Number of returned tickets per page.

sort_by
string
Enum: "created_at" "updated_at" "number" "summary" "status"

Name of the field used as a result sorting key.

sort_by_order
string
Enum: "asc" "desc"

A sort order.

access_level
string
Enum: "account_users" "project_users" "all_users"

User access level. Only tickets of these users are returned.

keystone_projects
Array of strings (KeystoneProjects) = 1 items

Project identifiers. Only tickets within these projects are returned.

Responses

Response samples

Content type
application/json
{
  • "item_count": 0,
  • "items": [
    ],
  • "items_per_page": 0,
  • "page": 0,
  • "page_count": 0
}

Get ticket

Returns a ticket by its number.

Authorizations:
X-Token
path Parameters
ticket_number
required
integer

Responses

Response samples

Content type
application/json
{
  • "closed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "is_client_author": true,
  • "is_client_read": true,
  • "is_closed": true,
  • "is_resolved": true,
  • "number": 0,
  • "status": {
    },
  • "status_key": "in_progress",
  • "summary": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "vote": {
    },
  • "access_level": "account_users",
  • "keystone_projects": [
    ],
  • "notice_id": 0,
  • "splitted_from_ticket_number": 0
}

Update ticket

Updates ticket properties.

Authorizations:
X-Token
path Parameters
ticket_number
required
integer
Request Body schema: application/json
access_level
string (AccessLevel)
Enum: "account_users" "project_users" "all_users"

Access level of ticket.

keystone_projects
Array of strings (KeystoneProjects) = 1 items

Array of IAM project identifiers for which access is allowed for project_users access_level.

Responses

Request samples

Content type
application/json
{
  • "access_level": "account_users"
}

Response samples

Content type
application/json
{
  • "closed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "is_client_author": true,
  • "is_client_read": true,
  • "is_closed": true,
  • "is_resolved": true,
  • "number": 0,
  • "status": {
    },
  • "status_key": "in_progress",
  • "summary": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "vote": {
    },
  • "access_level": "account_users",
  • "keystone_projects": [
    ],
  • "notice_id": 0,
  • "splitted_from_ticket_number": 0
}

Close ticket

Closes the ticket. You will not be able to create and get comments on this ticket. You can reopen the closed ticket later.

Authorizations:
X-Token
path Parameters
ticket_number
required
integer
Request Body schema: application/json
comment
string non-empty

Comment on the ticket score.

score
integer <int32> [ 1 .. 5 ]

Ticket score on a five-point scale.

Responses

Request samples

Content type
application/json
{
  • "comment": "string",
  • "score": 1
}

Response samples

Content type
application/json
{
  • "closed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "is_client_author": true,
  • "is_client_read": true,
  • "is_closed": true,
  • "is_resolved": true,
  • "number": 0,
  • "status": {
    },
  • "status_key": "in_progress",
  • "summary": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "vote": {
    },
  • "access_level": "account_users",
  • "keystone_projects": [
    ],
  • "notice_id": 0,
  • "splitted_from_ticket_number": 0
}

Reopen ticket

Reopens the ticket that has been closed. You can add and get comments on the reopened ticket again.

Authorizations:
X-Token
path Parameters
ticket_number
required
integer
Request Body schema: application/json
files
Array of strings <uuid> (File) [ 1 .. 10 ] items [ items <uuid > ]

Array of file uuids to add to reopening comment.

body
required
string [ 1 .. 50000 ] characters

Text of reopening comment.

Responses

Request samples

Content type
application/json
{
  • "files": [
    ],
  • "body": "string"
}

Response samples

Content type
application/json
{
  • "closed_at": "2019-08-24T14:15:22Z",
  • "created_at": "2019-08-24T14:15:22Z",
  • "is_client_author": true,
  • "is_client_read": true,
  • "is_closed": true,
  • "is_resolved": true,
  • "number": 0,
  • "status": {
    },
  • "status_key": "in_progress",
  • "summary": "string",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "vote": {
    },
  • "access_level": "account_users",
  • "keystone_projects": [
    ],
  • "notice_id": 0,
  • "splitted_from_ticket_number": 0
}

Rate ticket

Rates how useful communication with Selectel technical support in a ticket was.

Authorizations:
X-Token
path Parameters
ticket_number
required
integer
Request Body schema: application/json
comment
string non-empty

Comment to add to the vote.

score
required
integer <int32> [ 1 .. 10 ]

Score on a two-point scale (like or dislike).

Responses

Request samples

Content type
application/json
{
  • "comment": "string",
  • "score": 1
}

Response samples

Content type
application/json
{
  • "comment": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "score": 0
}

Comments

To give you a feedback on a ticket, Selectel technical support adds comments. You can also add your comments to discuss the ticket. Besides, you can get or list comments and rate the comments added by Selectel technical support.

Add comment

Adds a comment to the ticket. You can only add comments to the tickets that are not closed.

Authorizations:
X-Token
path Parameters
ticket_number
required
integer
Request Body schema: application/json
files
Array of strings <uuid> (File) [ 1 .. 10 ] items [ items <uuid > ]

Array of files to attach to a comment.

body
string [ 1 .. 50000 ] characters

Text of a comment to create.

Responses

Request samples

Content type
application/json
{
  • "body": "My second comment",
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "files": [
    ],
  • "body": "string",
  • "id": 0,
  • "is_client_author": true,
  • "is_client_read": true,
  • "sent_at": "2019-08-24T14:15:22Z",
  • "splitted_at": "2019-08-24T14:15:22Z",
  • "splitted_to_ticket_number": 0,
  • "vote": {
    },
  • "ticket_number": 0,
  • "client_author_id": "string",
  • "admin_author": {
    }
}

List comments

Returns a list of ticket comments.

Authorizations:
X-Token
path Parameters
ticket_number
required
integer

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get comment

Returns a comment by its ID.

Authorizations:
X-Token
path Parameters
comment_id
required
integer

Responses

Response samples

Content type
application/json
{
  • "files": [
    ],
  • "body": "string",
  • "id": 0,
  • "is_client_author": true,
  • "is_client_read": true,
  • "sent_at": "2019-08-24T14:15:22Z",
  • "splitted_at": "2019-08-24T14:15:22Z",
  • "splitted_to_ticket_number": 0,
  • "vote": {
    },
  • "ticket_number": 0,
  • "client_author_id": "string",
  • "admin_author": {
    }
}

Rate comment

Rates a particular comment as being useful or not.

Authorizations:
X-Token
path Parameters
comment_id
required
integer
Request Body schema: application/json
comment
string non-empty

Text of a comment to vote for.

score
required
integer <int32>
Enum: 1 -1

Score in two points scale of vote to add to the comment.

Responses

Request samples

Content type
application/json
{
  • "comment": "string",
  • "score": 1
}

Response samples

Content type
application/json
{
  • "comment": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "score": 0
}

Topics

You specify a ticket topic when creating a ticket. You cannot edit a ticket topic after creating a ticket.

List topics

Returns a list of ticket topics in the account.

Authorizations:
X-Token

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}