I have a single apiId
with two versions:
https://api.getpostman.com/apis/{{apiId}}/versions
{
"versions": [
{
"id": "v2",
"name": "Two",
...
"lastRevision": 16598951405
},
{
"id": "v1",
"name": "One",
...
"lastRevision": 16561247529
}
]
}
In order to create a collection from schema, the schemaId
along with apiVersionId
are to be provided.
https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/schemas/{{schemaId}}/collections?workspace={{workspaceId}}
I’m unable to determine the schemaId
for v2
. Retrieving the single API only responds with v1
:
https://api.getpostman.com/apis/{{apiId}}
{
"api": {
"id": "api1",
"name": "API",
...
"versions": [
{
"api": "api1",
"id": "v1",
"name": "One",
...
"schemas": [
{
"id": "schemaId",
"type": "openapi2",
"language": "json"
}
]
}
]
}
}
Retrieving the schema for v2
using schemaId
fails with:
{
"error": {
"name": "schemaApiVersionMismatchError",
"message": "The Schema ID provided does not belong to the API Version ID provided."
}
}
Both schemas against the API are synced via GitHub integration.