Surgical Text Replacement
curl --request POST \
--url https://api.zerodrive.dev/v1/files/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"old_text": "<string>",
"new_text": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>', old_text: '<string>', new_text: '<string>'})
};
fetch('https://api.zerodrive.dev/v1/files/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/edit"
payload = {
"path": "<string>",
"old_text": "<string>",
"new_text": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Surgical Text Replacement
Replace exact target string with replacement text in a file without re-uploading the entire document.
POST
https://api.zerodrive.dev
/
v1
/
files
/
edit
Surgical Text Replacement
curl --request POST \
--url https://api.zerodrive.dev/v1/files/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>",
"old_text": "<string>",
"new_text": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({path: '<string>', old_text: '<string>', new_text: '<string>'})
};
fetch('https://api.zerodrive.dev/v1/files/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerodrive.dev/v1/files/edit"
payload = {
"path": "<string>",
"old_text": "<string>",
"new_text": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
