Create an environment.

Details

Create an environment.

An account token may be used to run this endpoint.

Parameters

body

header

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

Responses

201

{
    "createdAt": "YYYY-MM-DD HH:MM:SS ENCODED",
    "ecosystemId": "ECOSYSTEM-ID",
    "id": "ENVIRONMENT-ID",
    "meta": {}
}

400

  • Body Parameters Missing: The standard error structure defines this error as invalid parameters, and contains all required body parameters. If this error occurs when the JSON structure of the body parameters is syntactically correct, this means that the “content-type” header is incorrectly specified. The content-type header should be “application/json.”
  • No Query String Allowed: The standard error structure defines this error as invalid parameters, with additional parameters in the query string. In this context, it means that no query string is allowed at all when calling this endpoint.
  • 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

  • Ecosystem Missing: The standard error structure defines this error as both an invalid parameter name and a missing parameter. In this context, it means that the parameter which is used to specify an ecosystem ID is not present.

Examples

HTTP

POST https://ioe.droplit.io/api/environments HTTP/1.1
authorization: TOKEN
content-type: application/json
{
    "ecosystemId": "ECOSYSTEM-ID"
}

Droplit Console

droplit environment create

Droplit SDK

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