-
Notifications
You must be signed in to change notification settings - Fork 121
Document my assignments API endpoints #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
robzolkos
wants to merge
3
commits into
basecamp:master
Choose a base branch
from
robzolkos:rzolkos/assignments-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+206
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,205 @@ | ||
| My assignments | ||
| =============== | ||
|
|
||
| Endpoints for retrieving the current user's assignments, including active assignments split by priority, completed assignments, and due assignments filtered by time scope. | ||
|
|
||
| Each assignment includes its content, type, bucket, parent, assignees, due dates, completion status, and any child assignments (e.g. card steps nested under their parent card). | ||
|
|
||
robzolkos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| **Note:** These endpoints return the full result set and are not paginated. | ||
|
|
||
| Endpoints: | ||
|
|
||
| - [Get assignments](#get-assignments) | ||
| - [Get completed assignments](#get-completed-assignments) | ||
| - [Get due assignments](#get-due-assignments) | ||
|
|
||
|
|
||
| Get assignments | ||
| --------------- | ||
|
|
||
| * `GET /my/assignments.json` will return the current user's active assignments grouped into `priorities` and `non_priorities`. Card table steps are normalized to their parent card, with steps included as `children`. | ||
|
|
||
| ###### Example JSON Response | ||
| <!-- START GET /my/assignments.json --> | ||
| ```json | ||
| { | ||
| "priorities": [ | ||
| { | ||
| "id": 9007199254741623, | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504/todos/9007199254741623", | ||
| "content": "Program the flux capacitor", | ||
| "starts_on": null, | ||
| "due_on": "2026-03-15", | ||
| "bucket": { | ||
| "id": 2085958504, | ||
| "name": "The Leto Laptop", | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504" | ||
| }, | ||
| "completed": false, | ||
| "type": "todo", | ||
| "assignees": [ | ||
robzolkos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| "id": 1049715913, | ||
| "name": "Victor Cooper" | ||
| } | ||
| ], | ||
| "comments_count": 0, | ||
| "has_description": false, | ||
| "priority_recording_id": 9007199254741700, | ||
| "parent": { | ||
| "id": 9007199254741601, | ||
| "title": "Development tasks", | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504/todolists/9007199254741601" | ||
| }, | ||
| "children": [] | ||
| } | ||
| ], | ||
| "non_priorities": [ | ||
| { | ||
| "id": 9007199254741650, | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504/todos/9007199254741650", | ||
| "content": "Design the landing page", | ||
| "starts_on": null, | ||
| "due_on": null, | ||
| "bucket": { | ||
| "id": 2085958504, | ||
| "name": "The Leto Laptop", | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504" | ||
| }, | ||
| "completed": false, | ||
| "type": "todo", | ||
| "assignees": [ | ||
robzolkos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| "id": 1049715913, | ||
| "name": "Victor Cooper" | ||
| } | ||
| ], | ||
| "comments_count": 2, | ||
| "has_description": true, | ||
| "parent": { | ||
| "id": 9007199254741601, | ||
| "title": "Development tasks", | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504/todolists/9007199254741601" | ||
| }, | ||
| "children": [] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| <!-- END GET /my/assignments.json --> | ||
|
|
||
| Assignments with card table steps are normalized so the parent card appears as the top-level item with its steps nested as `children`. Priority items include a `priority_recording_id` field. | ||
|
|
||
| ###### Copy as cURL | ||
|
|
||
| ```shell | ||
| curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/my/assignments.json | ||
| ``` | ||
|
|
||
|
|
||
| Get completed assignments | ||
| ------------------------- | ||
|
|
||
| * `GET /my/assignments/completed.json` will return the current user's completed assignments. Archived and trashed recordings are excluded. | ||
|
|
||
| ###### Example JSON Response | ||
| <!-- START GET /my/assignments/completed.json --> | ||
| ```json | ||
| [ | ||
| { | ||
| "id": 9007199254741623, | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504/todos/9007199254741623", | ||
| "content": "Program the flux capacitor", | ||
| "starts_on": null, | ||
| "due_on": "2026-03-15", | ||
| "bucket": { | ||
| "id": 2085958504, | ||
| "name": "The Leto Laptop", | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504" | ||
| }, | ||
| "completed": true, | ||
| "type": "todo", | ||
robzolkos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "assignees": [ | ||
| { | ||
| "id": 1049715913, | ||
| "name": "Victor Cooper" | ||
| } | ||
| ], | ||
| "comments_count": 0, | ||
| "has_description": false, | ||
| "parent": { | ||
| "id": 9007199254741601, | ||
| "title": "Development tasks", | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504/todolists/9007199254741601" | ||
| }, | ||
| "children": [] | ||
| } | ||
| ] | ||
| ``` | ||
| <!-- END GET /my/assignments/completed.json --> | ||
|
|
||
| ###### Copy as cURL | ||
|
|
||
| ```shell | ||
| curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/my/assignments/completed.json | ||
| ``` | ||
|
|
||
|
|
||
| Get due assignments | ||
| ------------------- | ||
|
|
||
| * `GET /my/assignments/due.json` will return the current user's assignments filtered by due date scope. Defaults to `overdue` when no scope is provided. | ||
|
|
||
| _Optional parameters_: | ||
|
|
||
| * `scope` - filter by due date range. Valid options: `overdue`, `due_today`, `due_tomorrow`, `due_later_this_week`, `due_next_week`, `due_later`. | ||
|
|
||
robzolkos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Providing an invalid `scope` returns `400 Bad Request` with an error listing the valid options: | ||
|
|
||
| ```json | ||
| { | ||
| "error": "Invalid scope 'invalid'. Valid options: overdue, due_today, due_tomorrow, due_later_this_week, due_next_week, due_later" | ||
| } | ||
| ``` | ||
|
|
||
| ###### Example JSON Response | ||
| <!-- START GET /my/assignments/due.json --> | ||
| ```json | ||
| [ | ||
| { | ||
| "id": 9007199254741623, | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504/todos/9007199254741623", | ||
| "content": "Program the flux capacitor", | ||
| "starts_on": null, | ||
| "due_on": "2026-03-10", | ||
| "bucket": { | ||
| "id": 2085958504, | ||
| "name": "The Leto Laptop", | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504" | ||
| }, | ||
| "completed": false, | ||
| "type": "todo", | ||
robzolkos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "assignees": [ | ||
| { | ||
| "id": 1049715913, | ||
| "name": "Victor Cooper" | ||
| } | ||
| ], | ||
| "comments_count": 0, | ||
| "has_description": false, | ||
| "parent": { | ||
| "id": 9007199254741601, | ||
| "title": "Development tasks", | ||
| "app_url": "https://3.basecamp.com/195539477/buckets/2085958504/todolists/9007199254741601" | ||
| }, | ||
| "children": [] | ||
| } | ||
| ] | ||
| ``` | ||
| <!-- END GET /my/assignments/due.json --> | ||
|
|
||
| ###### Copy as cURL | ||
|
|
||
| ```shell | ||
| curl -s -H "Authorization: Bearer $ACCESS_TOKEN" https://3.basecampapi.com/$ACCOUNT_ID/my/assignments/due.json?scope=overdue | ||
| ``` | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.