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

Pipelines endpoint returns invalid URLs for self and steps fields

    XMLWordPrintable

Details

    Description

      Issue Summary

      • Responses from the Pipelines endpoint returns an invalid URL for both self and steps fields which can't be accessed with regular <username:apppassword> authorization header;
      • "links": {
                "self": {
                  "href": "https://bitbucket-pipelines.prod.public.atl-paas.net//rest/1.0/accounts/{workspace_uuid}/repositories/{repo_uuid}/pipelines/{build_uuid}"
                },
                "steps": {
                  "href": "https://bitbucket-pipelines.prod.public.atl-paas.net//rest/1.0/accounts/{workspace_uuid}/repositories/{repo_uuid}/pipelines/{build_uuid}/steps"
                }
              } 

      Steps to Reproduce

      1. Make an API call to the Pipelines endpoint for any repository
      2. In the results, you will see a Links object with two URLs: self and steps;
      3. Try to make a GET request to that URL;

      Expected Results

      Results should use the actual api.bitbucket.org domain, making it possible to fetch results from these URLs;

      Actual Results

      Fetching the build and the steps from these URLs fail with authorization error:

      {
        "error": {
          "message": "Unauthorized",
          "detail": "No authorization provider header specified.",
          "data": {
            "key": "rest-service.rest-service.unauthorized",
            "arguments": {}
          }
        }
      } 

      Workaround

      Directly fetch the build and steps from our API sub-domain;

      /2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid} 

      and

      /2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/ 

      Attachments

        Activity

          People

            Unassigned Unassigned
            0298b2749e0b Mateus T
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: