Skip to main content

Backlog API v2 library

Project description


bklv2 is a python library for Backlog API version 2 (JP).


$ pip install bklv2

How to use

import bklv2

# make object.
bklv2api = bklv2.api( hostname="https://<spacename>", apikey="apikey" )

# API method
# return : dict
prj = bklv2api.addProject( name = "testproject",
                           key = "TESTPROJECT",
                           chartEnabled = False,
                           subtaskingEnabled = False,
                           textFormattingRule = "markdown" )

print( type(prj) )          # >> <class 'dict'>
print( prj["projectKey"] )  # >> TESTPROJECT

# API method ( file-downloader )
# return : output file path
fp = bklv2api.getProjectIcon( projectIdOrKey=prj["id"]) )

print( type(fp) )           # >> <class 'str'>
print( fp )                 # >> ./space_img.png

API methods

method description
getSpace Returns information about your space.
getRecentUpdates Returns recent updates in your space.
getSpaceLogo Returns logo image of your space.
getSpaceNotification Returns space notification.
updateSpaceNotification Updates space notification.
getSpaceDiskUsage Returns information about space disk usage.
postAttachmentFile Posts an attachment file for issue or wiki. Returns id of the attachment file.The file will be deleted after it has been attached. If attachment fails, the file will be deleted an hour later.
getUserList Returns list of users in your space.When the user has not set “lang”, the response will be null.
getUser Returns information about user.When the user has not set “lang”, the response will be null.
addUser Adds new user to the space.“Project Administrator” cannot add “Admin” user.You can’t use this API at space.
updateUser Updates information about user.You can’t use this API at space.
deleteUser Deletes user from the space.You can’t use this API at space.
getOwnUser Returns own information about user.
getUserIcon Downloads user icon.
getUserRecentUpdates Returns user’s recent updates
getReceivedStarList Returns the list of stars that user received.
countUserReceivedStars Returns number of stars that user received.
getListOfRecentlyViewedIssues Returns list of issues which the user viewed recently.
getListOfRecentlyViewedProjects Returns list of projects which the user viewed recently.
getListOfRecentlyViewedWikis Returns list of Wikis which the user viewed recently.
getListOfGroups Returns list of groups.
addGroup Adds new group.You can’t use this API at space.
getGroup Returns information about group.
updateGroup Updates information about group.You can’t use this API at space.
deleteGroup Deletes group.You can’t use this API at space.
getStatusList Returns list of statuses.
getResolutionList Returns list of resolutions.
getPriorityList Returns list of priorities.
getProjectList Returns list of projects.
addProject Adds new project.
getProject Returns information about project.
updateProject Updates information about project.
deleteProject Deletes project.
getProjectIcon Downloads project icon.
getProjectRecentUpdates Returns recent update in the project.
addProjectUser Adds user to list of project members.
getProjectUserList Returns list of project members.
deleteProjectUser Removes user from list project members.
addProjectAdministrator Adds “Project Administrator” role to user
getListOfProjectAdministrators Returns list of users who has Project Administrator role
deleteProjectAdministrator Removes Project Administrator role from user
getIssueTypeList Returns list of Issue Types in the project.
addIssueType Adds new Issue Type to the project.
updateIssueType Updates information about Issue Type.
deleteIssueType Deletes Issue Type.
getCategoryList Returns list of Categories in the project.
addCategory Adds new Category to the project.
updateCategory Updates information about Category.
deleteCategory Deletes Category.
getVersionMilestoneList Returns list of Versions/Milestones in the project.
addVersionMilestone Adds new Version/Milestone to the project.
updateVersionMilestone Updates information about Version/Milestone.
deleteVersion Deletes Version.
getCustomFieldList Returns list of Custom Fields in the project.
addCustomField Adds new Custom Field to the project.
updateCustomField Updates Custom Field.
deleteCustomField Deletes Custom Field.
addListItemForListTypeCustomField Adds new list item for list type custom field.Only administrator can call this API if the option “Add items in adding or editing issues” is disabled in settings.Calling API fails if specified custom field’s type is not a list.
updateListItemForListTypeCustomField Updates list item for list type custom field.Calling API fails if specified custom field’s type is not a list.
deleteListItemForListTypeCustomField Deletes list item for list type custom field.Calling API fails if specified custom field’s type is not a list.
getListOfSharedFiles Gets list of Shared Files.
getFile Downloads the file.
getProjectDiskUsage Returns information about project disk usage.
getListOfWebhooks Returns list of webhooks.
addWebhook Adds new webhook.
getWebhook Returns information about webhook.
updateWebhook Updates information about webhook.
deleteWebhook Deletes webhook.
getIssueList Returns list of issues.
countIssue Returns number of issues.
addIssue Adds new issue.
getIssue Returns information about issue.
updateIssue Updates information about issue.
deleteIssue Deletes issue.
getCommentList Returns list of comments in issue.
addComment Adds a comment to the issue.
countComment Returns number of comments in issue.
getComment Returns information about comment.
deleteComment Delete comment.User can delete own comment.
updateComment Updates content of comment.User can update own comment.
getListOfCommentNotifications Returns the list of comment notifications.
addCommentNotification Adds notifications to the comment.Only the user who added the comment can add notifications.
getListOfIssueAttachments Returns the list of issue attachments.
getIssueAttachment Downloads issue’s attachment file.
deleteIssueAttachment Deletes an attachment of issue.
getListOfLinkedSharedFiles Returns the list of linked Shared Files to issues.
linkSharedFilesToIssue Links shared files to issue.
removeLinkToSharedFileFromIssue Removes link to shared file from issue.
getWikiPageList Returns list of Wiki pages.
countWikiPage Returns number of Wiki pages.
getWikiPageTagList Returns list of tags that are used in the project.
addWikiPage Adds new Wiki page.
getWikiPage Returns information about Wiki page.
updateWikiPage Updates information about Wiki page.
deleteWikiPage Deletes Wiki page.
getListOfWikiAttachments Gets list of files attached to Wiki.
attachFileToWiki Attaches file to Wiki
getWikiPageAttachment Downloads Wiki page’s attachment file.
removeWikiAttachment Removes files attached to Wiki.
getListOfSharedFilesOnWiki Returns the list of Shared Files on Wiki.
linkSharedFilesToWiki Links Shared Files to Wiki.
removeLinkToSharedFileFromWiki Removes link to shared file from Wiki.
getWikiPageHistory Returns history of Wiki page.
getWikiPageStar Returns list of stars received on the Wiki page.
addStar Adds star.
getNotification Returns own notifications.
countNotification Returns number of Notifications.
resetUnreadNotificationCount Resets unread Notification count.
readNotification Changes notifications read.
getListOfGitRepositories Returns list of Git repositories.
getGitRepository Returns Git repository.
getPullRequestList Returns list of pull requests.
getNumberOfPullRequests Returns number of pull requests.
addPullRequest Adds pull requests.
getPullRequest Returns pull reuqest.
updatePullRequest Updates pull requests.
getPullRequestComment Returns list of pull request comments.
addPullRequestComment Adds comments on pull requests.
getNumberOfPullRequestComments Returns number of comments on pull requests.
updatePullRequestCommentInformation Updates pull request comment information.Authenticated user can update his own comments.
getListOfPullRequestAttachment Returns list of attached files on pull requests.
downloadPullRequestAttachment Downloads attached files on pull requests.
deletePullRequestAttachments Deletes attached files on pull requests.
getWatchingList Returns list of your watching issues.
countWatching Returns the number of your watching issues.
getWatching Returns the information about a watching.
addWatching Adds a watching. User can add a own watching.
updateWatching Updates a watching. User can update own note.
deleteWatching Deletes a own watching.User can delete a own watching.
markWatchingAsRead Mark a watching as read.
getProjectGroupList Returns list of project groups.
addProjectGroup Add group to project.
deleteProjectGroup Removes a group from the project.
getGroupIcon Downloads group icon.
getLicence Returns licence.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bklv2-0.2.0.tar.gz (11.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page