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 thedir/schema.json
value, then adir
folder is created with theschema.json
file inside. - You can only update the
root
tag for protobuf specifications.
Request Body
{"content"=>"{{fileContent}}"}
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"}