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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” id
required
string
The ID or URL-encoded path of the project owned by the authenticated user
issue_iid
required
integer
The internal ID of an issuable
Responses
Section titled “ Responses ”Created
Media type application/json
object
id
integer format: int64
project
object
id
integer format: int64
description
string
name
string
name_with_namespace
string
path
string
path_with_namespace
string
created_at
string format: date-time
group
object
id
integer format: int64
name
string
path
string
kind
string
full_path
string
parent_id
integer format: int64
avatar_url
string
web_url
string
author
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
action_name
string
target_type
string
target
object
target_url
string
body
string
state
string
created_at
string format: date-time
updated_at
string format: date-time
Example
{ "project": { "id": 1, "description": "desc", "name": "project1", "name_with_namespace": "John Doe / project1", "path": "project1", "path_with_namespace": "namespace1/project1", "created_at": "2020-05-07T04:27:17.016Z" }, "group": { "id": 2, "name": "project", "path": "my_project", "kind": "project", "full_path": "group/my_project", "parent_id": 1, "avatar_url": "https://example.com/avatar/12345", "web_url": "https://example.com/group/my_project" }, "author": { "id": 1, "username": "admin", "public_email": "john@example.com", "name": "Administrator", "state": "active", "avatar_url": "https://gravatar.com/avatar/1", "avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png", "custom_attributes": [ { "key": "foo", "value": "bar" } ], "web_url": "https://gitlab.example.com/root" }, "action_name": "assigned", "target_type": "Issue", "target_url": "http://example.com/foo/bar/-/issues/1", "body": "Task description", "state": "pending", "created_at": "2016-06-17T07:52:35.225Z", "updated_at": "2016-06-17T07:52:35.225Z"}Bad Request
Not Found