Get the time spent on a task for a date

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 /actions/tasks/{task_id}/time-spents/{date}

Get the time spent entries of a task for a date, for all the persons. Clients cannot use this route.

Path parameters

  • task_id string(uuid) Required

    Unique identifier of the task

  • date string(date) Required

    Date in the YYYY-MM-DD format

Responses

  • 200 application/json

    An object. Each key is a person identifier, with the list of their time spent entries. The key total gives the sum of the durations.

    Hide response attributes Show response attributes object
    • total number

      Sum of the durations

    • * array[object] Additional properties

      Time spent entries of the person

      Hide * attributes Show * attributes object
      • id string(uuid)
      • task_id string(uuid)
      • person_id string(uuid)
      • date string(date)
      • duration number
      • created_at string(date-time)
  • 400

    The date is not valid

  • 403

    You are a client, or you do not have access to this task

GET /actions/tasks/{task_id}/time-spents/{date}
curl -X GET "http://api.example.com/actions/tasks/a24a6ea4-ce75-4665-a070-57453082c25/time-spents/2022-07-12" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
import requests

url = "http://api.example.com/actions/tasks/a24a6ea4-ce75-4665-a070-57453082c25/time-spents/2022-07-12"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
params = {}
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)
{
  "total": 42.0,
  "additionalProperty1": [
    {
      "id": "a24a6ea4-ce75-4665-a070-57453082c250",
      "task_id": "b24a6ea4-ce75-4665-a070-57453082c250",
      "person_id": "c24a6ea4-ce75-4665-a070-57453082c250",
      "date": "2022-07-12",
      "duration": 120,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "additionalProperty2": [
    {
      "id": "a24a6ea4-ce75-4665-a070-57453082c250",
      "task_id": "b24a6ea4-ce75-4665-a070-57453082c250",
      "person_id": "c24a6ea4-ce75-4665-a070-57453082c250",
      "date": "2022-07-12",
      "duration": 120,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ]
}