Feature Request: Retrieve Group Name by groupId in TickTick API

View original issue on GitHub  ·  Variant 2

Feature Request: Accessing Group Names by Group ID in the TickTick API

A user has identified a limitation in the TickTick API: while project data includes a groupId, there's no direct way to retrieve the corresponding group name using that ID. This makes it challenging to programmatically organize and display projects based on their group affiliation, as the application only has access to the numerical identifier, not a human-readable name.

The Problem: ID Without Context

Imagine you're building a dashboard that visualizes your TickTick projects. The API provides project details, including the groupId. However, to display projects under their respective group names (e.g., "Work," "Personal," "Groceries"), you'd need a way to translate these IDs into meaningful labels. Without a dedicated API endpoint or inclusion of the group name in the project schema, this becomes difficult or impossible without resorting to workarounds.

Root Cause: Missing API Endpoint

The root cause is simply a missing feature in the TickTick API. The API designers appear to have focused on providing the groupId for relational purposes, but neglected to provide a mechanism for resolving that ID back to the group's name. This is a common oversight in API design, where the focus is on data relationships without considering the usability of that data for display purposes.

Solution: Requesting an API Enhancement

The ideal solution is for TickTick to enhance their API. There are two primary ways they could address this:

  1. Introduce a new endpoint specifically for retrieving group details by ID. This endpoint would accept a groupId as a parameter and return a JSON object containing the group's name and potentially other relevant information.
  2. Expand the TickTickProjectSchema to include the group name. This would involve adding a groupName field to the JSON representation of a project. This approach would avoid the need for an additional API call, as the group name would be readily available alongside the project details.

Here's an example of what the JSON response from a new endpoint might look like:


{
  "groupId": "12345",
  "groupName": "Work Projects",
  "otherRelevantData": "..."
}

And here's how including the name in the project schema might look:


{
  "id": "project123",
  "name": "Implement Feature X",
  "groupId": "12345",
  "groupName": "Work Projects",
  "status": "In Progress"
}

Practical Considerations and Workarounds

While waiting for an official API update, consider these workarounds:

Ultimately, the best solution is for TickTick to provide a proper API endpoint or schema enhancement. This will ensure a robust and reliable way to access group names, enabling developers to build more sophisticated and user-friendly integrations.