Update Schema

PUT https://api.getpostman.com/apis/{{targetApiId}}/versions/{{targetApiVersionId}}/schemas/{{targetApiSchemaId}}

This call updates an existing schema.

Request body should contain a schema object which should atleast have these properties with string values:

  • type: Allowed types are openapi3, openapi2, openapi1, raml and graphql.
  • language : Allowed languages are json and yaml for OpenAPI and RAML schema types. GraphQL schema type accepts only graphql language.
  • schema: Optional. If passed, must be the content of the schema as a string.

Response contains a schema object with all the details related to the created schema, namely, id, language, type etc.

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

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"schema":{"id":"e3b3a0b7-34d5-4fc5-83e0-118bd9e8c822","language":"yaml","apiVersion":"ad810c39-df60-434e-a76f-a2192cd8d81f","type":"openapi3","createdBy":"5665","updatedBy":"5665","createdAt":"2021-05-22T13:17:07.000Z","updatedAt":"2021-05-22T13:17:07.000Z"}}