---
title: Returns an item.
slug: mihai-tests/returns-an-item
createdAt: 2024-05-09T12:33:29.707Z
---

{
  "id": "1wUmmL__NP6eMqeOCOPVp",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.example.com/v1/item",
    "servers": [
      {
        "url": "https://api.example.com/v1/item",
        "description": "Optional server description, e.g. Main (production) server"
      }
    ],
    "name": "Returns an item.",
    "description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras gravida ac quam in blandit. Praesent imperdiet tincidunt tellus. Morbi sed elementum arcu, non eleifend libero. Integer vel tortor erat. Aliquam viverra massa sem, aliquet ultricies ligula placerat eu. Sed metus nisl, malesuada vitae blandit in, tempor ut erat. Curabitur ut erat porttitor, maximus orci eu, egestas ex. Donec mollis interdum cursus. Duis leo eros, fringilla at commodo ac, dignissim vel nisi. Cras sed massa eget risus varius hendrerit et volutpat neque. Nullam pharetra ornare lobortis. Aliquam pretium ipsum quis volutpat sollicitudin.</p>\n<ul>\n<li>list <code>item</code>.</li>\n<li>list <code>item</code> 2</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "undefined",
            "schema": [],
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "example": 123456789
                  },
                  {
                    "name": "title",
                    "kind": "optional",
                    "type": "string",
                    "example": "Item title"
                  }
                ],
                "modelRef": "#/components/schemas/item1",
                "customType": "item1"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "example": 123456789
                  },
                  {
                    "name": "title",
                    "kind": "optional",
                    "type": "string",
                    "example": "Item title"
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "example": "Item description"
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string<primary | secondary>",
                    "example": ""
                  }
                ],
                "modelRef": "#/components/schemas/item2",
                "customType": "item2"
              }
            ],
            "complexType": "oneOf",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "QAmQ7LdQeaw0-QvOfDAKS",
          "language": "curl",
          "label": "cURL",
          "code": "curl --location 'https://api.example.com/v1/item' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'"
        },
        {
          "id": "wZIs-MOwoW-nzl1Kck88C",
          "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(\"https://api.example.com/v1/item\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "-0JFQ5uT3gGFzdmlSMvvm",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.example.com/v1/item\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "M3p0YXljbyFMpvNz-lZFe",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.example.com/v1/item\"\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": "QAmQ7LdQeaw0-QvOfDAKS"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n\"\""
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "eUXsYp4eIVBq5PWVvVmDx",
      "type": "paragraph",
      "children": [
        {
          "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras gravida ac quam in blandit. Praesent imperdiet tincidunt tellus. Morbi sed elementum arcu, non eleifend libero. Integer vel tortor erat. Aliquam viverra massa sem, aliquet ultricies ligula placerat eu. Sed metus nisl, malesuada vitae blandit in, tempor ut erat. Curabitur ut erat porttitor, maximus orci eu, egestas ex. Donec mollis interdum cursus. Duis leo eros, fringilla at commodo ac, dignissim vel nisi. Cras sed massa eget risus varius hendrerit et volutpat neque. Nullam pharetra ornare lobortis. Aliquam pretium ipsum quis volutpat sollicitudin."
        }
      ]
    },
    {
      "id": "waAYS0K1gFTyB0cCLgswL",
      "type": "bulleted-list",
      "children": [
        {
          "id": "lqmnHCn_tAXqJycv_jNXG",
          "type": "list-item",
          "children": [
            {
              "id": "VRMDz67MhrUpGJsjIFxDj",
              "type": "list-item-child",
              "children": [
                {
                  "text": "list "
                },
                {
                  "highlight": true,
                  "text": "item"
                },
                {
                  "text": "."
                }
              ]
            }
          ]
        },
        {
          "id": "25hF8XXpIyeSJ4pBwFLWj",
          "type": "list-item",
          "children": [
            {
              "id": "K-6GOF4mmA5W34idhjHlv",
              "type": "list-item-child",
              "children": [
                {
                  "text": "list "
                },
                {
                  "highlight": true,
                  "text": "item"
                },
                {
                  "text": " 2"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}