Create relations

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

Creates a new relation for an API version. Include the following in the request body:

  • relationType — An array that contains entity relations. The key value for this array must be the unclassified value.

You must include the following properties in the relationType array:

  • entityId — The collection's UID value.

Note:

The following is deprecated in Qodex API v10 and higher:

relationTypeentityId
documentation and testA collection UID value.
environmentAn environment UID value.
mockA mock ID value.
monitorA monitor ID value.

The endpoint accepts multiple relationType arrays in a single call. For an example, see the example response documentation.

The documentation and test values returned in the response are the relation ID values, not the collection ID values.

Request Body

{"{{relationType}}"=>["{{entityId}}"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"unclassified":["2e006451-e819-443f-97bc-d1635e51007f"]}