• Authentication
  • Builds and Deployments
  • Capabilities
  • Dashboard
  • Deprecated
  • Jira Integration
  • Markup
  • Mirroring (Mirror)
  • Mirroring (Upstream)
  • Permission Management
  • Project
  • Pull Requests
  • Repository
  • Security
  • System Maintenance
  • Other operations
Server
Bitbucket Data Center / / Modules

Mirroring (Mirror)

Postman Collection
OpenAPI
GET

Get mirroring latest supportInfo refChangesQueue

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.

Request

This request has no parameters.

Responses

The contents of the ref changes queue

application/json;charset=UTF-8

RestRefSyncQueue
GET/mirroring/latest/supportInfo/refChangesQueue
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/supportInfo/refChangesQueue' \ --header 'Accept: application/json;charset=UTF-8'
GET

Get mirroring latest supportInfo refChangesQueue count

Retrieves the total number of items currently in the ref changes queue

Request

This request has no parameters.

Responses

The total number of items currently in the ref changes queue

application/json

any

GET/mirroring/latest/supportInfo/refChangesQueue/count
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/supportInfo/refChangesQueue/count' \ --header 'Accept: application/json'
GET

Get mirroring latest supportInfo repoSyncStatus

Retrieves a page of sync statuses of the repositories on this mirror node

Request

Query parameters

start

number

limit

number

Responses

The sync status of the repositories on this node

application/json

object
GET/mirroring/latest/supportInfo/repoSyncStatus
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/supportInfo/repoSyncStatus' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 { "values": [ { "upstreamId": "148728f5-df0f-3f3e-af11-5ca16be3725f", "initialSyncDate": "<string>", "repoSlug": "mirrortestrepo", "localRepoId": 1, "localProjectId": 1, "failedSyncCount": 1, "externalRepoId": "1", "lastSyncDate": "<string>", "hashes": { "metadata": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a", "content": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a" } } ], "size": 1, "isLastPage": true, "nextPageStart": 2154, "start": 2154, "limit": 25 }
GET

Get upstream servers

Retrieves a page of upstream servers

Request

Query parameters

start

number

limit

number

Responses

A page of upstream servers

application/json

object
GET/mirroring/latest/upstreamServers
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers' \ --header 'Accept: application/json'
200Response
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 }
GET

Get upstream server by ID

Retrieves upstream server details by ID.

Request

Path parameters

upstreamId

string

Required

Responses

The upstream server.

application/json

RestUpstreamServer
GET/mirroring/latest/upstreamServers/{upstreamId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}' \ --header 'Accept: application/json'
200Response
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" }
GET

Get farm nodes

Retrieves the list of farm nodes in this cluster

Request

Path parameters

upstreamId

string

Required

Responses

The list of farm nodes

application/json;charset=UTF-8

array<RestClusterNode>

GET/mirroring/latest/upstreamServers/{upstreamId}/farmNodes
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/farmNodes' \ --header 'Accept: application/json;charset=UTF-8'
GET

Get synchronization progress state

Retrieves synchronization progress state for the specified upstream server.If there's no progress to report, this resource will return

1 {"discovering":false,"syncedRepos":0,"totalRepos":0}
If there are repositories in the process of synchronizing, but the precise number hasn't been discovered yet, this resource will return:
1 {"discovering":true,"syncedRepos":3,"totalRepos":100}
If there is progress to report and the total number of repositories is known, this resource will return:
 
1 {"discovering":false,"syncedRepos":242,"totalRepos":1071}

Request

Path parameters

upstreamId

string

Required

Responses

the synchronization progress state

application/json

RestSyncProgress
GET/mirroring/latest/upstreamServers/{upstreamId}/progress
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/progress' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 { "totalRepos": 2154, "syncedRepos": 2154, "discovering": true }
GET

Get clone URLs

Retrieves all available clone urls for the specified repository.

Request

Path parameters

upstreamRepoId

string

Required
upstreamId

string

Required

Responses

The mirrored repository's information.

application/json

RestMirroredRepository
GET/mirroring/latest/upstreamServers/{upstreamId}/repos/{upstreamRepoId}
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/repos/{upstreamRepoId}' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "pushUrls": [ { "href": "https://bitbucket.example.com/scm/awesomeproject/awesomerepo.git", "name": "http" } ], "mirrorName": "Saigon Mirror", "cloneUrls": [ { "href": "https://bitbucket.example.com/scm/awesomeproject/awesomerepo.git", "name": "http" } ], "available": true, "repositoryId": "1", "lastUpdated": "<string>", "status": "NOT_MIRRORED" }
GET

Get upstream settings

Retrieves upstream settings

Request

Path parameters

upstreamId

string

Required

Responses

the mirror settings

application/json

RestUpstreamSettings
GET/mirroring/latest/upstreamServers/{upstreamId}/settings
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 { "projectIds": [ "<string>" ], "mode": "ALL_PROJECTS" }
PUT

Update upstream settings

Sets the settings for the specified upstream

Request

Path parameters

upstreamId

string

Required

Request bodyapplication/json

the mirror settings to update to

projectIds

array<string>

mode

string

Responses

the updated mirror settings

application/json

RestUpstreamSettings
PUT/mirroring/latest/upstreamServers/{upstreamId}/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" }'
200Response
1 2 3 4 5 6 { "projectIds": [ "<string>" ], "mode": "ALL_PROJECTS" }
GET

Get mirror mode

Gets the current mirror mode for the specified upstream

Request

Path parameters

upstreamId

string

Required

Responses

the current mirror mode

application/json

any

GET/mirroring/latest/upstreamServers/{upstreamId}/settings/mode
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/mode' \ --header 'Accept: application/json'
PUT

Update mirror mode

Sets the mirror mode for the specified upstream

Request

Path parameters

upstreamId

string

Required

Request bodyapplication/json

string

Responses

the mode to set

application/json

any

PUT/mirroring/latest/upstreamServers/{upstreamId}/settings/mode
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>"'
GET

Get mirrored project IDs

Returns the IDs of the projects that the mirror is configured to mirror

Request

Path parameters

upstreamId

string

Required

Responses

the currently mirrored project IDs

application/json

any

GET/mirroring/latest/upstreamServers/{upstreamId}/settings/projects
1 2 3 curl --request GET \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/projects' \ --header 'Accept: application/json'
POST

Add multiple projects to be mirrored

Configures the mirror to mirror the provided projects

Request

Path parameters

upstreamId

string

Required

Request bodyapplication/json

array<string>

Responses

the currently mirrored project IDs

application/json

any

POST/mirroring/latest/upstreamServers/{upstreamId}/settings/projects
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>" ]'
DEL

Stop mirroring projects

Configures the mirror to no longer mirror the provided projects

Request

Path parameters

upstreamId

string

Required

Request bodyapplication/json

array<string>

Responses

the request has been processed

DEL/mirroring/latest/upstreamServers/{upstreamId}/settings/projects
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>" ]'
POST

Add project to be mirrored

Configures the mirror to mirror the provided project

Request

Path parameters

upstreamId

string

Required
projectId

string

Required

Responses

the currently mirrored project IDs

application/json

any

POST/mirroring/latest/upstreamServers/{upstreamId}/settings/projects/{projectId}
1 2 3 curl --request POST \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/projects/{projectId}' \ --header 'Accept: application/json'
DEL

Stop mirroring project

Configures the mirror to no longer mirror the provided project

Request

Path parameters

upstreamId

string

Required
projectId

string

Required

Responses

the request has been processed

DEL/mirroring/latest/upstreamServers/{upstreamId}/settings/projects/{projectId}
1 2 curl --request DELETE \ --url 'http://{baseurl}/rest/mirroring/latest/upstreamServers/{upstreamId}/settings/projects/{projectId}'

Rate this page: