Package: bklv2
bklv2bklv2 is a python library forBacklog API version 2(JP).Install$ pip install bklv2How to useimportbklv2# make object.bklv2api=bklv2.api(hostname="https://<spacename>.backlog.jp",apikey="apikey")# API method# return : dictprj=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 pathfp=bklv2api.getProjectIcon(projectIdOrKey=prj["id"]))print(type(fp))# >> <class 'str'>print(fp)# >> ./space_img.pngAPI methodsmethoddescriptiongetSpaceReturns information about your space.getRecentUpdatesReturns recent updates in your space.getSpaceLogoReturns logo image of your space.getSpaceNotificationReturns space notification.updateSpaceNotificationUpdates space notification.getSpaceDiskUsageReturns information about space disk usage.postAttachmentFilePosts 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.getUserListReturns list of users in your space.When the user has not set “lang”, the response will be null.getUserReturns information about user.When the user has not set “lang”, the response will be null.addUserAdds new user to the space.“Project Administrator” cannot add “Admin” user.You can’t use this API at backlog.com space.updateUserUpdates information about user.You can’t use this API at backlog.com space.deleteUserDeletes user from the space.You can’t use this API at backlog.com space.getOwnUserReturns own information about user.getUserIconDownloads user icon.getUserRecentUpdatesReturns user’s recent updatesgetReceivedStarListReturns the list of stars that user received.countUserReceivedStarsReturns number of stars that user received.getListOfRecentlyViewedIssuesReturns list of issues which the user viewed recently.getListOfRecentlyViewedProjectsReturns list of projects which the user viewed recently.getListOfRecentlyViewedWikisReturns list of Wikis which the user viewed recently.getListOfGroupsReturns list of groups.addGroupAdds new group.You can’t use this API at backlog.com space.getGroupReturns information about group.updateGroupUpdates information about group.You can’t use this API at backlog.com space.deleteGroupDeletes group.You can’t use this API at backlog.com space.getStatusListReturns list of statuses.getResolutionListReturns list of resolutions.getPriorityListReturns list of priorities.getProjectListReturns list of projects.addProjectAdds new project.getProjectReturns information about project.updateProjectUpdates information about project.deleteProjectDeletes project.getProjectIconDownloads project icon.getProjectRecentUpdatesReturns recent update in the project.addProjectUserAdds user to list of project members.getProjectUserListReturns list of project members.deleteProjectUserRemoves user from list project members.addProjectAdministratorAdds “Project Administrator” role to usergetListOfProjectAdministratorsReturns list of users who has Project Administrator roledeleteProjectAdministratorRemoves Project Administrator role from usergetIssueTypeListReturns list of Issue Types in the project.addIssueTypeAdds new Issue Type to the project.updateIssueTypeUpdates information about Issue Type.deleteIssueTypeDeletes Issue Type.getCategoryListReturns list of Categories in the project.addCategoryAdds new Category to the project.updateCategoryUpdates information about Category.deleteCategoryDeletes Category.getVersionMilestoneListReturns list of Versions/Milestones in the project.addVersionMilestoneAdds new Version/Milestone to the project.updateVersionMilestoneUpdates information about Version/Milestone.deleteVersionDeletes Version.getCustomFieldListReturns list of Custom Fields in the project.addCustomFieldAdds new Custom Field to the project.updateCustomFieldUpdates Custom Field.deleteCustomFieldDeletes Custom Field.addListItemForListTypeCustomFieldAdds 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.updateListItemForListTypeCustomFieldUpdates list item for list type custom field.Calling API fails if specified custom field’s type is not a list.deleteListItemForListTypeCustomFieldDeletes list item for list type custom field.Calling API fails if specified custom field’s type is not a list.getListOfSharedFilesGets list of Shared Files.getFileDownloads the file.getProjectDiskUsageReturns information about project disk usage.getListOfWebhooksReturns list of webhooks.addWebhookAdds new webhook.getWebhookReturns information about webhook.updateWebhookUpdates information about webhook.deleteWebhookDeletes webhook.getIssueListReturns list of issues.countIssueReturns number of issues.addIssueAdds new issue.getIssueReturns information about issue.updateIssueUpdates information about issue.deleteIssueDeletes issue.getCommentListReturns list of comments in issue.addCommentAdds a comment to the issue.countCommentReturns number of comments in issue.getCommentReturns information about comment.deleteCommentDelete comment.User can delete own comment.updateCommentUpdates content of comment.User can update own comment.getListOfCommentNotificationsReturns the list of comment notifications.addCommentNotificationAdds notifications to the comment.Only the user who added the comment can add notifications.getListOfIssueAttachmentsReturns the list of issue attachments.getIssueAttachmentDownloads issue’s attachment file.deleteIssueAttachmentDeletes an attachment of issue.getListOfLinkedSharedFilesReturns the list of linked Shared Files to issues.linkSharedFilesToIssueLinks shared files to issue.removeLinkToSharedFileFromIssueRemoves link to shared file from issue.getWikiPageListReturns list of Wiki pages.countWikiPageReturns number of Wiki pages.getWikiPageTagListReturns list of tags that are used in the project.addWikiPageAdds new Wiki page.getWikiPageReturns information about Wiki page.updateWikiPageUpdates information about Wiki page.deleteWikiPageDeletes Wiki page.getListOfWikiAttachmentsGets list of files attached to Wiki.attachFileToWikiAttaches file to WikigetWikiPageAttachmentDownloads Wiki page’s attachment file.removeWikiAttachmentRemoves files attached to Wiki.getListOfSharedFilesOnWikiReturns the list of Shared Files on Wiki.linkSharedFilesToWikiLinks Shared Files to Wiki.removeLinkToSharedFileFromWikiRemoves link to shared file from Wiki.getWikiPageHistoryReturns history of Wiki page.getWikiPageStarReturns list of stars received on the Wiki page.addStarAdds star.getNotificationReturns own notifications.countNotificationReturns number of Notifications.resetUnreadNotificationCountResets unread Notification count.readNotificationChanges notifications read.getListOfGitRepositoriesReturns list of Git repositories.getGitRepositoryReturns Git repository.getPullRequestListReturns list of pull requests.getNumberOfPullRequestsReturns number of pull requests.addPullRequestAdds pull requests.getPullRequestReturns pull reuqest.updatePullRequestUpdates pull requests.getPullRequestCommentReturns list of pull request comments.addPullRequestCommentAdds comments on pull requests.getNumberOfPullRequestCommentsReturns number of comments on pull requests.updatePullRequestCommentInformationUpdates pull request comment information.Authenticated user can update his own comments.getListOfPullRequestAttachmentReturns list of attached files on pull requests.downloadPullRequestAttachmentDownloads attached files on pull requests.deletePullRequestAttachmentsDeletes attached files on pull requests.getWatchingListReturns list of your watching issues.countWatchingReturns the number of your watching issues.getWatchingReturns the information about a watching.addWatchingAdds a watching. User can add a own watching.updateWatchingUpdates a watching. User can update own note.deleteWatchingDeletes a own watching.User can delete a own watching.markWatchingAsReadMark a watching as read.getProjectGroupListReturns list of project groups.addProjectGroupAdd group to project.deleteProjectGroupRemoves a group from the project.getGroupIconDownloads group icon.getLicenceReturns licence.