Skip to main content

Pagination

All list API endpoints support cursor-based pagination through common query parameters. For example, you can paginate through worklog entries, projects, and repositories.

Accomplish's list API methods use cursor-based pagination through the starting_after and ending_before parameters. Both parameters accept an existing object ID value and return objects in reverse chronological order. The ending_before parameter returns objects listed before the named object. The starting_after parameter returns objects listed after the named object. These parameters are mutually exclusive. You can use either the starting_after or ending_before parameter, but not both simultaneously.

Parameters

limit

optional, default is 25

This specifies a limit on the number of objects to return, ranging between 1 and 100.

starting_after

optional object ID

A cursor to use in pagination. starting_after is an object ID that defines your place in the list. For example, if you make a list request and receive 25 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo to fetch the next page of the list.

ending_before

optional object ID

A cursor to use in pagination. ending_before is an object ID that defines your place in the list. For example, if you make a list request and receive 25 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar to fetch the previous page of the list.

List Response Format

All paginated endpoints return a consistent response structure:

{
"entries": [...], // or "projects", "repositories", etc.
"meta": {
"result_count": 2,
"total_count": 12,
"start_cursor": "018eed2f-fb4c-7057-a134-849e91f51112",
"end_cursor": "018eed30-2f7d-79f0-a3c7-01c4a17988f3",
"limit": 25
}
}

Response Fields

  • result_count - Number of items returned in this page
  • total_count - Total number of items matching the query
  • start_cursor - Cursor of the first item in the page
  • end_cursor - Cursor of the last item in the page
  • limit - Maximum number of items returned per page

Example Usage

First page

curl -u YOUR_API_KEY: "https://accomplish.dev/api/v1/worklog/entries?limit=10"

Next page

curl -u YOUR_API_KEY: "https://accomplish.dev/api/v1/worklog/entries?limit=10&starting_after=018eed30-2f7d-79f0-a3c7-01c4a17988f3"

Previous page

curl -u YOUR_API_KEY: "https://accomplish.dev/api/v1/worklog/entries?limit=10&ending_before=018eed2f-fb4c-7057-a134-849e91f51112"