Logo
15_Days_of_Postman_-_for_testers_IvanKo API Documentation

Create or update a schema file

PUT {{baseUrl}}/apis/{{apiId}}/schemas/{{schemaId}}/files/{{filePath}}

Creates or updates an API schema file. Include the following in the request body:

  • content — A string value that contains the file's contents.

Note:

  • If the provided file path exists, the file will be updated with the new contents.
  • If the provided file path does not exist, then a new schema file will be created.
  • If the file path contains a / (forward slash) character, then a folder is created. For example, if the file path is the dir/schema.json value, then a dir folder is created with the schema.json file inside.
  • You can only update the root tag for protobuf specifications.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Accept
string




RESPONSES

status OK

{ "id": "ae2b9ab2-28f2-401d-912f-eca09a78e98b", "createdBy": "2345", "updatedBy": "2345", "createdAt": "2022-03-29T11:37:15Z", "updatedAt": "2022-03-29T11:37:15Z", "path": "data-model/index.json", "name": "index.json" }



Curl
curl -X PUT 'https://api.getpostman.com/apis/apiId/schemas/schemaId/files/filePath' -H 'Accept: application/vnd.api.v10+json' -d '{"content":"fileContent"}'

ENDPOINTS