Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Latest commit

 

History

History
203 lines (127 loc) · 8.16 KB

EnvironmentsApi.md

File metadata and controls

203 lines (127 loc) · 8.16 KB

EnvironmentsApi

All URIs are relative to /api/v2

Method HTTP request Description
deleteEnvironment DELETE /projects/{projectKey}/environments/{environmentKey} Delete an environment in a specific project.
getEnvironment GET /projects/{projectKey}/environments/{environmentKey} Get an environment given a project and key.
patchEnvironment PATCH /projects/{projectKey}/environments/{environmentKey} Modify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates with either mechanism.
postEnvironment POST /projects/{projectKey}/environments Create a new environment in a specified project with a given name, key, and swatch color.
resetEnvironmentMobileKey POST /projects/{projectKey}/environments/{environmentKey}/mobileKey Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.
resetEnvironmentSDKKey POST /projects/{projectKey}/environments/{environmentKey}/apiKey Reset an environment's SDK key with an optional expiry time for the old key.

deleteEnvironment

Delete an environment in a specific project.

Example

 deleteEnvironment projectKey=value environmentKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

Return type

(empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getEnvironment

Get an environment given a project and key.

Example

 getEnvironment projectKey=value environmentKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.

Return type

Environment

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patchEnvironment

Modify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates with either mechanism.

Example

 patchEnvironment projectKey=value environmentKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
patchDelta array[PatchOperation] Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'

Return type

Environment

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postEnvironment

Create a new environment in a specified project with a given name, key, and swatch color.

Example

 postEnvironment projectKey=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
environmentBody EnvironmentPost New environment.

Return type

Environment

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resetEnvironmentMobileKey

Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately.

Example

 resetEnvironmentMobileKey projectKey=value environmentKey=value  expiry=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
expiry integer The expiry parameter is deprecated for this endpoint, so the old mobile key will always expire immediately. This parameter will be removed in an upcoming major API client version. [optional]

Return type

Environment

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resetEnvironmentSDKKey

Reset an environment's SDK key with an optional expiry time for the old key.

Example

 resetEnvironmentSDKKey projectKey=value environmentKey=value  expiry=value

Parameters

Name Type Description Notes
projectKey string The project key, used to tie the flags together under one project so they can be managed together.
environmentKey string The environment key, used to tie together flag configuration and users under one environment so they can be managed together.
expiry integer An expiration time for the old environment SDK key, expressed as a Unix epoch time in milliseconds. By default, the key will expire immediately. [optional]

Return type

Environment

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]