Get the list of projects that enterprise milestones can be associated with¶
GET /api/v8/enterprises/{enterprise}/groups/projects
Call this endpoint to get the list of projects that enterprise milestones can be associated with.
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 |
group_name |
query | string | No | Organization name |
Response parameters¶
The response body is a JSON array where each element is a project object:
project object (array element)
| Field | Type | Always returned | Nullable | Description |
|---|---|---|---|---|
id |
integer | Yes | No | ID |
full_name |
string | Yes | No | Path including the namespace |
human_name |
string | Yes | No | Name including the namespace |
path |
string | Yes | No | Project path |
name |
string | Yes | No | Project name |
created_at |
string | Yes | No | Creation time |
updated_at |
string | Yes | No | Update time |
Error response¶
400 Invalid parameters
401 Unauthenticated
403 Access forbidden
HTTP status codes¶
| Status code | Description |
|---|---|
200 |
Success (OK) |
304 |
Not modified |
401 |
Authentication required (Requires authentication) |
403 |
Access forbidden (Forbidden) |
Request example¶
Parameter notes¶
Replace
<enterprise>with the enterprise ID,<token>with your AtomGit user access token, and<group_name>with the organization name (optional).
cURL¶
curl -X GET 'https://api.atomgit.com/api/v8/enterprises/<enterprise>/groups/projects?access_token=<token>' \
-H 'Accept: application/json'
JavaScript¶
// Native fetch (Node.js 18+ / browsers)
const enterprise = "<enterprise>";
const token = "<token>";
const url = `https://api.atomgit.com/api/v8/enterprises/${enterprise}/groups/projects?access_token=${token}`;
const response = await fetch(url, {
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
enterprise = "<enterprise>"
token = "<token>"
resp = requests.get(
f"https://api.atomgit.com/api/v8/enterprises/{enterprise}/groups/projects",
params={"access_token": token},
headers={"Accept": "application/json"},
timeout=10,
)
resp.raise_for_status()
print(resp.json())
Response example¶
Status code: 200
[
{
"id": 1,
"full_name": "org/repo",
"human_name": "Organization/repository",
"path": "repo",
"name": "repo",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-02T00:00:00Z"
}
]
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