GET /api/tickets/{TicketID}/comments

Returns the comments for the specified ticket.

Authorization Roles/Permissions: Must be logged in and have permission to view the requested resources. If the user is logged in but doesn't have permission to view certain resources, the operation works, but limited (or empty) results are returned.

This topic includes the following sections:

HTTP Method

GET

Back to top

URL

https://{hostname}/api/tickets/{TicketID}/comments[?start=start][&count=start]

Back to top

Sample Request

The example below shows a request for the comments on a specified ticket.

Request URL

https://{hostname}/api/tickets/ticket25687.acmepaymentscorp/comments

Sample request headers

accept: application/json

Sample request body

Not applicable.

Back to top

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept

application/json, application/xml

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Back to top

Request Parameters

Parameter Parm Type Data Type Required Description
TicketID Path string Required The unique ID for a specific ticket.
start Query integer Optional The starting point for the results to be returned. For example, if there are 100 results and you already have the first 20 (0-19), set the Start value to 20 to continue with the next one. If not specified, defaults to 0.
count Query integer Optional The count of ticket comments. Default: 0.

Back to top

Response

If successful, this operation returns HTTP status code 200, with information about any comments on the specified tickets.

Back to top

Sample Response

The sample response below shows successful completion of this operation. There are two comments on the ticket.

Sample response headers

Status Code: 200 OK
Content-Type: application/json
Expires: Mon, 06 Oct 2014 16:28:30 GMT

Sample response body: application/json

{
  "totalResults" : 2,
  "startIndex" : 0,
  "Comment" : [ {
    "CommentID" : "d492e3ca-82b5-43be-ad73-961ffa65cddd.acmepaymentscorp",
    "CommentSubjectID" : "ticket10557.acmepaymentscorp",
    "Content" : "Please contact me with details of a specific transaction. Thanks.",
    "Created" : "2014-08-01T15:18:23Z",
    "Marks" : 0,
    "IsMarked" : false,
    "UserID" : "b302bcd5-23cb-4e13-9135-68a7a88e729e.acmepaymentscorp",
    "UserName" : "JaneMead",
    "AvatarURL" : "http://{hostname}/api/users/b302bcd5-23cb-4e13-9135-68a7a88e729e.acmepaymentscorp/avatar"
  }, {
    "CommentID" : "150170b6-4c42-461d-a1b5-e822e3042504.acmepaymentscorp",
    "CommentSubjectID" : "ticket10557.acmepaymentscorp",
    "Content" : "Call (888) 888-8888.",
    "Created" : "2014-08-01T15:39:14Z",
    "Marks" : 0,
    "IsMarked" : false,
    "UserID" : "b302bcd5-23cb-4e13-9135-68a7a88e729e.acmepaymentscorp",
    "UserName" : "JaneMead",
    "AvatarURL" : "http://{hostname}/api/users/b302bcd5-23cb-4e13-9135-68a7a88e729e.acmepaymentscorp/avatar"
  } ]
}

Sample response body: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<Comments xmlns="http://soa.com/xsd/comment/1.0" xmlns:ns2="http://soa.com/xsd/user/1.0" xmlns:ns3="http://a9.com/-/spec/opensearch/1.1/">
  <ns3:totalResults>2</ns3:totalResults>
  <ns3:startIndex>0</ns3:startIndex>
  <Comment>
    <CommentID>d492e3ca-82b5-43be-ad73-961ffa65cddd.acmepaymentscorp</CommentID>
    <CommentSubjectID>ticket10557.acmepaymentscorp</CommentSubjectID>
    <Content>Please contact me with details of a specific transaction. Thanks.</Content>
    <Created>2014-08-01T15:18:23Z</Created>
    <Marks>0</Marks>
    <IsMarked>false</IsMarked>
    <ns2:UserID>b302bcd5-23cb-4e13-9135-68a7a88e729e.acmepaymentscorp</ns2:UserID>
    <ns2:UserName>JaneMead</ns2:UserName>
    <ns2:AvatarURL>http://acmepaymentscorp/api/users/b302bcd5-23cb-4e13-9135-68a7a88e729e.acmepaymentscorp/avatar</ns2:AvatarURL>
  </Comment>

Back to top

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type

application/json, application/xml

application/vnd.soa.v71+json, application/vnd.soa.v71+xml

application/vnd.soa.v72+json, application/vnd.soa.v72+xml

application/vnd.soa.v80+json, application/vnd.soa.v80+xml

application/vnd.soa.v81+json, application/vnd.soa.v81+xml

Back to top

Response Body

Name Type Description
Comments Comments

Contains information about one or more comments on a Board item.

In this case, it is the comments on a ticket.

Back to top

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
204 No content. You would get this response if there are no comments on the specified ticket.
404 The resource could not be found. For example, you might get this if you include an invalid TicketID in the request.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.

Back to top

Related Topics