Questions about creating issues using the RESTful API (OD-621)
Closed
yupix opened 2 years ago

I would like to create an issue using the RESTful API, can you tell me what goes in the fields?

https://code.onedev.io/help/api/io.onedev.server.rest.IssueResource/create

{
    "projectId" : 1,
    "title" : "string",
    "description" : "string",
    "milestoneIds" : [ 1 ],
    "fields" : {
        "string" : "string"
    }
}
yupix changed fields 2 years ago
Name Previous Value Current Value
Type
Discussion
Support Request
Robin Shen commented 2 years ago

projectId: id of the project where you want to create project. It is displayed in the url. For instance for OneDev project, it is 160. You can also get it programmatically this way:

https://code.onedev.io/help/api/io.onedev.server.rest.ProjectResource/queryBasicInfo

milestoneIds: list of ids of milestones. Milestone ids can be queried this way:

https://code.onedev.io/help/api/io.onedev.server.rest.ProjectResource/queryMilestones

fields: list of field name and value, for instance for this issue:

"Type": "Support Request",
"Priority": "Minor",
"Assignee", "1" 

For user type field, user id is expected, and it can be queried this way:

https://code.onedev.io/help/api/io.onedev.server.rest.UserResource/queryBasicInfo

yupix commented 2 years ago

Thank you!

yupix changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
issue 1 of 1
Type
Question
Priority
Minor
Assignee
Issue Votes (0)
Watchers (4)
Reference
OD-621
Please wait...
Page is in error, reload to recover