This call allows you to add existing Postman 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 orapikey
URL query parameter.
curl --location --request POST 'https://api.getpostman.com/apis//versions//relations' \
--header 'Content-Type: application/json' \
--data-raw '{
"contracttest": [
"collection-uid-1"
],
"documentation": [
"collection-uid-3"
],
"mock": [
"mock-uid-1"
],
"testsuite": [
"collection-uid-1",
"collection-uid-2"
]
}'
{
"contracttest": [
"5bcece87-ca4b-4e75-a967-2a6845626164"
],
"documentation": [
"2084eba6-a17b-4751-8f03-ea60f30ba19c"
],
"testsuite": [
"e525fa71-035e-4620-acda-ce878524f1e7",
"17a974b2-ce79-4b95-9d3f-217d6ff7e979"
]
}