Get the next revision of an output 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
POST /data/entities/{entity_id}/output-files/next-revision

Get the next revision number of an output file of an entity. The route finds the last revision for the name, the output type and the task type of the body.

Path parameters

  • entity_id string(uuid) Required

    Entity unique identifier

application/json

Body Required

  • name string

    File name

    Default value is main.

  • output_type_id string(uuid) Required

    Output type identifier

  • task_type_id string(uuid) Required

    Task type identifier

Responses

  • 200 application/json

    The next revision number

    Hide response attribute Show response attribute object
    • next_revision integer

      Next available revision number

  • 400

    The body is not valid

  • 403

    You do not have access to this project

  • 404

    The entity, the output type or the task type does not exist

POST /data/entities/{entity_id}/output-files/next-revision
curl -X POST "http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/output-files/next-revision" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "main",
  "output_type_id": "a24a6ea4-ce75-4665-a070-57453082c25",
  "task_type_id": "b35b7fb5-df86-5776-b181-68564193d36"
}'
import requests

url = "http://api.example.com/data/entities/a24a6ea4-ce75-4665-a070-57453082c25/output-files/next-revision"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = {
    "name": "main",
    "output_type_id": "a24a6ea4-ce75-4665-a070-57453082c25",
    "task_type_id": "b35b7fb5-df86-5776-b181-68564193d36"
}

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

response.raise_for_status()

if response.content:
    print(response.json())
Request examples
{
  "name": "main",
  "output_type_id": "a24a6ea4-ce75-4665-a070-57453082c250",
  "task_type_id": "b35b7fb5-df86-5776-b181-68564193d360"
}
Response examples (200)
{
  "next_revision": 3
}