Delete organization discussion comment¶
DELETE /api/v5/orgs/{org}/discuss/{number}/comment/{id}
This endpoint deletes a comment under a discussion in the specified organization. You specify the organization path, discussion number, and comment id; on success it returns status code 200 with an empty response body.
Access token support¶
- AtomGit user access token (AtomGit user access tokens)
Anonymous access¶
This endpoint does not allow anonymous access
Request parameters¶
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
org |
path | string | Yes | Organization path (path) |
number |
path | integer | Yes | Discussion number |
id |
path | string | Yes | Comment ID |
access_token |
query | string | Yes | User authorization code |
Response parameters¶
On success this endpoint returns 200 with an empty response body and no business data.
Error response¶
400 Parameter error
{
"error": "invalid_request",
"message": "Parameter validation failed",
"field": "<parameter name>"
}
401 Unauthenticated
Note: The error response examples above are for reference only; error field names follow what the backend actually returns.
HTTP response status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
400 |
Parameter error (Bad request) |
401 |
Authentication required (Requires authentication) |
403 |
Access forbidden (Forbidden) |
404 |
Resource not found (Not found) |
429 |
Too many requests |
500 |
Internal server error |
Request example¶
Parameter description¶
replace
<org>with the organization path (path); replace<number>with the discussion number; replace<id>with the comment ID; replace<token>with your AtomGit user access token.
cURL¶
curl -X DELETE 'https://api.atomgit.com/api/v5/orgs/<org>/discuss/<number>/comment/<id>?access_token=<token>' \
-H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browser)
const response = await fetch(
"https://api.atomgit.com/api/v5/orgs/<org>/discuss/<number>/comment/<id>?access_token=<token>",
{
method: "DELETE",
headers: {
"Accept": "application/json",
},
}
);
if (!response.ok) {
throw new Error(`Request failed: ${response.status}`);
}
console.log("Deleted successfully");
Python¶
import requests
resp = requests.delete(
"https://api.atomgit.com/api/v5/orgs/<org>/discuss/<number>/comment/<id>",
params={"access_token": "<token>"},
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print("Deleted successfully")
Response example¶
Status code: 200
On successful deletion it returns 200 OK with an empty response body.
Error codes¶
| Error code | Description |
|---|---|
400 |
Parameter error or unparsable request |
401 |
Unauthenticated or invalid credentials (missing/invalid access credentials) |
403 |
Access forbidden |
404 |
Request path does not exist |
429 |
Too many requests; rate limit triggered |
500 |
Internal server error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc