Skip to content

Add internal API endpoints to list, create and delete related epic

Related to #351597 (closed).

We need internal endpoints to manage related epics, similar to existing ones for related issues. See IssueLinksController.

The request should be able to accept a collection of issuables, because we need to allow bulk-add in the UI. The response should return a collection as well. See comments in #351597 (comment 832411238) for more details.

Example internal API Request Body

{"issuable_references":["#34"],"link_type":"relates_to"}

Example internal API Response Body

{
   "message":null,
   "issuables":[
      {
         "id":476,
         "confidential":false,
         "title":"Dismiss Cipher with no integrity",
         "assignees":[
            
         ],
         "state":"opened",
         "milestone":null,
         "weight":null,
         "reference":"#34",
         "path":"/flightjs/Flight/-/issues/34",
         "due_date":null,
         "created_at":"2022-01-17T12:56:57.954Z",
         "closed_at":null,
         "relation_path":"/flightjs/Flight/-/issues/37/links/3",
         "link_type":"relates_to"
      }
   ]
}

This feature would be developed behind a feature flag and needs to perform license checks (implemented in #352439 (closed)).

Edited by Eugenia Grieff