How to Update Schema using Postman API?
In order to update your API Schema - run the requests one after the other and saving the required value in a dedicated environment.
GETFetch the Workspace-Id
https://api.getpostman.com/workspaces
This will fetch all the workspaces you are currently part of. Select the workspace-ID where your API is saved and update the respective environment.
HEADERS
x-api-key
GETFetch the API
https://api.getpostman.com/apis?workspace={{workspaceId}}
Lists all the APIs within the selected Workspace. Select the API-Id for which you want to make the changes and update the environment.
HEADERS
x-api-key
PARAMS
workspace
GETFetch version of the API
https://api.getpostman.com/apis/{{apiId}}/versions
Lists down the various versions of your API. Select the version of your API to which you want to make the changes and update the environment.
HEADERS
x-api-key
GETFetch Schema ID
https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}
Lists down Id of your Schema. Make the changes and update the environment with the value.
HEADERS
x-api-key
Loading