Update an environment.

Details

Update an environment.

An account token, server token, or user token may be used to run this endpoint.

Parameters

path

body

header

  • x-system-metadata-prefix (optional): A customized metadata prefix. The default is “$.”

Responses

200

400

  • Environment Invalid: The standard error structure defines this error as invalid parameters, with an invalid ID linked to the parameter that designates the environment ID. In this context, it means that the ID given for an environment was not valid.
  • Alias Exists: The standard error structure defines this error as an invalid body. The error means that an object with the same alias already exists. The best way to avoid this error is to make sure all aliases are unique strings, regardless of where they are accessed from.
  • Alias Invalid: The standard error structure defines this error as invalid parameters. The error means that an alias given for an object is not valid. However, this invalid alias does not necessarily mean that any other object references are invalid. This error refers only to the alias itself.
  • Metadata Format Invalid: The standard error structure defines this error as invalid parameters. In this context, it means that metadata, when specified, should have been formatted as a valid JSON object, and it was not formatted that way.

404

  • Environment Not Found: This error means that an environment with the given ID was not found. This is distinct from an invalid environment ID being specified; this means that the environment ID once existed, but no longer does.

Examples

HTTP

PUT https://ioe.droplit.io/api/environments/ENVIRONMENT-ID HTTP/1.1
authorization: TOKEN
content-type: application/json
{
    "alias": "ALIAS-NAME",
    "meta": {}
}

Droplit Console

droplit environment update ENVIRONMENT-ID PRROPERTY-NAME PROPERTY-VALUE

Droplit SDK

droplit.environments.updateEnvironment("ENVIRONMENT-ID", { "alias" : "ALIAS", "meta" : META });
Language
Credentials
Header
Click Try It! to start a request and see the response here!