Update an issue
const url = 'http://localhost:8080/api/v1/projects/example/issues/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"description":"example","state":"open","title":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:8080/api/v1/projects/example/issues/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "description": "example", "state": "open", "title": "example" }'Project members and above. API keys and personal access tokens cannot call it. title renames the issue and records a renamed event. description records no event; null clears it. state resolves, ignores or reopens the issue and records a state_changed event; a resolved issue that recurs is reopened as regressed. merged is refused: merge with the merge operation. Setting a value it already has changes nothing. A merged issue cannot change (409).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project UUID, URL-encoded org-slug/project-slug, or current.
Issue id.
Request Bodyrequired
Section titled “Request Bodyrequired”PATCH …/issues/{id} body. Absent means unchanged (spec 09 § Issues).
Optional fields refuse null, except description, where null clears it.
object
New description, at most 2000 characters. null or "" clears it. Records no event.
open, resolved or ignored. merged is refused: merge with the merge operation.
New title, 1 to 200 characters after trimming. A change records a renamed event.
Responses
Section titled “Responses”The updated issue, with its counts over the last 24 hours.
An issue: one distinct error of an error source (spec 09 § Issues, D-IC-10).
object
Occurrences in the period: the last 24 hours on get, or the from/to period on
list. Counts the issue’s own occurrences and those of the issues merged into it.
Creation time. JSON is RFC 3339.
Description written by a member. Omitted when there is none.
Start of the earliest occurrence. JSON is RFC 3339.
Issue id.
Kind of that source.
Start of the latest occurrence. JSON is RFC 3339.
Issues merged into this one. Their occurrences count here. Ordered by occurrence count over the read’s period, most first, then by id.
The issue this one was merged into. Omitted unless state is merged.
The project the issue belongs to.
true when a resolved issue recurred and was reopened.
When it was resolved. Omitted unless the issue is resolved.
Who resolved it. Omitted when nobody did or the user is unknown.
Name of the occurrence scores of this issue: issue:<id>.
The source the issue belongs to.
Name of that source.
Lifecycle state.
Title, from the error.
Last change time. JSON is RFC 3339.
Distinct users in the same period: the largest user count of the issue’s names, so an approximation when merged issues share users.
Example
{ "kind": "error", "state": "open"}The request is malformed or a filter is invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The resource does not exist.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The request conflicts with the current state.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}