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/json

    an empty response indicating that the user setting has been updated

  • 404 - not-found, type: application/json

    The 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/json

    the preferred mirror server

  • 404 - not-found, type: application/json

    The 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/json

    an empty response indicating that the user setting has been updated

get_analytics_settings

    GET mirroring/1.0/analyticsSettings

Responses:

  • 200 - data, type: application/json

    The 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/json

    The user for the supplied credentials and their effective permissions.

  • 400 - errors, type: application/json

    If the supplied credentials are incomplete or not understood.

  • 401 - errors, type: application/json

    The 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: unknown

    a page of mirrors

get_mirror

Returns the mirror specified by a mirror ID

    GET mirroring/1.0/mirrorServers/{mirrorId}

Parameters:

  • mirrorId - string, default: none

    the ID of the mirror to remove

Responses:

  • 200 - mirror, type: application/json

    the mirror

  • 404 - not-found, type: application/json

    The 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: none

    the ID of the mirror to remove

Responses:

  • 204 - data, type: unknown

    an 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/json

    A page of repositories with content hashes

  • 409 - errors, type: application/json

    Mirroring is not available

get_repository

Returns a repository enriched with a content hash

    GET mirroring/1.0/repos/{repoId}

Parameters:

  • repoId - int, default: none

    the ID of the requested repository

Responses:

  • 200 - repository, type: application/json

    The repository with the specified repoId

  • 409 - errors, type: application/json

    Repository 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: none

    the ID of the requested repository

Responses:

  • 200 - repositoryDescriptor, type: application/json

    The mirrored repository descriptor

  • 409 - errors, type: application/json

    Mirroring 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/json

    A page of mirroring requests

create_request

Creates a new mirroring request

    POST mirroring/1.0/requests

Responses:

  • 200 - data, type: application/json

    The created mirroring request

  • 409 - errors, type: application/json

    The request was invalid or missing

get_request

Retrieves a mirroring request

    GET mirroring/1.0/requests/{mirroringRequestId}

Parameters:

  • mirroringRequestId - int, default: none

    the ID of the mirroring request to delete

Responses:

  • 200 - data, type: application/json

    The mirroring request

  • 409 - errors, type: application/json

    The request could not be found

delete_request

Deletes a mirroring request

    DELETE mirroring/1.0/requests/{mirroringRequestId}

Parameters:

  • mirroringRequestId - int, default: none

    the ID of the mirroring request to delete

Responses:

  • 204 - data, type: application/json

    The request was deleted

  • 409 - errors, type: application/json

    The request could not be found

accept_request

Accepts a mirroring request

    POST mirroring/1.0/requests/{mirroringRequestId}/accept

Parameters:

  • mirroringRequestId - int, default: none

    the ID of the request to accept

Responses:

  • 200 - data, type: application/json

    The accepted mirror server

  • 409 - errors, type: application/json

    The request could not be found

reject_request

Rejects a mirroring request

    POST mirroring/1.0/requests/{mirroringRequestId}/reject

Parameters:

  • mirroringRequestId - int, default: none

    the ID of the request to reject

Responses:

  • 200 - data, type: application/json

    The rejected mirroring request

  • 409 - errors, type: application/json

    The 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.