Add a preview to a comment

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api-docs.kitsu.cloud/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Kitsu API MCP server": {
    "url": "https://api-docs.kitsu.cloud/mcp"
  }
}

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

Create a preview file for a comment of a task. Upload the file of the preview after. If you do not give the revision, the route uses the last revision plus 1. Administrators and the managers of the project can use this route. Other users must be assignees of the task, supervisors of its department, or creators of its entity. A client of the project cannot use this route.

Path parameters

  • task_id string(uuid) Required

    Unique identifier of the task

  • comment_id string(uuid) Required

    Unique identifier of the comment

application/json

Body Required

  • revision integer

    Revision number for the preview

Responses

  • 201 application/json

    The new preview file

    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

    The body is not valid, the revision already exists on this task, or the project allows one preview per revision

  • 403

    You cannot do actions on this task

  • 404

    The task or the comment does not exist

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())
Request examples
{
  "revision": 1
}
Response examples (201)
{
  "id": "b24a6ea4-ce75-4665-a070-57453082c250",
  "comment_id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "task_id": "c24a6ea4-ce75-4665-a070-57453082c250",
  "revision": 3,
  "person_id": "d24a6ea4-ce75-4665-a070-57453082c250",
  "created_at": "2024-01-15T10:30:00Z"
}