---
title: Info for a specific pet
slug: mihai-tests/info-for-a-specific-pet
createdAt: 2025-05-01T06:40:31.272Z
---

{
  "id": "B6zR_iVtHjm4YCIZo_PJL",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://petstore.swagger.io/v1/pets/{petId}",
    "servers": [
      {
        "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": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Expected response to a valid request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Pet",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "integer<int64>",
                "example": 0
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "example": ""
              },
              {
                "name": "tag",
                "kind": "optional",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/Pet",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "default",
        "description": "unexpected error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "code",
                "kind": "required",
                "type": "integer<int32>",
                "example": 0
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Q1MZQxRXp38D3qS8RHgz5",
          "language": "curl",
          "label": "cURL",
          "code": "curl --location --globoff 'http://petstore.swagger.io/v1/pets/{petId}' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'"
        },
        {
          "id": "8EhIgIq80jXXB1pw4qbFh",
          "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": "wyIlBWeGLBSTW72Ny7675",
          "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": "lU3Shdf4nLRoZF7hClTOb",
          "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": "Q1MZQxRXp38D3qS8RHgz5"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Expected response to a valid request\n{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"tag\": \"\"\n}"
        },
        {
          "id": "response-1-default",
          "language": "default",
          "code": "// unexpected error\n{\n  \"code\": \"\",\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}