---
title: Info for a specific pet
slug: git-path-autop/info-for-a-specific-pet
docTags: 
createdAt: 2026-10-10T16:49:26.521Z
---

{
  "id": "9rKMqrdG4Nbdo-7T8ph6k",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://petstore.swagger.io/v1/pets/{petId}",
    "name": "Info for a specific pet",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "petId",
          "type": "string",
          "description": "The id of the pet to retrieve"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Expected response to a valid request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "Expected response to a valid request",
            "customType": "Pets",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "integer<int64>",
                "description": "",
                "format": "int64"
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "tag",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/definitions/Pets",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "default",
        "description": "unexpected error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "unexpected error",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/definitions/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "uu_puMapDotSI2C6zNeyC",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url http://petstore.swagger.io/v1/pets/{petId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "xeUAYozEEberqsx4Pf6Gm",
          "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(\"http://petstore.swagger.io/v1/pets/{petId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "QcC2X3aw6HtwSu4eif5us",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://petstore.swagger.io/v1/pets/{petId}\")\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": "EWRMyGrSU8TlQmeAjD1zC",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://petstore.swagger.io/v1/pets/{petId}\"\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": "uu_puMapDotSI2C6zNeyC"
    },
    "results": {
      "languages": [
        {
          "id": "TjXxR4IWblqRLhwoK3PLT",
          "language": "200",
          "code": "// Expected response to a valid request\n[\n  {\n    \"id\": \"\",\n    \"name\": \"\",\n    \"tag\": \"\"\n  }\n]"
        },
        {
          "id": "PSNrMOQUfj7oA0ugS84TX",
          "language": "default",
          "code": "// unexpected error\n{\n  \"code\": \"\",\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "TjXxR4IWblqRLhwoK3PLT"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}