Logo
30 days of Postman - for developers API Documentation

API-Relations

Number of APIs: 9


1. Get linked relations

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

This call fetches all the relations which are linked to the specified API version along with their details.

The response will contain a relations object which lists all the relation types which are linked to the API version. Each of the relation type will be an object which details the relations of this type.

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



2. Get documentation relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/documentation

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

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



3. Get environment relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/environment

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

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



4. Get test suite relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/testsuite

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

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



5. Get contract test relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/contracttest

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

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



6. Get integration test relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/integrationtest

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

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



7. Get monitor relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/monitor

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

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



8. 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.

Relation Entity ID type
contracttest Collection UIDs
integrationtest Collection UIDs
documentation Collection UIDs
testsuite Collection UIDs
environment Environment UIDs
mock Mock IDs
monitor Monitor IDs

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



9. Sync relations with schema

PUT https://api.getpostman.com/apis/:apiId/versions/:apiVersionId/:entityType/:entityId/syncWithSchema

This call allows you to keep the relation in sync with the API schema.

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



ENDPOINTS