Delete an enterprise milestone¶
DELETE /api/v8/enterprises/{enterprise}/milestones/{milestone_id}
Call this endpoint to delete an enterprise milestone.
Supported access tokens¶
- AtomGit user access tokens
Anonymous access allowed¶
This endpoint does not allow anonymous access.
Request parameters¶
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
enterprise |
path | string | Yes | Enterprise ID |
milestone_id |
path | string | Yes | Milestone ID |
access_token |
query | string | Yes | User authorization code |
Response parameters¶
On successful deletion the endpoint returns HTTP 200 with an empty response body, so there is nothing to parse.
Error response¶
On failure the backend returns a uniform
ApiErrorRespstructure (fields serialized in snake_case); the actualerror_code_namevalues follow what the backend returns.
400 Invalid parameters
{
"error_code": 400,
"error_code_name": "PARAMETER_ERROR",
"error_message": "Invalid parameters",
"trace_id": "<trace-id>"
}
401 Unauthenticated
{
"error_code": 401,
"error_code_name": "UNAUTHORIZED",
"error_message": "Missing or invalid access token",
"trace_id": "<trace-id>"
}
404 Not found
{
"error_code": 404,
"error_code_name": "NOT_FOUND",
"error_message": "Enterprise milestone does not exist",
"trace_id": "<trace-id>"
}
500 Internal system error
{
"error_code": 500,
"error_code_name": "FAIL",
"error_message": "Internal system error",
"trace_id": "<trace-id>"
}
HTTP status codes¶
| Status code | Description |
|---|---|
200 |
Success (deleted successfully; the response body is empty) |
400 |
Invalid parameters (Bad Request) |
401 |
Authentication required (Requires authentication) |
403 |
Access forbidden (Forbidden) |
404 |
Not found |
405 |
Request method not allowed (Method not allowed) |
429 |
Too many requests; rate limit triggered |
500 |
Internal system error (Internal server error) |
Request example¶
Parameter notes¶
Replace
<enterprise>with the enterprise ID,<milestone_id>with the ID of the milestone to delete, and<token>with your AtomGit user access token.
cURL¶
curl -X DELETE 'https://api.atomgit.com/api/v8/enterprises/<enterprise>/milestones/<milestone_id>?access_token=<token>' -H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browsers)
const response = await fetch(
"https://api.atomgit.com/api/v8/enterprises/<enterprise>/milestones/<milestone_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/v8/enterprises/<enterprise>/milestones/<milestone_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 the response body is empty:
Error codes¶
| Error code | Description |
|---|---|
401 |
Unauthenticated or invalid credentials (missing or invalid access credentials) |
400 |
Invalid parameters or the request cannot be parsed |
403 |
Access forbidden |
404 |
Request path or milestone does not exist |
405 |
Request method not supported |
429 |
Too many requests; rate limit triggered |
500 |
Internal system error |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc