GET /api/tickets

Returns information about tickets.

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

Sample Request

The example below shows a request for the first two tickets for a specific API.

Sample Request URL

https://{hostname}/api/tickets?APIID=ecbf7010-abcf-41f8-9f52-1c02b3a51984.acmepaymentscorp&count=2

Sample request headers

Accept: application/vnd.soa.v72+json

Sample request body

Not applicable.

Request Headers

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

Header Description
Accept

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
APIID Query string Optional The unique ID for a specific API.
AppID Query string Optional The unique ID for a specific app.
RetrievingUserID Query string Optional The ID of the user retrieving the discussion information.
AuthorID Query string Optional The unique ID for the author of a discussion. If this parameter is included, only discussions created by this author are included in the results.
ItemID Query string Optional The unique ID for a specific forum entry.
Tag Query string Optional

A user-defined tag.

If specified, results are limited to tickets relating to that tag. If not specified, no filter is applied.

Label Query string Optional A ticket label indicating a ticket priority. For valid values, see Ticket Label Values.
State Query string Optional The current state of the ticket. For valid values, see Ticket State Values.
IncludeComments Query boolean Optional Indicates whether comments should be included in the information returned. Default: true. If set to false, comments are excluded.
NumberOfComments Query integer Optional The number of comments to be returned (if IncludeComments is not set to false). Default value: 2.
IncludeActions Query boolean Optional Indicates whether workflow actions currently valid for the resource should be included in the results. Default: true. For valid workflow actions, see Workflow Actions.
SortBy Query string Optional An optional parameter allowing users to sort results by a specific value; for example, com.soa.sort.order.updated sorts with the most updated entries first. For valid values, see Sort By Values. If not specified, items are returned in the sort order of DescendingDate, which means that the most recent items are first.
start Query integer Optional An index number indicating the starting point for the results to be returned. If not specified, results start at position 0, the first result.
count Query integer Optional The number of results to be returned, from the specified starting point. If not specified, 100 matching results are returned.

Response

If successful, this operation returns HTTP status code 200, with information about tickets.

Sample Response

The sample response below returns the first three tickets, for a specified user, as per the sample request.

Sample response headers: application/vnd.soa.v72+json

Status Code: 200 OK
Content-Type: application/vnd.soa.v72+xml
Expires: Tue, 12 May 2015 12:27:20 GMT

Sample response body: application/vnd.soa.v72+json

{
  "Ticket" : [ {
    "TicketID" : "ticket11623.acmepaymentscorp",
    "APIID" : "037a3fad-45ba-4126-aae4-84a9dadae89e.acmepaymentscorp",
    "Title" : "Bug when using multiple payment types",
    "Description" : "When I try to use **more than one payment type** the transaction hangs up.",
    "Environment" : "Production",
    "State" : "OPEN",
    "UserID" : "a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp",
    "Created" : "2015-05-12T17:27:06Z",
    "Label" : [ "com.soa.ticket.label.priority.high" ],
    "Tag" : [ "bug", "payment" ],
    "Comments" : 0,
    "Marks" : 0,
    "IsMarked" : false,
    "Visibility" : "Limited",
    "PubDate" : "2015-05-12T17:27:06Z",
    "Action" : [ {
      "value" : "discussion.action.delete",
      "label" : "discussion.action.delete"
    } ],
    "TargetResources" : {
      "TargetResource" : [ {
        "Name" : "ACME Payments API",
        "ID" : "b28f3b3b-4c54-4ccf-a4db-55abc7a467f0.acmepaymentscorp",
        "Type" : "api"
      }, {
        "Name" : "1.0",
        "ID" : "037a3fad-45ba-4126-aae4-84a9dadae89e.acmepaymentscorp",
        "Type" : "apiversion"
      } ]
    },
    "Image" : {
      "Url" : "http://{hostname}/api/users/a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp/avatar",
      "Link" : "../acmepaymentscorp#/user/a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp/details"
    },
    "CommentsPreview" : {
      "Count" : 0,
      "Comment" : [ ]
    },
    "Link" : "../acmepaymentscorp#/forum/discussions/ticket11623.acmepaymentscorp/details",
    "AuthoringUser" : {
      "UserID" : "a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp",
      "Name" : "adminAcmepaymentscorp",
      "Image" : {
        "Url" : "http://{hostname}/api/users/a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp/avatar",
        "Title" : "adminAcmepaymentscorp",
        "Link" : "#/users/a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp/details"
      }
    },
    "DescriptionMediaType" : "text/markdown",
    "BoardItemArtifacts" : {
      "BoardItemArtifact" : [ ]
    }
  }, {
    "TicketID" : "ticket11622.acmepaymentscorp",
    "APIID" : "037a3fad-45ba-4126-aae4-84a9dadae89e.acmepaymentscorp",
    "Title" : "Cannot log in after timeout",
    "Description" : "After a timeout, users cannot log back in. Password reset is the only way I've been able to figure to get a user back in.",
    "Environment" : "Production",
    "State" : "OPEN",
    "UserID" : "a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp",
    "Created" : "2015-05-12T17:06:08Z",
    "Label" : [ "com.soa.ticket.label.priority.high" ],
    "Tag" : [ "login", "timeout" ],
    "Comments" : 0,
    "Marks" : 0,
    "IsMarked" : false,
    "Visibility" : "Limited",
    "PubDate" : "2015-05-12T17:06:08Z",
    "Action" : [ {
      "value" : "discussion.action.delete",
      "label" : "discussion.action.delete"
    } ],
    "TargetResources" : {
      "TargetResource" : [ {
        "Name" : "ACME Payments API",
        "ID" : "b28f3b3b-4c54-4ccf-a4db-55abc7a467f0.acmepaymentscorp",
        "Type" : "api"
      }, {
        "Name" : "1.0",
        "ID" : "037a3fad-45ba-4126-aae4-84a9dadae89e.acmepaymentscorp",
        "Type" : "apiversion"
      } ]
    },
    "Image" : {
      "Url" : "http://{hostname}/api/users/a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp/avatar",
      "Link" : "../acmepaymentscorp#/user/a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp/details"
    },
    "CommentsPreview" : {
      "Count" : 0,
      "Comment" : [ ]
    },
    "Link" : "../acmepaymentscorp#/forum/discussions/ticket11622.acmepaymentscorp/details",
    "AuthoringUser" : {
      "UserID" : "a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp",
      "Name" : "adminAcmepaymentscorp",
      "Image" : {
        "Url" : "http://{hostname}/api/users/a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp/avatar",
        "Title" : "adminAcmepaymentscorp",
        "Link" : "#/users/a71553bd-5ac5-4230-aa6d-c315bae0f781.acmepaymentscorp/details"
      }
    },
    "DescriptionMediaType" : "text/plain",
    "BoardItemArtifacts" : {
      "BoardItemArtifact" : [ ]
    }
  } ]
}

Response Headers

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

Header Description
Content-Type

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
Tickets Tickets Contains information about one or more tickets.

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
500 An error occurred processing the call.

More information about Akana API Platform API error messages.