Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
99134eac
Commit
99134eac
authored
Nov 07, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation for retrieving Geo nodes and status via API
parent
224e7784
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
142 additions
and
0 deletions
+142
-0
doc/api/README.md
doc/api/README.md
+1
-0
doc/api/geo_nodes.md
doc/api/geo_nodes.md
+141
-0
No files found.
doc/api/README.md
View file @
99134eac
...
...
@@ -20,6 +20,7 @@ following locations:
-
[
Environments
](
environments.md
)
-
[
Events
](
events.md
)
-
[
Feature flags
](
features.md
)
-
[
Geo Nodes
](
geo_nodes.md
)
-
[
Gitignores templates
](
templates/gitignores.md
)
-
[
GitLab CI Config templates
](
templates/gitlab_ci_ymls.md
)
-
[
Groups
](
groups.md
)
...
...
doc/api/geo_nodes.md
0 → 100644
View file @
99134eac
# Geo Nodes API
In order to interact with Geo node endpoints, you need to authenticate yourself
as an admin.
## Retrieve configuration about all Geo nodes
```
GET /geo_nodes
```
```
bash
curl
--header
"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK"
https://gitlab.example.com/api/v4/geo_nodes
```
Example response:
```
json
[
{
"id"
:
1
,
"url"
:
"https://primary.example.com/"
,
"primary"
:
true
,
"enabled"
:
true
,
"files_max_capacity"
:
10
,
"repos_max_capacity"
:
25
,
"clone_protocol"
:
"ssh"
},
{
"id"
:
2
,
"url"
:
"https://secondary.example.com/"
,
"primary"
:
false
,
"enabled"
:
true
,
"files_max_capacity"
:
10
,
"repos_max_capacity"
:
25
,
"clone_protocol"
:
"http"
}
]
```
## Retrieve configuration about a specific Geo node
```
GET /geo_nodes/:id
```
```
bash
curl
--header
"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK"
https://gitlab.example.com/api/v4/geo_nodes/1
```
Example response:
```
json
{
"id"
:
1
,
"url"
:
"https://primary.example.com/"
,
"primary"
:
true
,
"enabled"
:
true
,
"files_max_capacity"
:
10
,
"repos_max_capacity"
:
25
,
"clone_protocol"
:
"ssh"
}
```
## Retrieve status about all secondary Geo nodes
```
GET /geo_nodes/status
```
```
bash
curl
--header
"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK"
https://gitlab.example.com/api/v4/geo_nodes/status
```
Example response:
```
json
[
{
"geo_node_id"
:
2
,
"healthy"
:
true
,
"health"
:
"Healthy"
,
"attachments_count"
:
1
,
"attachments_synced_count"
:
1
,
"attachments_failed_count"
:
0
,
"attachments_synced_in_percentage"
:
"100.00%"
,
"db_replication_lag_seconds"
:
0
,
"lfs_objects_count"
:
0
,
"lfs_objects_synced_count"
:
0
,
"lfs_objects_failed_count"
:
0
,
"lfs_objects_synced_in_percentage"
:
"0.00%"
,
"repositories_count"
:
41
,
"repositories_failed_count"
:
1
,
"repositories_synced_count"
:
40
,
"repositories_synced_in_percentage"
:
"97.56%"
,
"last_event_id"
:
23
,
"last_event_timestamp"
:
1509681166
,
"cursor_last_event_id"
:
23
,
"cursor_last_event_timestamp"
:
1509681166
,
"last_successful_status_check_timestamp"
:
1510125024
}
]
```
## Retrieve status about a specific secondary Geo node
```
GET /geo_nodes/:id/status
```
```
bash
curl
--header
"PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK"
https://gitlab.example.com/api/v4/geo_nodes/2/status
```
Example response:
```
json
{
"geo_node_id"
:
2
,
"healthy"
:
true
,
"health"
:
"Healthy"
,
"attachments_count"
:
1
,
"attachments_synced_count"
:
1
,
"attachments_failed_count"
:
0
,
"attachments_synced_in_percentage"
:
"100.00%"
,
"db_replication_lag_seconds"
:
0
,
"lfs_objects_count"
:
0
,
"lfs_objects_synced_count"
:
0
,
"lfs_objects_failed_count"
:
0
,
"lfs_objects_synced_in_percentage"
:
"0.00%"
,
"repositories_count"
:
41
,
"repositories_failed_count"
:
1
,
"repositories_synced_count"
:
40
,
"repositories_synced_in_percentage"
:
"97.56%"
,
"last_event_id"
:
23
,
"last_event_timestamp"
:
1509681166
,
"cursor_last_event_id"
:
23
,
"cursor_last_event_timestamp"
:
1509681166
,
"last_successful_status_check_timestamp"
:
1510125268
}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment