Logo
30 Days of Postman exercises API Documentation

Single Collection

GET https://api.getpostman.com/collections/{{collection_uid}}

Access the contents of a collection that is accessible to you using its unique id (uid).

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

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 




RESPONSES

status OK

{ "collection": { "variables": [], "info": { "name": "Sample Collection", "_postman_id": "f2e66c2e-5297-e4a5-739e-20cbb90900e3", "description": "This is a sample collection that makes a tiny request to Postman Echo service to get the list of request headers sent by a HTTP client.", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ { "id": "82ee981b-e19f-962a-401e-ea34ebfb4848", "name": "Request Headers", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": "var responseJSON;\ntry {\n tests[\"Body contains headers\"] = responseBody.has(\"headers\");\n responseJSON = JSON.parse(responseBody);\n tests[\"Header contains host\"] = \"host\" in responseJSON.headers;\n tests[\"Header contains test parameter sent as part of request header\"] = \"my-sample-header\" in responseJSON.headers;\n}\ncatch (e) { }\n\n\n\n" } } ], "request": { "url": "https://echo.getpostman.com/headers", "method": "GET", "header": [ { "key": "my-sample-header", "value": "Lorem ipsum dolor sit amet", "description": "" } ], "body": { "mode": "formdata", "formdata": [] }, "description": "" }, "response": [] } ] } }



Curl
curl -X GET 'https://api.getpostman.com/collections/undefined'

ENDPOINTS