Skip to main content
GET
/
api
/
v2
/
workspaces
/
{workspaceId}
/
tickets
/
search
Search tickets
curl --request GET \
  --url https://api.example.com/api/v2/workspaces/{workspaceId}/tickets/search
import requests

url = "https://api.example.com/api/v2/workspaces/{workspaceId}/tickets/search"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.example.com/api/v2/workspaces/{workspaceId}/tickets/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v2/workspaces/{workspaceId}/tickets/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/api/v2/workspaces/{workspaceId}/tickets/search"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.example.com/api/v2/workspaces/{workspaceId}/tickets/search")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/v2/workspaces/{workspaceId}/tickets/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "autotaskTicket": {
        "id": 123,
        "companyId": 123,
        "projectId": 123,
        "assignedResourceId": 123,
        "assignedResourceRoleId": 123,
        "billingCodeId": 123,
        "categoryId": 123,
        "number": "<string>",
        "type": 123,
        "title": "<string>",
        "description": "<string>",
        "status": 123,
        "queueId": 123,
        "dueDateTime": "2023-11-07T05:31:56Z",
        "notes": [
          {
            "id": 123,
            "description": "<string>",
            "ticketId": 123,
            "title": "<string>"
          }
        ]
      },
      "serviceNowTicket": {
        "id": "<string>",
        "description": "<string>",
        "shortDescription": "<string>",
        "number": "<string>",
        "comments": [
          {
            "sysId": "<string>",
            "elementId": "<string>",
            "value": "<string>",
            "createdOn": "2023-11-07T05:31:56Z",
            "createdBy": "<string>",
            "element": "<string>"
          }
        ]
      },
      "jiraTicket": {
        "id": "<string>",
        "description": "<string>",
        "summary": "<string>",
        "number": "<string>",
        "currentStatus": {
          "id": "<string>",
          "name": "<string>"
        },
        "priority": {
          "id": "<string>",
          "name": "<string>"
        },
        "assignee": {
          "accountId": "<string>",
          "displayName": "<string>",
          "active": true
        },
        "project": {
          "id": "<string>",
          "name": "<string>",
          "key": "<string>"
        },
        "issueType": {
          "id": "<string>",
          "name": "<string>",
          "projectId": "<string>",
          "subtask": true
        },
        "requestType": {
          "id": "<string>",
          "name": "<string>"
        },
        "labels": [
          "<string>"
        ],
        "availablePriorities": [
          {
            "id": "<string>",
            "name": "<string>"
          }
        ],
        "availableStatuses": [
          {
            "id": "<string>",
            "name": "<string>"
          }
        ]
      },
      "isTicketSet": true
    }
  ],
  "meta": {
    "requestId": "<string>",
    "timestamp": "<string>"
  }
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"target": "<string>",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"target": "<string>",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"target": "<string>",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"target": "<string>",
"errors": {}
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"requestId": "<string>",
"timestamp": "<string>",
"target": "<string>",
"errors": {}
}

Path Parameters

workspaceId
string<uuid>
required

Query Parameters

groupingId
string
ticketNumber
string

Response

OK

Standard v2 API response envelope for single-item responses.

data
null | object[]
meta
object