{{sidenavigation.sidenavigationExpandLabel}}
{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}} {{helpModel.downloadHelpPdfDataStatus}}

Ticket ID

The Ticket ID handler returns detailed information about a ticket, including fields and attributes that have a value set. Accessing ticket information requires the user to have read-access to the ticket. Tickets that have not yet been authorized require the dispatcher role.

Note: The Ticket ID in the request URL is accepted in the form of an integer, representing the ticket id or the encoded form which can be derived from subjects of email sent by the i-net HelpDesk.

GET /api/ticket/<ticket-id>

Request the detailed information about a ticket with the given <ticket-id>. The response is sent back using JSON.

REQUEST Parameter Value Type Description
fields string An optional comma separated list of files and attribute names that are reported back to the client
RESPONSE Fields Value Type Description
ticketId number The un-encoded ticket id
writeSessionUserGUID string The GUID of the user currently editing the the ticket. null, if no one is editing the ticket.
writeSessionUserDisplayName string The display name of the user currently editing the ticket. null, if no one is editing the ticket.
readSessions map<string,string> A map of GUID to user display name of users that are currently looking at the ticket. null, if no one is looking at the ticket.
fields map<string,string> A map of ticket fields. The map can be reduced by sending the optional parameter fields (see above)
attributes map<string,string> A map of ticket attributes. The map can be reduced by sending the optional parameter fields (see above)

Note: For security purposes it is possible - and advisable - to reduce the amount of ticket fields and attributes transmitted back to the client.

Example Request

# Request
GET /api/ticket/1 HTTP/1.1
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
 
{
    "ticketId": 1,
    "fields": {
        "subject": "Herzlich willkommen im i-net HelpDesk",
        "itilid": 0,
        "ownerid": "sys02qmoxwlwprnnovhrxtx7n",
        "classificationid": 0,
        "priorityid": 60
    },
    "attributes": {
       "sumtime": 0,
       "attachments": false,
       "statusid": 400,
       "closeddate": 1601294709690,
       "lastchangedbyid": "24i3tggpkjgkw2o42yap7r3qe",
       "autoescalated": false,
       "inquirydate": 1601011754753,
       "lasteditorid": "24i3tggpkjgkw2o42yap7r3qe",
       "lastchanged": 1601294709690,
       "initialreastepid": 1
    }
}

Example Request with reduced fields

# Request
GET /api/ticket/1?fields=subject,closeddate HTTP/1.1
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
 
{
    "ticketId": 1,
    "fields": {
        "subject": "Herzlich willkommen im i-net HelpDesk",
    },
    "attributes": {
       "closeddate": 1601294709690,
    }
}

Application Example

# Browser access
http://127.0.0.1:9000/api/ticket/1
 
# Shell access using curl
curl -LsH "Authorization: Bearer <access_token>" "http://127.0.0.1:9000/api/ticket/1"
 
# Shell access using curl using username and password
curl -Lsu username:password "http://127.0.0.1:9000/api/ticket/1"
i-net HelpDesk
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - /<ticket-id>