Create collection from schema

POST https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/schemas/{{schemaId}}/collections?workspace={{workspaceId}}

This call creates a collection and links it to an API as one or multiple relations.

Request body requires two keys: - name - Name of the collection to be created. - relations - A list of relation(s) to be created.

The allowed relation types are contracttest, integrationtest, testsuite, and documentation.

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

Request Params

KeyDatatypeRequiredDescription
workspacestring

Request Body

{"name"=>"My generated collection", "relations"=>[{"type"=>"contracttest"}]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"collection":{"id":"e6b0d46a-8722-4f42-ab86-f5f473187ddf","uid":"112098-e6b0d46a-8722-4f42-ab86-f5f473187ddf"},"relations":[{"type":"contracttest","id":"4b40f06a-5a6a-448f-bfcd-a6dbcb68da22"}]}