Create relations

POST https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/relations

This call allows you to add existing Qodex entities as new relations to an API. The request body should contain the relations to be created along with an array of entity IDs.

RelationEntity ID type
contracttestCollection UIDs
integrationtestCollection UIDs
documentationCollection UIDs
testsuiteCollection UIDs
environmentEnvironment UIDs
mockMock IDs
monitorMonitor IDs

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

Request Body

{"contracttest"=>["collection-uid-1"], "testsuite"=>["collection-uid-1", "collection-uid-2"], "documentation"=>["collection-uid-3"], "mock"=>["mock-uid-1"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"contracttest":["5bcece87-ca4b-4e75-a967-2a6845626164"],"testsuite":["e525fa71-035e-4620-acda-ce878524f1e7","17a974b2-ce79-4b95-9d3f-217d6ff7e979"],"documentation":["2084eba6-a17b-4751-8f03-ea60f30ba19c"]}