---
title: Retrieves tickets that belong to the given ticket project
slug: retrieves-tickets-that-belong-to-the-given-ticket-project
docTags: 
createdAt: 2025-01-28T10:28:11.769Z
---

{
  "id": "Z9OdspwJPkd7I-t41Kz95",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.waydev.co/v2/ticket-projects/{ticket_project_id}/tickets",
    "name": "Retrieves tickets that belong to the given ticket project",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "ticket_project_id",
          "type": "string",
          "description": "Id of the Ticket Project"
        }
      ],
      "headerParameters": [
        {
          "kind": "required",
          "name": "Authorization",
          "type": "string",
          "description": "Your PAT generated in Waydev"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "page",
          "type": "string",
          "description": "The page number to request"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Successful operation",
            "schema": [
              {
                "name": "count",
                "kind": "optional",
                "type": "integer",
                "example": 1
              },
              {
                "name": "values",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/definitions/TicketItem",
                "customType": "TicketItem[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "example": 1904
                  },
                  {
                    "name": "title",
                    "kind": "optional",
                    "type": "string",
                    "example": "This task is complete - click here!"
                  },
                  {
                    "name": "state",
                    "kind": "optional",
                    "type": "string",
                    "example": "complete"
                  },
                  {
                    "name": "url",
                    "kind": "optional",
                    "type": "string",
                    "example": "https://app.clickup.com/t/2ahtewn"
                  },
                  {
                    "name": "created_date",
                    "kind": "optional",
                    "type": "string",
                    "example": "2022-04-06 12:45:13"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "bad input parameter",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "uPJq4nPXpV79iR8xr8qzL",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.waydev.co/v2/ticket-projects/{ticket_project_id}/tickets \\\n     --header 'accept: application/json' \\\n     --header 'authorization: string'"
        },
        {
          "id": "SKQGnTOSePJTXfxrPsVLK",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"authorization\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.waydev.co/v2/ticket-projects/{ticket_project_id}/tickets\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "jYaES9bHRn2b3jjK8VuVv",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.waydev.co/v2/ticket-projects/{ticket_project_id}/tickets\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"authorization\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "80hJxjvAe_4Eb1mRQ9Abl",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.waydev.co/v2/ticket-projects/{ticket_project_id}/tickets\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'authorization': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "uPJq4nPXpV79iR8xr8qzL"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful operation\n{\n  \"count\": 1,\n  \"values\": [\n    {\n      \"id\": 1904,\n      \"title\": \"This task is complete - click here!\",\n      \"state\": \"complete\",\n      \"url\": \"https://app.clickup.com/t/2ahtewn\",\n      \"created_date\": \"2022-04-06 12:45:13\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// bad input parameter\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}