Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-17907

v2 deploy keys API inconsistencies

    XMLWordPrintable

Details

    Description

      We've run into a few issues with these new v2 routes where the documentation doesn't match the functionality and are hoping to have these addressed in some way.

      • GET /2.0/repositories/ {username}/{repo_slug}/deploy-keys returns the array of keys, but none of them contain the "pk" field as documented. The pk can be obtained by parsing the "links.self.href" but that is not ideal.
        * POST /2.0/repositories/{username}

        /

        {repo_slug}/deploy-keys returns an object that does not contain the "pk" field. It does contain an "id" field, which is not documented, but this field is not the same as "pk". You can't use it for a GET or a DELETE. I'm not sure what it's the ID of. Ideally POST would return the pk.
        * GET /2.0/repositories/{username}/{repo_slug}

        /deploy-keys/

        {pk}

        does correctly return the "pk" field (though it's not particularly useful in this case since you must've already known it)

      • DELETE seems to behave as expected once you have the correct pk.

      Attachments

        Activity

          People

            Unassigned Unassigned
            7fea8dfcfc81 trriplejay
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: