Get Schema

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/schemas/{{schemaId}}

This call fetches a single schema having the specified id.

Response contains a schema object with all the details related to the schema, namely, id, language, type, schema etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.

RESPONSES

status: OK

{"schema":{"id":"e3b3a0b7-34d5-4fc5-83e0-118bd9e8c822","language":"json","apiVersion":"ad810c39-df60-434e-a76f-a2192cd8d81f","type":"openapi3","createdBy":"5665","updatedBy":"5665","createdAt":"2021-05-22T13:17:07.000Z","updatedAt":"2021-05-22T13:17:07.000Z","schema":"{\n  \"openapi\": \"3.0.0\",\n  \"info\": null,\n  \"version\": \"v1.0\",\n  \"title\": \"API\",\n  \"servers\": [\n    {\n      \"url\": \"http://localhost:3000\"\n    }\n  ],\n  \"paths\": {\n    \"/user\": {\n      \"get\": {\n        \"summary\": \"Returns details about a particular user\",\n        \"operationId\": \"listUser\",\n        \"tags\": [\n          \"user\"\n        ],\n        \"parameters\": [\n          {\n            \"name\": \"id\",\n            \"in\": \"query\",\n            \"description\": \"ID of the user\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Details about a user by ID\",\n            \"headers\": {\n              \"x-next\": {\n                \"description\": \"A link to the next page of responses\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"\\\\'#/components/schemas/User\\\\'\"\n                }\n              }\n            }\n          },\n          \"default\": {\n            \"description\": \"Unexpected error\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"\\\\'#/components/schemas/Error\\\\'\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"User\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"id\",\n          \"name\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          },\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"tag\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Error\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"code\",\n          \"message\"\n        ],\n        \"properties\": {\n          \"code\": {\n            \"type\": \"integer\",\n            \"format\": \"int32\"\n          },\n          \"message\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    }\n  }\n}"}}