Refreshes configuration of the sidecar running on each node in the farm
This request has no parameters.
The configuration of the sidecar running on each node in the farm has been refreshed
any
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/mesh/config/refresh' \
--header 'Accept: application/json'
Retrieves a list of repository IDs which have not synced on the mirror node for at least the threshold time limit after the content was changed in the corresponding upstream repositories. The threshold time limit is defined by a configuration property plugin.mirroring.repository.diagnostics.sync.tolerance
. The detection of out of sync repositories is dependent on the timing of a scheduled job which is controlled by a configuration property plugin.mirroring.synchronization.interval
which means in worst case it can take upto plugin.mirroring.repository.diagnostics.sync.tolerance
+ plugin.mirroring.synchronization.interval
time to detect an out-of-sync repository.
To use this API, a configuration property plugin.mirroring.repository.diagnostics.sync.enabled
has to be set to true
as this feature is disabled by default.
This request has no parameters.
The upstream IDs of the repositories that are out of sync on the mirror node
string
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/supportInfo/out-of-sync-repos/content' \
--header 'Accept: application/json;charset=UTF-8'
Retrieves the information about the process owning the sync lock for this repository. The process owning the lock could be running on any of the nodes in the mirror farm
string
Requiredstring
RequiredThe information about the repository lock owner for the syncing process, if the lock is currently being held, otherwise an empty response
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/supportInfo/projects/{projectKey}/repos/{repositorySlug}/repo-lock-owner' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
{
"nodeId": "4da47d83-ec95-489d-ad46-012cc086c0da",
"externalRepositoryId": "101",
"lockAcquireTime": "<string>",
"requestId": "*T75X1Tx955x782x0",
"threadName": "farm-refchange-poller:thread-2"
}
Retrieves information about an external repository mirrored by the mirror server. Particularly the local ID & external ID of the repository
string
Requiredstring
RequiredThe sync status of the repository on this node
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/supportInfo/projects/{projectKey}/repos/{repositorySlug}/repoSyncStatus' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"externalRepoId": "1",
"failedSyncCount": 1,
"hashes": {
"metadata": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a",
"content": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a"
},
"lastSyncDate": "<string>",
"localProjectId": 1,
"localRepoId": 1,
"upstreamId": "148728f5-df0f-3f3e-af11-5ca16be3725f",
"initialSyncDate": "<string>"
}
Retrieves a list of up to plugin.mirroring.farm.max.ref.change.queue.dump.size
items currently in the ref changes queue. The ref changes queue is an internal component of every mirror farm, and is shared between all nodes. When the contents of an upstream repository changes, an item is added to this queue so that the mirror farm nodes know to synchronize. The mirror farm constantly polls and removes items from this queue for processing, so it is empty most of the time.
This request has no parameters.
The contents of the ref changes queue
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/supportInfo/refChangesQueue' \
--header 'Accept: application/json;charset=UTF-8'
Retrieves the total number of items currently in the ref changes queue
This request has no parameters.
The total number of items currently in the ref changes queue
any
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/supportInfo/refChangesQueue/count' \
--header 'Accept: application/json'
Retrieves the information about all the processes from the all the nodes in the mirror farm owning sync lock for any repository
This request has no parameters.
A list of all the repository lock owners for the syncing process
array<RestRepositoryLockOwner>
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/supportInfo/repo-lock-owners' \
--header 'Accept: application/json;charset=UTF-8'
Retrieves a page of sync statuses of the repositories on this mirror node
number
number
The sync status of the repositories on this node
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/supportInfo/repoSyncStatus' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"values": [
{
"externalRepoId": "1",
"failedSyncCount": 1,
"hashes": {
"metadata": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a",
"content": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a"
},
"lastSyncDate": "<string>",
"localProjectId": 1,
"localRepoId": 1,
"upstreamId": "148728f5-df0f-3f3e-af11-5ca16be3725f",
"initialSyncDate": "<string>"
}
],
"size": 1,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154,
"limit": 25
}
Retrieves a page of upstream servers
number
number
A page of upstream servers
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"values": [
{
"apiBaseUrl": "https://bitbucket.example.com",
"baseUrl": "https://bitbucket.example.com",
"id": "f76a35c5-4592-425d-bf85-b4d9db68e809",
"state": "INSTALLED",
"type": "server"
}
],
"size": 1,
"isLastPage": true,
"nextPageStart": 2154,
"start": 2154,
"limit": 25
}
Retrieves upstream server details by ID.
string
RequiredThe upstream server.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
{
"apiBaseUrl": "https://bitbucket.example.com",
"baseUrl": "https://bitbucket.example.com",
"id": "f76a35c5-4592-425d-bf85-b4d9db68e809",
"state": "INSTALLED",
"type": "server"
}
Retrieves the list of farm nodes in this cluster
string
RequiredThe list of farm nodes
array<RestClusterNode>
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/farmNodes' \
--header 'Accept: application/json;charset=UTF-8'
Retrieves synchronization progress state for the specified upstream server.If there's no progress to report, this resource will return
If there are repositories in the process of synchronizing, but the precise number hasn't been discovered yet, this resource will return:1
{"discovering":false,"syncedRepos":0,"totalRepos":0}
If there is progress to report and the total number of repositories is known, this resource will return:1
{"discovering":true,"syncedRepos":3,"totalRepos":100}
1
{"discovering":false,"syncedRepos":242,"totalRepos":1071}
string
Requiredthe synchronization progress state
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/progress' \
--header 'Accept: application/json'
1
2
3
4
5
{
"discovering": true,
"syncedRepos": 2154,
"totalRepos": 2154
}
Retrieves all available clone urls for the specified repository.
string
Requiredstring
RequiredThe mirrored repository's information.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/repos/{upstreamRepoId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"cloneUrls": [
{
"href": "https://bitbucket.example.com/scm/awesomeproject/awesomerepo.git",
"name": "http"
}
],
"mirrorName": "Saigon Mirror",
"pushUrls": [
{
"href": "https://bitbucket.example.com/scm/awesomeproject/awesomerepo.git",
"name": "http"
}
],
"available": true,
"lastUpdated": "<string>",
"status": "NOT_MIRRORED",
"repositoryId": "1"
}
Retrieves upstream settings
string
Requiredthe mirror settings
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings' \
--header 'Accept: application/json'
1
2
3
4
5
6
{
"projectIds": [
"<string>"
],
"mode": "ALL_PROJECTS"
}
Sets the settings for the specified upstream
string
Requiredthe mirror settings to update to
array<string>
string
the updated mirror settings
1
2
3
4
5
6
7
8
9
10
curl --request PUT \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"projectIds": [
"<string>"
],
"mode": "ALL_PROJECTS"
}'
1
2
3
4
5
6
{
"projectIds": [
"<string>"
],
"mode": "ALL_PROJECTS"
}
Gets the current mirror mode for the specified upstream
string
Requiredthe current mirror mode
any
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/mode' \
--header 'Accept: application/json'
Sets the mirror mode for the specified upstream
string
Requiredstring
the mode to set
any
1
2
3
4
5
curl --request PUT \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/mode' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '"<string>"'
Returns the IDs of the projects that the mirror is configured to mirror
string
Requiredthe currently mirrored project IDs
any
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/projects' \
--header 'Accept: application/json'
Configures the mirror to mirror the provided projects
string
Requiredarray<string>
the currently mirrored project IDs
any
1
2
3
4
5
6
7
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/projects' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '[
"<string>"
]'
Configures the mirror to no longer mirror the provided projects
string
Requiredarray<string>
the request has been processed
1
2
3
4
5
6
curl --request DELETE \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/projects' \
--header 'Content-Type: application/json' \
--data '[
"<string>"
]'
Configures the mirror to mirror the provided project
string
Requiredstring
Requiredthe currently mirrored project IDs
any
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/projects/{projectId}' \
--header 'Accept: application/json'
Configures the mirror to no longer mirror the provided project
string
Requiredstring
Requiredthe request has been processed
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/projects/{projectId}'
Rate this page: