Change the annotations of a preview. Give the annotations to add in additions, the annotations to change in updates, and the annotations to delete in deletions. Managers and clients of the project can use this route. A supervisor can use it for the tasks of their departments, or for all the tasks if the supervisor has no department. Other users cannot use this route.
PUT
/actions/preview-files/{preview_file_id}/update-annotations
curl
curl -X PUT "http://api.example.com/actions/preview-files/a24a6ea4-ce75-4665-a070-57453082c25/update-annotations" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"additions": [
{
"type": "drawing",
"x": 100,
"y": 200
}
],
"updates": [
{
"id": "uuid",
"x": 150,
"y": 250
}
],
"deletions": [
"a24a6ea4-ce75-4665-a070-57453082c25"
]
}'
import requests
url = "http://api.example.com/actions/preview-files/a24a6ea4-ce75-4665-a070-57453082c25/update-annotations"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
"Content-Type": "application/json"
}
params = {}
payload = {
"additions": [
{
"type": "drawing",
"x": 100,
"y": 200
}
],
"updates": [
{
"id": "uuid",
"x": 150,
"y": 250
}
],
"deletions": [
"a24a6ea4-ce75-4665-a070-57453082c25"
]
}
response = requests.put(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Request examples
{
"additions": [
{
"type": "drawing",
"x": 100,
"y": 200
}
],
"updates": [
{
"id": "uuid",
"x": 150,
"y": 250
}
],
"deletions": [
"a24a6ea4-ce75-4665-a070-57453082c250"
]
}
Response examples (200)
{
"id": "a24a6ea4-ce75-4665-a070-57453082c250",
"annotations": [
{}
]
}