Get a collection

GET {{baseUrl}}/apis/{{apiId}}/collections/{{collectionId}}

Gets a collection attached to an API. You can use the versionId query parameter to get a collection published in a version.

Note:

  • You cannot use this endpoint to get a Git-linked API collection. Collections in a Git-linked API are stored in the linked Git repository, not in the Qodex cloud. This endpoint only has access to Qodex servers.

  • You can get a collection published in an API version with the versionId query parameter.

  • The versionId query parameter is a required parameter for API viewers.

Request Params

KeyDatatypeRequiredDescription
versionIdstringThe API's version ID.

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{"item":[{"protocolProfileBehavior":{"disableBodyPruning":true},"response":[{"originalRequest":{"url":{"host":["https://api.getpostman.com"],"raw":"https://api.getpostman.com/spacecrafts/:spacecraftId","variable":[{"description":"(Required) The unique identifier of the spacecraft","key":"spacecraftId","value":"\u003cstring\u003e"}],"path":["spacecrafts",":spacecraftId"]},"method":"GET","header":[{"description":"Added as a part of security scheme: apikey","key":"X-Api-Key","value":"\u003cAPI Key\u003e"}]},"code":200,"_postman_previewlanguage":"json","responseTime":null,"header":[{"key":"Content-Type","value":"application/json"}],"name":"The spacecraft corresponding to the provided `spacecraftId`","_postman_previewtype":"html","body":"{\n  \"id\": \"\u003cstring\u003e\",\n  \"name\": \"commodo\",\n  \"type\": \"capsule\",\n  \"description\": \"pariatur dolo\"\n}","cookie":[],"status":"OK","id":"54467f6e-71d7-43d5-acc0-48f948e38528"},{"originalRequest":{"url":{"host":["https://api.getpostman.com"],"raw":"https://api.getpostman.com/spacecrafts/:spacecraftId","variable":[{"description":"(Required) The unique identifier of the spacecraft","key":"spacecraftId","value":"\u003cstring\u003e"}],"path":["spacecrafts",":spacecraftId"]},"method":"GET","header":[{"description":"Added as a part of security scheme: apikey","key":"X-Api-Key","value":"\u003cAPI Key\u003e"}]},"code":404,"_postman_previewlanguage":"json","responseTime":null,"header":[{"key":"Content-Type","value":"application/json"}],"name":"No spacecraft found for the provided `spacecraftId`","_postman_previewtype":"html","body":"{\n  \"message\": \"dolore Excepteur\"\n}","cookie":[],"status":"Not Found","id":"1231609a-7a3d-444d-aa0c-579703e618f4"},{"originalRequest":{"url":{"host":["https://api.getpostman.com"],"raw":"https://api.getpostman.com/spacecrafts/:spacecraftId","variable":[{"description":"(Required) The unique identifier of the spacecraft","key":"spacecraftId","value":"\u003cstring\u003e"}],"path":["spacecrafts",":spacecraftId"]},"method":"GET","header":[{"description":"Added as a part of security scheme: apikey","key":"X-Api-Key","value":"\u003cAPI Key\u003e"}]},"code":500,"_postman_previewlanguage":"json","responseTime":null,"header":[{"key":"Content-Type","value":"application/json"}],"name":"Unexpected error","_postman_previewtype":"html","body":"{\n  \"message\": \"dolore Excepteur\"\n}","cookie":[],"status":"Internal Server Error","id":"db674465-8cec-4208-9724-42278ca9b83c"}],"id":"d3779255-5293-4e58-9b65-8954936e1dca","request":{"url":{"host":["https://api.getpostman.com"],"raw":"https://api.getpostman.com/spacecrafts/:spacecraftId","variable":[{"description":"(Required) The unique identifier of the spacecraft","key":"spacecraftId","value":"\u003cstring\u003e"}],"path":["spacecrafts",":spacecraftId"]},"method":"GET","header":[{"key":"Accept","value":"application/json"}]},"name":"Read a spacecraft"}],"auth":{"apikey":[{"type":"string","key":"key","value":"X-Api-Key"},{"type":"string","key":"value","value":"SCBKCDKCHKDHCK"},{"type":"string","key":"in","value":"header"}],"type":"apikey"},"info":{"description":"Buy or rent spacecrafts","_postman_id":"e726de58-f1b3-4edd-a8a7-2579dc799d39","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json","name":"Generated"},"variable":[{"value":"/","type":"string","id":"526a20ba-acfb-4549-a841-8edf2d24b929","key":"baseUrl"}]}