NAME
WebService::BitbucketServer::AccessTokens::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->access_tokens;
DESCRIPTION
This is a Bitbucket Server REST API for AccessTokens::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::AccessTokens::V1->new(context => $webservice_bitbucketserver_obj);
Create a new API.
Normally you would use $webservice_bitbucketserver_obj->access_tokens
instead.
get_tokens
Get all access tokens associated with the given user
GET access-tokens/1.0/users/{userSlug}
Responses:
200
- accessToken, type: application/jsonA response containing a page of access tokens and associated details
401
- errors, type: application/jsonThe currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed
404
- errors, type: application/jsonThe specified user does not exist
create_token
Create an access token for the user according to the given request
PUT access-tokens/1.0/users/{userSlug}
Responses:
200
- accessToken, type: application/jsonA response containing the raw access token and associated details
400
- errors, type: application/jsonOne of the following error cases occurred (check the error message for more details):
The request does not contain a token name
The request does not contain a list of permissions, or the list of permissions is empty
One of the provided permission levels are unknown
The user already has their maximum number of tokens
401
- errors, type: application/jsonThe currently authenticated user is not permitted to create an access token on behalf of this user or authentication failed
delete_token
Delete an access token for the user according to the given ID
DELETE access-tokens/1.0/users/{userSlug}/{tokenId}
Parameters:
tokenId
- string, default: none
Responses:
401
- errors, type: application/jsonThe currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed
204
- data, type: application/jsonan empty response indicating that the token has been deleted
404
- errors, type: application/jsonThe specified user or token does not exist
get_token
Get an access token for the user according to the given ID
GET access-tokens/1.0/users/{userSlug}/{tokenId}
Parameters:
tokenId
- string, default: none
Responses:
200
- accessToken, type: application/jsonA response containing the access token and associated details
401
- errors, type: application/jsonThe currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed
404
- errors, type: application/jsonThe specified user or token does not exist
update_token
Modify an access token for the user according to the given request. Any fields not specified will not be altered
POST access-tokens/1.0/users/{userSlug}/{tokenId}
Parameters:
tokenId
- string, default: none
Responses:
200
- accessToken, type: application/jsonA response containing the updated access token and associated details
400
- errors, type: application/jsonOne of the provided permission levels are unknown
401
- errors, type: application/jsonThe currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed
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.