NAME
WebService::BitbucketServer::GPG::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->gpg;
DESCRIPTION
This is a Bitbucket Server REST API for GPG::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::GPG::V1->new(context => $webservice_bitbucketserver_obj);
Create a new API.
Normally you would use $webservice_bitbucketserver_obj->gpg
instead.
delete_keys
Delete all GPG keys for a supplied user.
DELETE gpg/1.0/keys
Parameters:
user
- string, default: nonethe username of the user to delete the keys for. If no username is specified, the GPG keys will be deleted for the currently authenticated user.
Responses:
401
- errors, type: application/jsonThe currently authenticated user has insufficient permissions to delete the GPG keys. This is only possible when a user is explicitly supplied.
204
- data, type: unknownThe GPG keys matching the supplied user were deleted.
404
- errors, type: application/jsonNo user matches the supplied user
get_keys
Find all the keys for the currently authenticated user. Optionally, users with ADMIN and higher permissions may choose to specify the user
parameter to retrieve GPG keys for another user.
Only authenticated users may call this endpoint.
GET gpg/1.0/keys
Parameters:
user
- string, default: nonethe name of the user to get keys for (optional; requires ADMIN permission or higher)
Responses:
200
- page, type: application/json401
- errors, type: application/jsonThe currently authenticated user has insufficient permissions to perform this operation.
add_key
Add a GPG key to the authenticated user's account. Optionally, users with ADMIN and higher permissions may choose to specify the user
parameter to add a GPG key for another user.
Only authenticated users may call this endpoint.
POST gpg/1.0/keys
Parameters:
user
- string, default: nonethe name of the user to add a key for (optional; requires ADMIN permission or higher)
Responses:
200
- gpgKey, type: application/jsonResponse contains the GPG key that was just created.
400
- validation, type: application/jsonThe request has failed validation.
401
- errors, type: application/jsonThe currently authenticated user has insufficient permissions to perform this operation.
delete_key
Delete the GPG key with the specified ID or Key Fingerprint.
Only authenticated users may call this endpoint.
DELETE gpg/1.0/keys/{fingerprintOrId}
Parameters:
fingerprintOrId
- string, default: none
Responses:
401
- errors, type: application/jsonThe currently authenticated user has insufficient permissions to perform this operation.
204
- data, type: application/jsonThe key has been deleted successfully.
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.