LoginSignup
0
0

More than 5 years have passed since last update.

bitubucketのAPIでmilestoneを指定する

Posted at

すごいニッチですが、備忘録として。

Bitbucket API: Filter and sort API objects

milestoneを指定するときは、milestone名ではなく、milestoneのIDが必要。
/2.0/repositories/main/repo/issues?q=milestone+%3D+%22MILESTONE_ID%22

milestoneのIDは/2.0/repositories/{username}/{repo_slug}/milestonesで取得することができる。

json
{
    "repository": {
        "links": {
            "self": {
                "href": "LINK"
            },
            "html": {
                "href": "LINK"
            },
            "avatar": {
                "href": "LINK"
            }
        },
        "type": "repository",
        "name": "repoName",
        "full_name": "repoName",
        "uuid": "{xxxx-xxxx-xxxx-xxxx}"
    },
    "type": "milestone",
    "name": "milestoneName",
    "links": {
        "self": {
            "href": "https://api.bitbucket.org/2.0/repositories/TEAM/REPO/milestones/264689" ←この数字列
        }
    }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0