POST /actions/tasks/{task_id}/comments/{comment_id}/add-preview

Add preview metadata to a task. The preview file is uploaded after. Revision is auto set to last + 1. It can also be set manually.

Path parameters

  • task_id string(uuid) Required
  • comment_id string(uuid) Required
application/json

Body Required

  • revision integer

    Revision number for the preview

Responses

  • 201 application/json

    Preview metadata added to task

    Hide response attributes Show response attributes object
    • id string(uuid)
    • comment_id string(uuid)
    • task_id string(uuid)
    • revision integer
    • person_id string(uuid)
    • created_at string(date-time)
  • 400

    Bad request

POST /actions/tasks/{task_id}/comments/{comment_id}/add-preview
curl -X POST "http://api.example.com/actions/tasks/a24a6ea4-ce75-4665-a070-57453082c25/comments/a24a6ea4-ce75-4665-a070-57453082c25/add-preview" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "revision": 1
}'
import requests

url = "http://api.example.com/actions/tasks/a24a6ea4-ce75-4665-a070-57453082c25/comments/a24a6ea4-ce75-4665-a070-57453082c25/add-preview"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = {
    "revision": 1
}

response = requests.post(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
curl \
 --request POST 'http://api.example.com/actions/tasks/a24a6ea4-ce75-4665-a070-57453082c25/comments/a24a6ea4-ce75-4665-a070-57453082c25/add-preview' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"revision":1}'
Request examples
{
  "revision": 1
}
Response examples (201)
{
  "id": "b24a6ea4-ce75-4665-a070-57453082c25",
  "comment_id": "a24a6ea4-ce75-4665-a070-57453082c25",
  "task_id": "c24a6ea4-ce75-4665-a070-57453082c25",
  "revision": 3,
  "person_id": "d24a6ea4-ce75-4665-a070-57453082c25",
  "created_at": "2024-01-15T10:30:00Z"
}