# Update file content
Use this method to update the content of the file..
# HTTP Request:
PATCH https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/file-managers/file
# Parameter:
Parameters | Required | Type | Description |
---|---|---|---|
body | No | String | Your file content. |
filename | Yes | String | Name of file. |
path | No | String | A path of file. |
# Curl Request example:
curl --request PATCH \
--url "https://api.serveravatar.com/organizations/5/servers/15/applications/92/file-managers/file" \
--header 'content-type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: <YOUR API TOKEN>' \
--data '{
"body": "<?php\nTest\n<?php",
"path": "/public_html",
"filename": "api.php"
}'
# Response:
# Update File Content:
- 200 (Ok)
{
"message": "Successfully saved."
}
# Organization Not Found
- 404 (Not Found)
{
"message": "Organization not found!"
}
# Server Not Found
- 404 (Not Found)
{
"message": "Server not found!"
}
# Application Not Found
- 404 (Not Found)
{
"message": "Application not found!"
}
# Server Error
- 500 (Internal Server Error)
{
"message": "Something went really wrong!"
}