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

The deployments API endpoint for displaying deployment variables returns an invalid "next" URL and causes 400 error

XMLWordPrintable

      Issue Summary

      • The deployments API endpoint for displaying deployment variables returns an invalid "next" URL and causes 400 error
      • The correct URL for listing the deployment variables in a certain deployment environment is as follows:
        • https://api.bitbucket.org/2.0/repositories/{workspaceID}/{RepositorySlug}/deployments_config/environments/{EnvironmentUUID}/variables
          
      • If you have more than 10 variables (default pagelength), the next page URL is completely incorrect and gives a 400 error:
        • https://api.bitbucket.org/2.0/repositories/{workspaceID}/environments/{EnvironmentUUID}/variables?page=2&pagelen=10
          
      • The correct next URL should be as follows:
        • https://api.bitbucket.org/2.0/repositories/{workspaceID}/{RepositorySlug}/deployments_config/environments/{EnvironmentUUID}/variables?page=2
          

      Steps to Reproduce

      1. Query the repositories API endpoint to list deployment variables for a certain environment that has more than 10 variables
      2. Observe the next URL, it is incomplete and gives a 400 error

      Expected Results

      • The correct next URL is displayed

      Actual Results

      • Incorrect next URL is displayed

      Workaround

      • Changing the pagelen variable to 100 should display all the configured variables on a single page for most users:
        https://api.bitbucket.org/2.0/repositories/{workspaceID}/{RepositorySlug}/deployments_config/environments/{EnvironmentUUID}/variables?pagelen=100
        

              271550daa0a9 Nisha Shirawala
              57b7f67f3625 Ben
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: