Improve API documentation for creating Pipelines Deployment environment

XMLWordPrintable

      Please improve Bitbucket API documentation and provide example of the POST JSON body for creating deployment environment within a repository using Bitbucket open API: 

      https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/environments/#post

      Specify that we only support the "name" for already existing environments and highlight it as a requirement. 

      When user is trying to create a deployment environment with the name that doesn't already exist we respond with: 

      {"key": "deploy-service.request.validation-error","message": "The request body contains invalid properties","arguments": {"environment.environment_type.name": "Unknown environment type."}
      

      Here is the example of the POST request that end users can use for reference, until the public documentation is updated: 

      {"deployment_gate_enabled": false,
      "rank": 0,
      "hidden": false,
      "type": "deployment_environment",
      "slug": "staging123",
      "environment_type": {
      "type": "deployment_environment_type",
      "name": "Staging",
      "rank": 1
      },
      "name": "Staging123"
      }
      
      OR 
      {
      "hidden": false,
      "type": "deployment_environment",
      "slug": "feature1234-6",
      "environment_type": {
      "type": "deployment_environment_type",
      "name":"Production",
      "rank": 0
      },
      "name": "Feature1234-6"
      }
      

       

       

            Assignee:
            Unassigned
            Reporter:
            Yana
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: