Skip to content

Get enterprise milestone details

GET /api/v8/enterprises/{enterprise}/milestones/{milestone_id}

Call this endpoint to get enterprise milestone details.

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

Field Type Always returned Nullable Description
id integer Yes No Milestone ID
title string Yes No Title
description string Yes No Description
state string Yes No State
created_at string Yes No Creation time
updated_at string Yes No Update time
due_date string No Yes Due date
start_date string No Yes Start date
projects string[] Yes No List of associated projects

Error response

When a required parameter is missing or the access credentials are invalid, the endpoint returns the corresponding error response.

400 Invalid parameters

{
  "error": "invalid_request",
  "message": "Parameter missing or invalid",
  "field": "parameter name"
}

401 Unauthenticated

{
  "error": "unauthorized",
  "message": "Missing or invalid access token"
}

HTTP status codes

Status code Description
200 Success (OK)
400 Invalid parameters (Bad Request)
401 Authentication required (Requires authentication)
404 Resource does not exist (Not Found)

Request example

Parameter notes

Replace <enterprise> with the enterprise ID, <milestone_id> with the milestone ID, and <token> with your AtomGit user access token.

cURL

curl -X GET '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>",
  {
    headers: {
      "Accept": "application/json",
    },
  }
);

if (!response.ok) {
  throw new Error(`Request failed: ${response.status}`);
}

const data = await response.json();
console.log(data);

Python

import requests

resp = requests.get(
    "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(resp.json())

Response example

Status code: 200

{
  "id": 0,
  "title": "string",
  "description": "string",
  "state": "string",
  "created_at": "string",
  "updated_at": "string",
  "due_date": "string",
  "start_date": "string",
  "projects": ["string"]
}

Error codes

Error code Description
400 Invalid parameters or the request cannot be parsed
401 Unauthenticated or invalid credentials (missing or invalid access credentials)
404 Request path does not exist
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