Postman API
  1. API
Postman API
  • API
    • Get all APIs
      GET
    • Create API
      POST
    • Delete an API
      DELETE
    • Single API
      GET
    • Update an API
      PUT
    • Get All API Versions
      GET
    • Create API Version
      POST
    • Delete an API Version
      DELETE
    • Get an API Version
      GET
    • Update an API Version
      PUT
    • Get contract test relations
      GET
    • Get documentation relations
      GET
    • Get environment relations
      GET
    • Get integration test relations
      GET
    • Get monitor relations
      GET
    • Get linked relations
      GET
    • Create relations
      POST
    • Create Schema
      POST
    • Get Schema
      GET
    • Update Schema
      PUT
    • Create collection from schema
      POST
    • Get test suite relations
      GET
    • Sync relations with schema
      PUT
  • Collections
    • All Collections
      GET
    • Create Collection
      POST
    • Create a Fork
      POST
    • Merge a Fork
      POST
    • Delete Collection
      DELETE
    • Single Collection
      GET
    • Update Collection
      PUT
  • Environments
    • All Environments
    • Create Environment
    • Delete Environment
    • Single Environment
    • Update Environment
  • Import
    • Import exported data
    • Import external API specification
  • User
    • API Key Owner
  • Mocks
    • All Mocks
    • Create Mock
    • Delete Mock
    • Single Mock
    • Update Mock
    • Publish Mock
    • Unpublish Mock
  • Monitors
    • All Monitors
    • Create Monitor
    • Delete Monitor
    • Single Monitor
    • Update Monitor
    • Run a Monitor
  • Webhooks
    • Create Webhook
  • Workspaces
    • All workspaces
    • Create Workspace
    • Delete Workspace
    • Single workspace
    • Update Workspace
  1. API

Create collection from schema

POST
/apis/{apiId}/versions/{apiVersionId}/schemas/{schemaId}/collections
APISchema
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 Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.getpostman.com/apis//versions//schemas//collections' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "My generated collection",
    "relations": [
        {
            "type": "contracttest"
        }
    ]
}'
Response Response Example
{
  "collection": {
    "id": "e6b0d46a-8722-4f42-ab86-f5f473187ddf",
    "uid": "112098-e6b0d46a-8722-4f42-ab86-f5f473187ddf"
  },
  "relations": [
    {
      "id": "4b40f06a-5a6a-448f-bfcd-a6dbcb68da22",
      "type": "contracttest"
    }
  ]
}

Request

Path Params
apiId
string 
required
apiVersionId
string 
required
schemaId
string 
required
Query Params
workspace
string 
optional
Body Params application/json
name
string 
optional
Example:
My generated collection
relations
array [object {1}] 
optional
type
string 
optional
Example:
contracttest
Examples

Responses

🟢200Create collection from schema
application/json
Body
collection
object 
optional
id
string 
optional
Example:
e6b0d46a-8722-4f42-ab86-f5f473187ddf
uid
string 
optional
Example:
112098-e6b0d46a-8722-4f42-ab86-f5f473187ddf
relations
array [object {2}] 
optional
id
string 
optional
Example:
4b40f06a-5a6a-448f-bfcd-a6dbcb68da22
type
string 
optional
Example:
contracttest
Previous
Update Schema
Next
Get test suite relations
Built with