Delete the Issue or Pull Request associated with a board¶
DELETE /api/v5/org/{owner}/kanban/{kanban_id}/remove_item
This endpoint removes an Issue or Pull Request associated with the specified board. The request must provide the organization path and board ID, and specify, as an array, the lists of iids of the Issues and Pull Requests to remove in each repository.
Access token support¶
- AtomGit user access token (AtomGit user access tokens)
Anonymous access¶
This endpoint allows anonymous access.
Request parameters¶
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
owner |
path | string | Yes | Organization path |
kanban_id |
path | string | Yes | Board ID |
Request Body:
The request body is an array of objects; each object describes one Issue / Pull Request association to remove.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"repo": {
"description": "Repository path",
"type": "string"
},
"issue_iids": {
"description": "iid of an issue in the repository",
"type": "array",
"items": { "type": "integer" }
},
"pr_iids": {
"description": "iid of a pull request in the repository",
"type": "array",
"items": { "type": "integer" }
}
},
"required": ["repo", "issue_iids", "pr_iids"]
}
}
Response parameters¶
On success, the response body is an empty object {} with no business fields.
Error responses¶
This endpoint currently has no published business error responses. The following are generic error examples that the framework layer may return; the actual error field names are determined by what the backend returns.
400 Invalid parameters
401 Unauthenticated
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
400 |
Invalid parameters (Bad request) |
401 |
Requires authentication |
403 |
Forbidden |
404 |
Request path does not exist (Not found) |
500 |
Internal system error (Internal server error) |
Request example¶
Parameter description¶
Replace
<owner>with the organization path (the address path of an enterprise, organization, or individual); replace<kanban_id>with the board ID; replace<repo>with the repository path; replaceissue_iids/pr_iidswith the lists of iids of the issues and pull requests in the repository, respectively. This endpoint allows anonymous access; the examples may omit the access token. To carry one, appendaccess_token=<token>to the URL.
cURL¶
curl -X DELETE 'https://api.atomgit.com/api/v5/org/<owner>/kanban/<kanban_id>/remove_item' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '[{"repo": "<repo>", "issue_iids": [1, 2], "pr_iids": [3]}]'
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const response = await fetch("https://api.atomgit.com/api/v5/org/<owner>/kanban/<kanban_id>/remove_item", {
method: "DELETE",
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify([
{ repo: "<repo>", issue_iids: [1, 2], pr_iids: [3] },
]),
});
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
const data = await response.json();
console.log(data);
Python¶
import requests
resp = requests.delete(
"https://api.atomgit.com/api/v5/org/<owner>/kanban/<kanban_id>/remove_item",
json=[
{"repo": "<repo>", "issue_iids": [1, 2], "pr_iids": [3]},
],
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
Error codes¶
| Error code | Description |
|---|---|
400 |
Invalid parameters or unparseable request |
401 |
Unauthenticated or invalid credentials |
403 |
Forbidden |
404 |
Request path does not exist |
500 |
Internal system error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc