Get an attachment file

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
GET /data/attachment-files/{instance_id}

Get an attachment file. For the file of a comment, you must be able to read the comment. You must have access to the project of its task. A vendor must also have a task on the entity. A client reads only the files of the comments they can see. For the file of a chat message, you must have access to the project of the entity. A client cannot read it, and a vendor must have a task on the entity. You cannot read a file that has no comment and no chat message, even as an administrator.

Path parameters

  • instance_id string(uuid) Required

    Unique identifier of the attachment file

Query parameters

  • relations boolean

    Add the related data. The default value is true.

    Default value is true.

Responses

  • 200 application/json

    The attachment file

    Hide response attributes Show response attributes object
    • id string(uuid)
    • name string
    • comment_id string(uuid)
    • created_at string(date-time)
    • updated_at string(date-time)
  • 400

    The identifier is not a valid UUID

  • 403

    You do not have access to the task or the chat of the file, or the file has no comment and no chat message

  • 404

    The attachment file does not exist

GET /data/attachment-files/{instance_id}
curl -X GET "http://api.example.com/data/attachment-files/a24a6ea4-ce75-4665-a070-57453082c25?relations=true" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
import requests

url = "http://api.example.com/data/attachment-files/a24a6ea4-ce75-4665-a070-57453082c25"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
params = {
    "relations": true
}
payload = None

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

response.raise_for_status()

if response.content:
    print(response.json())
Response examples (200)
{
  "id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "name": "attachment.pdf",
  "comment_id": "b24a6ea4-ce75-4665-a070-57453082c250",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}