NAME
WebService::BitbucketServer::MirroringUpstream::V1 - Bindings for a Bitbucket Server REST API
VERSION
version 0.600
SYNOPSIS
my $stash = WebService::BitbucketServer->new(
base_url => 'https://stash.example.com/',
username => 'bob',
password => 'secret',
);
my $api = $stash->mirroring_upstream;
DESCRIPTION
This is a Bitbucket Server REST API for MirroringUpstream::V1.
Original API documentation created by and copyright Atlassian.
ATTRIBUTES
context
Get the instance of WebService::BitbucketServer passed to "new".
METHODS
new
$api = WebService::BitbucketServer::MirroringUpstream::V1->new(context => $webservice_bitbucketserver_obj);
Create a new API.
Normally you would use $webservice_bitbucketserver_obj->mirroring_upstream
instead.
set_preferred_mirror
Sets the mirror specified by a mirror ID as the current user's preferred mirror
POST mirroring/1.0/account/settings/preferred-mirror
Responses:
204
- data, type: application/jsonan empty response indicating that the user setting has been updated
404
- not-found, type: application/jsonThe mirror could not be found.
get_preferred_mirror
Retrieves the current user's preferred mirror server
GET mirroring/1.0/account/settings/preferred-mirror
Responses:
200
- data, type: application/jsonthe preferred mirror server
404
- not-found, type: application/jsonThe user's preferred mirror server could not be found.
remove_preferred_mirror
Removes the current user's preferred mirror
DELETE mirroring/1.0/account/settings/preferred-mirror
Responses:
204
- data, type: application/jsonan empty response indicating that the user setting has been updated
get_analytics_settings
GET mirroring/1.0/analyticsSettings
Responses:
200
- data, type: application/jsonThe analytics settings from upstream
authenticate
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. Currently only username/password and SSH credentials are supported.
POST mirroring/1.0/authenticate
Responses:
200
- user, type: application/jsonThe user for the supplied credentials and their effective permissions.
400
- errors, type: application/jsonIf the supplied credentials are incomplete or not understood.
401
- errors, type: application/jsonThe currently authenticated user is not permitted to authenticate on behalf of users or authentication with the supplied user credentials failed for some reason
get_mirrors
Returns a list of mirrors
GET mirroring/1.0/mirrorServers
Responses:
200
- page, type: unknowna page of mirrors
get_mirror
Returns the mirror specified by a mirror ID
GET mirroring/1.0/mirrorServers/{mirrorId}
Parameters:
mirrorId
- string, default: nonethe ID of the mirror to remove
Responses:
200
- mirror, type: application/jsonthe mirror
404
- not-found, type: application/jsonThe mirror could not be found.
remove_mirror
Removes a mirror, disabling all access and notifications for the mirror server in question
DELETE mirroring/1.0/mirrorServers/{mirrorId}
Parameters:
mirrorId
- string, default: nonethe ID of the mirror to remove
Responses:
204
- data, type: unknownan empty response indicating that the mirror has been removed
render_webpanel
This renders the HTML that is needed to get the remote connect web-panel on the mirror.
GET mirroring/1.0/mirrorServers/{mirrorId}/webPanels/config
Parameters:
mirrorId
- string, default: none
get_repositories
Returns a page of repositories enriched with a content hash
GET mirroring/1.0/repos
Responses:
200
- page, type: application/jsonA page of repositories with content hashes
409
- errors, type: application/jsonMirroring is not available
get_repository
Returns a repository enriched with a content hash
GET mirroring/1.0/repos/{repoId}
Parameters:
repoId
- int, default: nonethe ID of the requested repository
Responses:
200
- repository, type: application/jsonThe repository with the specified repoId
409
- errors, type: application/jsonRepository not found
get_repository_mirrors
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.
GET mirroring/1.0/repos/{repoId}/mirrors
Parameters:
repoId
- int, default: nonethe ID of the requested repository
Responses:
200
- repositoryDescriptor, type: application/jsonThe mirrored repository descriptor
409
- errors, type: application/jsonMirroring is not available
get_requests
Retrieves a mirroring request
GET mirroring/1.0/requests
Parameters:
state
- string, default: none(optional) the request state to filter on
Responses:
200
- page, type: application/jsonA page of mirroring requests
create_request
Creates a new mirroring request
POST mirroring/1.0/requests
Responses:
200
- data, type: application/jsonThe created mirroring request
409
- errors, type: application/jsonThe request was invalid or missing
get_request
Retrieves a mirroring request
GET mirroring/1.0/requests/{mirroringRequestId}
Parameters:
mirroringRequestId
- int, default: nonethe ID of the mirroring request to delete
Responses:
200
- data, type: application/jsonThe mirroring request
409
- errors, type: application/jsonThe request could not be found
delete_request
Deletes a mirroring request
DELETE mirroring/1.0/requests/{mirroringRequestId}
Parameters:
mirroringRequestId
- int, default: nonethe ID of the mirroring request to delete
Responses:
204
- data, type: application/jsonThe request was deleted
409
- errors, type: application/jsonThe request could not be found
accept_request
Accepts a mirroring request
POST mirroring/1.0/requests/{mirroringRequestId}/accept
Parameters:
mirroringRequestId
- int, default: nonethe ID of the request to accept
Responses:
200
- data, type: application/jsonThe accepted mirror server
409
- errors, type: application/jsonThe request could not be found
reject_request
Rejects a mirroring request
POST mirroring/1.0/requests/{mirroringRequestId}/reject
Parameters:
mirroringRequestId
- int, default: nonethe ID of the request to reject
Responses:
200
- data, type: application/jsonThe rejected mirroring request
409
- errors, type: application/jsonThe request could not be found
SEE ALSO
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/chazmcgarvey/WebService-BitbucketServer/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHOR
Charles McGarvey <ccm@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Charles McGarvey.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.