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": [ { "id": "f76a35c5-4592-425d-bf85-b4d9db68e809", "state": "INSTALLED", "type": "server", "baseUrl": "https://bitbucket.example.com", "apiBaseUrl": "https://bitbucket.example.com" } ], "size": 1, "limit": 25, "isLastPage": true, "nextPageStart": 2154, "start": 2154 }
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 { "id": "f76a35c5-4592-425d-bf85-b4d9db68e809", "state": "INSTALLED", "type": "server", "baseUrl": "https://bitbucket.example.com", "apiBaseUrl": "https://bitbucket.example.com" }
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 { "syncedRepos": 2154, "discovering": true, "totalRepos": 2154 }
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 { "available": true, "cloneUrls": [ { "name": "http", "href": "https://bitbucket.example.com/scm/awesomeproject/awesomerepo.git" } ], "pushUrls": [ { "name": "http", "href": "https://bitbucket.example.com/scm/awesomeproject/awesomerepo.git" } ], "mirrorName": "Saigon Mirror", "status": "NOT_MIRRORED", "repositoryId": "1", "lastUpdated": "<string>" }
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 { "mode": "ALL_PROJECTS", "projectIds": [ "<string>" ] }
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

mode

string

projectIds

array<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 '{ "mode": "ALL_PROJECTS", "projectIds": [ "<string>" ] }'
200Response
1 2 3 4 5 6 { "mode": "ALL_PROJECTS", "projectIds": [ "<string>" ] }
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: