---
title: Get a single target
slug: get-a-single-target
docTags: 
createdAt: 2026-05-04T13:13:49.254Z
---

{
  "id": "SU5AiBRr1nhVdxa-u_5y_",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/v1/targets/{id}",
    "servers": [],
    "name": "Get a single target",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "id",
          "type": "string",
          "description": "",
          "pattern": "\\d+"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "websiteId",
          "type": "string",
          "description": "",
          "default": null,
          "pattern": "\\d+"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearer",
          "name": "bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Returned when successful",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Target",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "integer",
                "description": ""
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "",
                "minLength": 1,
                "maxLength": 255
              },
              {
                "name": "createDate",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              },
              {
                "name": "updateDate",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "",
                "format": "date-time"
              }
            ],
            "modelRef": "#/components/schemas/Target",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Target not found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Mhi3nz0wyljyHm2Jg_9Hg",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url '/v1/targets/{id}?websiteId=string' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "AQrDqdm4_fyNdzGrsymf0",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/v1/targets/{id}?websiteId=string\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "RhkouM1vzW_zoMYKDVce7",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/v1/targets/{id}?websiteId=string\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "NpLE8tC9YQ4-p_1VwD3Xb",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/v1/targets/{id}?websiteId=string\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Mhi3nz0wyljyHm2Jg_9Hg"
    },
    "results": {
      "languages": [
        {
          "id": "nBrZGJnEmPa6hCT0aNYDX",
          "language": "200",
          "code": "// Returned when successful\n{\n  \"id\": 0,\n  \"name\": \"\",\n  \"createDate\": \"\",\n  \"updateDate\": \"\"\n}"
        },
        {
          "id": "FAiBlyak_wJQPoTo1fJ8g",
          "language": "404",
          "code": "// Target not found\n"
        }
      ],
      "selectedLanguageId": "nBrZGJnEmPa6hCT0aNYDX"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}