ReferenceFlightcontrol APIEnvironmentsEdit Environment

Edit Environment API

Use this API to edit an existing environment in your project.

API Description

MethodPath
POST/v1/projects/{projectId}/environments/{environmentId}
Headers
AuthorizationBearer: [API key]

Full Endpoint URL https://api.flightcontrol.dev/v1/projects/{projectId}/environments/{environmentId}

Body

ParameterRequiredTypeDescription
nameoptionalstringThe environment name displayed in Flightcontrol dashboard.
sourceoptionalobject: check below for detailThe source used to build your environment.

The source object

ParameterRequiredTypeDescription
branchoptionalstringThe Git branch in github used to provision and build the environment’s services.
triggeroptional”push” or “manual”Whether the environment is deployed automatically with every Git push (Git push to deploy) or deployed manually through the dashboard or deploy hooks

Response Example

[
  {
    "message": "Environment updated successfully"
  }
]

Response Conditions

Success

Errors