Use this API to list to-do items, mark them as done, and create a to-do item for an issue or a merge request.
Create a to-do item for an issuable
POST /api/v4/projects/{id}/issues/{issue_iid}/todo
Creates a to-do item for the current user on a specified issuable. If a to-do item already exists for the user on that issuable, returns a 304 status code.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
issue_Path, | Integer | The internal ID of an issuable |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Create a to-do item for an issuable
POST /api/v4/projects/{id}/merge_requests/{merge_request_iid}/todo
Creates a to-do item for the current user on a specified issuable. If a to-do item already exists for the user on that issuable, returns a 304 status code.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | The ID or URL- |
merge_Path, | Integer | The internal ID of an issuable |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
List all to-do items
GET /api/v4/todos
Lists all to-do items. When no filter is applied, it returns all pending to-do items for the current user. Different filters allow the user to refine the request.
Parameters
| Name | Type | Description |
|---|---|---|
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
actionQuery | String | The action to be filtered Allowed values: assigned,review_,mentioned,build_,marked,approval_,unmergeable,directly_,member_,review_,ssh_,ssh_,transfer_,merge_ |
author_Query | Integer | The ID of an author |
project_Query | Integer | The ID of a project |
group_Query | Integer | The ID of a group |
stateQuery | String | The state of the to- Allowed values: pending,done |
typeQuery | String | The type of to- Allowed values: Commit,Issue,Work,Merge,Design,Alert,Namespace,Project,Key,Wiki |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
Mark all to-do items as done
POST /api/v4/todos/mark_as_done
Marks all pending to-do items for the current user as done. It returns the HTTP status code 204 with an empty response.
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
Mark a to-do item as done
POST /api/v4/todos/{id}/mark_as_done
Marks a to-do item for the current user as done.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | Integer | The ID of to- |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad Request | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |
APIEntitiesNamespaceBasic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:https: |
full_ | String | Example:group/ |
id | Integer (int64) | Example:2 |
kind | String | Example:project |
name | String | Example:project |
parent_ | Integer (int64) | Example:1 |
path | String | Example:my_ |
web_ | String | Example:https: |
APIEntitiesProjectIdentity
| Property | Type | Description |
|---|---|---|
created_ | String (date- | Example:2020- |
description | String | Example:desc |
id | Integer (int64) | Example:1 |
name | String | Example:project1 |
name_ | String | Example:John Doe / |
path | String | Example:project1 |
path_ | String | Example:namespace1/ |
APIEntitiesTodo
| Property | Type | Description |
|---|---|---|
action_ | String | Example:assigned |
author | APIEntities | — |
body | String | Example:Task description |
created_ | String (date- | Example:2016- |
group | APIEntities | — |
id | Integer (int64) | — |
project | APIEntities | — |
state | String | Example:pending |
target | Object | — |
target_ | String | Example:Issue |
target_ | String | Example:http: |
updated_ | String (date- | Example:2016- |
APIEntitiesUserBasic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | Example:https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | Example:1 |
locked | Boolean | — |
name | String | Example:Administrator |
public_ | String | Example:john@example. |
state | String | Example:active |
username | String | Example:admin |
web_ | String | Example:https: |