Retrieves the current user's preferred mirror server
Forge and OAuth2 apps cannot access this REST resource.
This request has no parameters.
the preferred mirror server
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/account/settings/preferred-mirror' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
{
"baseUrl": "http://vietnam.example.com",
"enabled": true,
"id": "B0F5-CS21-45C2-CCK3",
"lastSeenDate": "<string>",
"mirrorType": "SINGLE",
"name": "Mirror",
"productVersion": "8.0.0"
}
Sets the mirror specified by a mirror ID as the current user's preferred mirror
Forge and OAuth2 apps cannot access this REST resource.
the mirror ID
string
an empty response indicating that the user setting has been updated
1
2
3
4
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/account/settings/preferred-mirror' \
--header 'Content-Type: application/json' \
--data '"<string>"'
Removes the current user's preferred mirror
Forge and OAuth2 apps cannot access this REST resource.
This request has no parameters.
an empty response indicating that the user setting has been updated
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/mirroring/latest/account/settings/preferred-mirror'
Gets the analytics settings from the mirroring upstream
Forge and OAuth2 apps cannot access this REST resource.
This request has no parameters.
The analytics settings from upstream
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/analyticsSettings' \
--header 'Accept: application/json'
1
2
3
4
5
{
"canCollectAnalytics": true,
"serverTime": 1640390400000,
"supportEntitlementNumber": "SEN-500"
}
Authenticates on behalf of a user. Used by mirrors to check the credentials supplied to them by users. If successful a user and their effective permissions are returned as follows -
Currently only username/password, bearer token and SSH credentials are supported.
Forge and OAuth2 apps cannot access this REST resource.
oneOf [RestUsernamePasswordCredentials, RestBearerTokenCredentials, RestSshCredentials]
Requiredinteger
The user for the supplied credentials and their effective permissions}.
1
2
3
4
5
6
7
8
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/authenticate' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"credentials": {},
"repositoryId": 2154
}'
1
2
3
4
5
6
7
8
9
10
{
"active": true,
"displayName": "Jane Citizen",
"effectivePermissions": {},
"emailAddress": "jane@example.com",
"id": 101,
"name": "jcitizen",
"slug": "jcitizen",
"type": "NORMAL"
}
Returns a list of mirrors
Forge and OAuth2 apps cannot access this REST resource.
number
number
a page of mirrors
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/mirrorServers' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"isLastPage": true,
"limit": 25,
"nextPageStart": 2154,
"size": 1,
"start": 2154,
"values": [
{
"baseUrl": "http://vietnam.example.com",
"enabled": true,
"id": "B0F5-CS21-45C2-CCK3",
"lastSeenDate": "<string>",
"mirrorType": "SINGLE",
"name": "Mirror",
"productVersion": "8.0.0"
}
]
}
Returns the mirror specified by a mirror ID
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredthe mirror
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/mirrorServers/{mirrorId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
{
"baseUrl": "http://vietnam.example.com",
"enabled": true,
"id": "B0F5-CS21-45C2-CCK3",
"lastSeenDate": "<string>",
"mirrorType": "SINGLE",
"name": "Mirror",
"productVersion": "8.0.0"
}
Upgrades the mirror server in question with the provided details.This endpoint can only be called by the mirror instance or system administrators
Since 5.8
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
string
the mirror
1
2
3
4
5
6
7
8
curl --request PUT \
--url 'http://{baseurl}/rest/mirroring/latest/mirrorServers/{mirrorId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"baseUrl": "https://bitbucket-eu.example.com:7990/bitbucket",
"productVersion": "8.0.0"
}'
1
2
3
4
5
6
7
8
9
{
"baseUrl": "http://vietnam.example.com",
"enabled": true,
"id": "B0F5-CS21-45C2-CCK3",
"lastSeenDate": "<string>",
"mirrorType": "SINGLE",
"name": "Mirror",
"productVersion": "8.0.0"
}
Removes a mirror, disabling all access and notifications for the mirror server in question
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredan empty response indicating that the mirror has been removed
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/mirroring/latest/mirrorServers/{mirrorId}'
Publishes a RepositoryMirrorEvent on the event queue.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredinteger
string
string
The event was successfully placed on the queue
1
2
3
4
5
6
7
8
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/mirrorServers/{mirrorId}/events' \
--header 'Content-Type: application/json' \
--data '{
"mirrorRepoId": 42,
"type": "SYNCHRONIZED",
"upstreamRepoId": "24"
}'
Returns the requested project using its primary key ID.
Since 6.7
Forge and OAuth2 apps cannot access this REST resource.
string
RequiredThe project with the specified ID
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/projects/{projectId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
{
"avatar": "<string>",
"description": "The description for my cool project",
"id": 2154,
"key": "PRJ",
"name": "My Cool Project",
"public": true,
"scope": "PROJECT",
"type": "NORMAL"
}
Returns a page of repositories for a given project, enriched with a content hash
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredstring
number
number
A page of repositories with content hashes
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/projects/{projectId}/repos' \
--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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"isLastPage": true,
"limit": 25,
"nextPageStart": 2154,
"size": 1,
"start": 2154,
"values": [
{
"archived": true,
"description": "My repo description",
"forkable": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"id": 2154,
"name": "My repo",
"origin": {
"archived": true,
"description": "My repo description",
"forkable": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"id": 2154,
"name": "My repo",
"partition": 2154,
"project": {
"avatar": "<string>",
"description": "The description for my cool project",
"id": 2154,
"key": "PRJ",
"name": "My Cool Project",
"public": true,
"scope": "PROJECT",
"type": "NORMAL"
},
"public": true,
"relatedLinks": {},
"scmId": "git",
"scope": "REPOSITORY",
"slug": "my-repo",
"state": "AVAILABLE",
"statusMessage": "Available"
},
"partition": 2154,
"project": {
"avatar": "<string>",
"description": "The description for my cool project",
"id": 2154,
"key": "PRJ",
"name": "My Cool Project",
"public": true,
"scope": "PROJECT",
"type": "NORMAL"
},
"properties": {
"contentHash": "457389a0b871fb61012a7351d09aefc0cf1c57c306449d4b5df4d2f381df8433",
"defaultBranchId": "refs/heads/master",
"metadataHash": "11e5cd17e8d74d84a11f2c8a6bbc6ae0a2b69059e54030f49214c94d980364c1"
},
"public": true,
"relatedLinks": {},
"scmId": "git",
"scope": "REPOSITORY",
"slug": "my-repo",
"state": "AVAILABLE",
"statusMessage": "Available"
}
]
}
Returns a page of repositories enriched with a content hash and default branch
Forge and OAuth2 apps cannot access this REST resource.
string
A page of repositories with content hashes and default branch
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/repos' \
--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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"archived": true,
"description": "My repo description",
"forkable": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"id": 2154,
"name": "My repo",
"origin": {
"archived": true,
"description": "My repo description",
"forkable": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"id": 2154,
"name": "My repo",
"partition": 2154,
"project": {
"avatar": "<string>",
"description": "The description for my cool project",
"id": 2154,
"key": "PRJ",
"name": "My Cool Project",
"public": true,
"scope": "PROJECT",
"type": "NORMAL"
},
"public": true,
"relatedLinks": {},
"scmId": "git",
"scope": "REPOSITORY",
"slug": "my-repo",
"state": "AVAILABLE",
"statusMessage": "Available"
},
"partition": 2154,
"project": {
"avatar": "<string>",
"description": "The description for my cool project",
"id": 2154,
"key": "PRJ",
"name": "My Cool Project",
"public": true,
"scope": "PROJECT",
"type": "NORMAL"
},
"properties": {
"contentHash": "457389a0b871fb61012a7351d09aefc0cf1c57c306449d4b5df4d2f381df8433",
"defaultBranchId": "refs/heads/master",
"metadataHash": "11e5cd17e8d74d84a11f2c8a6bbc6ae0a2b69059e54030f49214c94d980364c1"
},
"public": true,
"relatedLinks": {},
"scmId": "git",
"scope": "REPOSITORY",
"slug": "my-repo",
"state": "AVAILABLE",
"statusMessage": "Available"
}
Returns a repository enriched with a content hash and default branch
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredboolean
The repository with the specified repoId
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/repos/{repoId}' \
--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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"archived": true,
"description": "My repo description",
"forkable": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"id": 2154,
"name": "My repo",
"origin": {
"archived": true,
"description": "My repo description",
"forkable": true,
"hierarchyId": "e3c939f9ef4a7fae272e",
"id": 2154,
"name": "My repo",
"partition": 2154,
"project": {
"avatar": "<string>",
"description": "The description for my cool project",
"id": 2154,
"key": "PRJ",
"name": "My Cool Project",
"public": true,
"scope": "PROJECT",
"type": "NORMAL"
},
"public": true,
"relatedLinks": {},
"scmId": "git",
"scope": "REPOSITORY",
"slug": "my-repo",
"state": "AVAILABLE",
"statusMessage": "Available"
},
"partition": 2154,
"project": {
"avatar": "<string>",
"description": "The description for my cool project",
"id": 2154,
"key": "PRJ",
"name": "My Cool Project",
"public": true,
"scope": "PROJECT",
"type": "NORMAL"
},
"properties": {
"contentHash": "457389a0b871fb61012a7351d09aefc0cf1c57c306449d4b5df4d2f381df8433",
"defaultBranchId": "refs/heads/master",
"metadataHash": "11e5cd17e8d74d84a11f2c8a6bbc6ae0a2b69059e54030f49214c94d980364c1"
},
"public": true,
"relatedLinks": {},
"scmId": "git",
"scope": "REPOSITORY",
"slug": "my-repo",
"state": "AVAILABLE",
"statusMessage": "Available"
}
Returns a page of mirrors for a repository. This resource will return all mirrors along with authorized links to the mirror's repository REST resource. To determine if a repository is available on the mirror, the returned URL needs to be called.
Forge and OAuth2 apps cannot access this REST resource.
string
Requiredboolean
The mirrored repository descriptor
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/repos/{repoId}/mirrors' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
{
"mirrorServer": {
"baseUrl": "http://vietnam.example.com",
"enabled": true,
"id": "B0F5-CS21-45C2-CCK3",
"lastSeenDate": "<string>",
"mirrorType": "SINGLE",
"name": "Mirror",
"productVersion": "8.0.0"
}
}
Retrieves a mirroring request
Forge and OAuth2 apps cannot access this REST resource.
string
number
number
A page of mirroring requests
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/requests' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"isLastPage": true,
"limit": 25,
"nextPageStart": 2154,
"size": 1,
"start": 2154,
"values": [
{
"id": 2154,
"mirrorBaseUrl": "https://bitbucket-eu.example.com:7990/bitbucket",
"mirrorId": "4f0eb5fc-67fc-48f8-b4a7-87981f026c6a",
"mirrorName": "Bitbucket Mirror",
"mirrorType": "SINGLE",
"productVersion": "8.0.0",
"state": "PENDING"
}
]
}
Creates a new mirroring request
Forge and OAuth2 apps cannot access this REST resource.
string
string
string
string
string
string
The created mirroring request
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/requests' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"mirrorBaseUrl": "https://bitbucket-eu.example.com:7990/bitbucket",
"mirrorId": "4f0eb5fc-67fc-48f8-b4a7-87981f026c6a",
"mirrorName": "Bitbucket Mirror",
"mirrorType": "SINGLE",
"productVersion": "8.0.0",
"state": "PENDING"
}'
1
2
3
4
5
6
7
8
9
{
"id": 2154,
"mirrorBaseUrl": "https://bitbucket-eu.example.com:7990/bitbucket",
"mirrorId": "4f0eb5fc-67fc-48f8-b4a7-87981f026c6a",
"mirrorName": "Bitbucket Mirror",
"mirrorType": "SINGLE",
"productVersion": "8.0.0",
"state": "PENDING"
}
Retrieves a mirroring request
Forge and OAuth2 apps cannot access this REST resource.
string
RequiredThe mirroring request
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/mirroring/latest/requests/{mirroringRequestId}' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
{
"id": 2154,
"mirrorBaseUrl": "https://bitbucket-eu.example.com:7990/bitbucket",
"mirrorId": "4f0eb5fc-67fc-48f8-b4a7-87981f026c6a",
"mirrorName": "Bitbucket Mirror",
"mirrorType": "SINGLE",
"productVersion": "8.0.0",
"state": "PENDING"
}
Deletes a mirroring request
Forge and OAuth2 apps cannot access this REST resource.
string
RequiredThe request was deleted
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/mirroring/latest/requests/{mirroringRequestId}'
Accepts a mirroring request
Forge and OAuth2 apps cannot access this REST resource.
string
RequiredThe accepted mirror server
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/requests/{mirroringRequestId}/accept' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
{
"baseUrl": "http://vietnam.example.com",
"enabled": true,
"id": "B0F5-CS21-45C2-CCK3",
"lastSeenDate": "<string>",
"mirrorType": "SINGLE",
"name": "Mirror",
"productVersion": "8.0.0"
}
Rejects a mirroring request
Forge and OAuth2 apps cannot access this REST resource.
string
RequiredThe rejected mirror server
1
2
3
curl --request POST \
--url 'http://{baseurl}/rest/mirroring/latest/requests/{mirroringRequestId}/reject' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
{
"baseUrl": "http://vietnam.example.com",
"enabled": true,
"id": "B0F5-CS21-45C2-CCK3",
"lastSeenDate": "<string>",
"mirrorType": "SINGLE",
"name": "Mirror",
"productVersion": "8.0.0"
}
Rate this page: