Merge an issue into another
const url = 'http://localhost:8080/api/v1/projects/example/issues/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/merge';const options = { method: 'POST', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"into":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/projects/example/issues/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/merge \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "into": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Project members and above. API keys and personal access tokens cannot call it. Folds the issue into into, an issue of the same source that is not merged. The issues merged into it move to into too, so chains stay one level deep. Its occurrences count on into. Answers the target issue. 409 when both are the same issue, the issues are in different sources, this issue is already merged, or the target is merged.
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”POST …/issues/{id}/merge body (spec 09 § Issues).
object
The issue to merge into. It must be an issue of the same source that is not merged.
Example generated
{ "into": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”The target 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"}