Skip to content

Get the enterprise milestone list

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

Call this endpoint to get the enterprise milestone list.

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
access_token query string Yes User authorization code
name query string No Name
state query string No State
order_by query string No Sort field. Available: updated_at
sort query string No Sort order. Descending: desc; ascending: asc
page query string No Current page number, default 1
per_page query string No Number of items per page, maximum 100, default 20

Response parameters

Field Type Always returned Nullable Description
id integer Yes — ID
title string Yes — Title
description string Yes — Description
state string Yes — State
created_at string Yes — Creation time
updated_at string Yes — Update time
due_date string No — Due date
start_date string No — Start date
projects object[] Yes — Project list

projects object

Field Type Always returned Nullable Description
projects.id integer Yes — Project ID
projects.description string Yes — Project description
projects.name string Yes — Project name
projects.name_with_namespace string Yes — Name including the namespace
projects.path string Yes — Project path
projects.path_with_namespace string Yes — Path including the namespace
projects.created_at string Yes — Creation time
projects.updated_at string Yes — Update time
projects.archived boolean Yes — Whether the project is archived

Error response

The endpoint may return the following error responses; the sample field names follow what the backend actually returns.

400 Invalid parameters

{
  "error": "invalid_request",
  "message": "Invalid parameter",
  "field": "name"
}

401 Unauthenticated

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

HTTP status codes

Status code Description
200 Success (OK)
401 Authentication required (Requires authentication)
403 Access forbidden (Forbidden)

Request example

Parameter notes

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

cURL

curl -X GET 'https://api.atomgit.com/api/v8/enterprises/<enterprise>/milestones?access_token=<token>' \
  -H 'Accept: application/json'

JavaScript

const response = await fetch(
  "https://api.atomgit.com/api/v8/enterprises/<enterprise>/milestones?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",
    params={"access_token": "<token>"},
    headers={"Accept": "application/json"},
    timeout=10,
)
resp.raise_for_status()

print(resp.json())

Response example

Status code: 200

[
  {
    "id": 1,
    "title": "V1.0 milestone",
    "description": "V1.0 release plan",
    "state": "open",
    "created_at": "2026-01-01T00:00:00+08:00",
    "updated_at": "2026-02-01T00:00:00+08:00",
    "due_date": "2026-03-01",
    "start_date": "2026-01-15",
    "projects": [
      {
        "id": 100,
        "description": "Enterprise API repository",
        "name": "gitcode-open-api",
        "name_with_namespace": "my-enterprise/gitcode-open-api",
        "path": "gitcode-open-api",
        "path_with_namespace": "my-enterprise/gitcode-open-api",
        "created_at": "2025-12-01T00:00:00+08:00",
        "updated_at": "2026-02-01T00:00:00+08:00",
        "archived": false
      }
    ]
  }
]

Error codes

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