The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::BitbucketServer::Build::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->build;

DESCRIPTION

This is a Bitbucket Server REST API for Build::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::Build::V1->new(context => $webservice_bitbucketserver_obj);

Create a new API.

Normally you would use $webservice_bitbucketserver_obj->build instead.

get_multiple_build_status_stats

Produces a list of the build statistics for multiple commits.

Commits without any builds associated with them will not be returned. For example if the commit e00cf62997a027bbf785614a93e2e55bb331d268 does not have any build statuses associated with it, it will not be present in the response.

    POST build-status/1.0/commits/stats

Responses:

  • 200 - data, type: application/json

    The number of successful/failed/in-progress builds for each commit (with the caveat that the commits without any builds associated with them will not be present in the response)

  • 401 - errors, type: application/json

    The user is not authenticated or does not have the LICENSED permission.

get_build_status_stats

Gets statistics regarding the builds associated with a commit.

    GET build-status/1.0/commits/stats/{commitId}

Parameters:

  • commitId - string, default: none

    full SHA1 of the commit (ex: e00cf62997a027bbf785614a93e2e55bb331d268)

  • includeUnique - boolean, default: false

    include a unique build result if there is either only one failed build, only one in-progress build or only one successful build

Responses:

  • 200 - data, type: application/json

    The number of successful/failed/in-progress builds for the commit

  • 401 - errors, type: application/json

    The user is not authenticated or does not have the LICENSED permission.

get_build_status

Gets the build statuses associated with a commit.

    GET build-status/1.0/commits/{commitId}

Parameters:

  • commitId - string, default: none

    full SHA1 of the commit (ex: e00cf62997a027bbf785614a93e2e55bb331d268)

Responses:

  • 200 - data, type: application/json

    a page of build statuses associated with the commit (limited to the most recent 100 build statuses associated with the commit)

  • 401 - errors, type: application/json

    The user is not authenticated or does not have the LICENSED permission.

add_build_status

Associates a build status with a commit.

The state, the key and the url are mandatory. The name and description fields are optional.

All fields (mandatory or optional) are limited to 255 characters, except for the url, which is limited to 450 characters.

Supported values for the state are SUCCESSFUL, FAILED and INPROGRESS.

The authenticated user must have LICENSED permission or higher to call this resource.

    POST build-status/1.0/commits/{commitId}

Parameters:

  • commitId - string, default: none

    full SHA1 of the commit (ex: e00cf62997a027bbf785614a93e2e55bb331d268)

Responses:

  • 400 - errors, type: application/json

    An error message if the commitId if not a full 40-characters SHA1, if the build status has a missing mandatory field or if the fields are too large

  • 401 - errors, type: application/json

    The user is not authenticated or does not have the LICENSED permission.

  • 204 - data, type: unknown

    An empty response if the build status was successfully stored

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.