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

URL

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

Sample Request

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

Sample Request URL

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

Sample request headers

accept: application/json

Sample request body

Not applicable.

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
Cookie AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
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.

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. If not specified, 100 matching results are returned.

Response

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

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"
  } ]
}

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

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.

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.