API EndpointsListsFetch Sub Lists

Get Sub-Lists

Endpoint

URL: /:projectId/lists/:listId/sub-lists

Method: GET

Authentication Required: Yes


Description

Fetches all sub-lists nested under the specified parent list for the authenticated user.


Request

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authentication.

Path Parameters

ParameterTypeRequiredDescription
listIdstringYesThe ID of the parent list.

Query Parameters

None

Example Request

GET /proj1234/lists/list_abc/sub-lists
Authorization: Bearer <ACCESS_TOKEN>

Response

Success Response (200 OK)

[
  {
    "id": "list_def",
    "projectId": "proj1234",
    "userId": "user_xyz",
    "name": "Sub List 1",
    "parentId": "list_abc",
    "entityIds": [],
    "subLists": [],
    "createdAt": "2024-01-02T00:00:00.000Z",
    "updatedAt": "2024-01-02T00:00:00.000Z"
  },
  {
    "id": "list_ghi",
    "projectId": "proj1234",
    "userId": "user_xyz",
    "name": "Sub List 2",
    "parentId": "list_abc",
    "entityIds": [],
    "subLists": [],
    "createdAt": "2024-01-02T00:00:00.000Z",
    "updatedAt": "2024-01-02T00:00:00.000Z"
  }
]

Error Responses

Missing Parameters (400 Bad Request)

{
  "error": "Missing required parameters in request query",
  "code": "list/missing-params"
}

Server Error (500 Internal Server Error)

{
  "error": "Server error",
  "code": "list/server-error",
  "details": "<Error message>"
}

Notes

  • Only sub-lists belonging to the authenticated user and nested under the specified list are returned.
  • The returned sub-lists are populated with their own metadata (e.g., entity IDs, timestamps).