Skip to main content

Create an environment

POST 

/environments

The operation allows you to create a new environment. Environments are isolated spaces where users can interact with specific resources and data.

Request

Header Parameters

    X-Codenow-Api-Key anyrequired

    CodeNOW API Key

Body

required

    name stringrequired

    Possible values: >= 3 characters and <= 30 characters


    The user-defined identifier for the environment. It allows users to assign a custom and unique ID to the environment during the creation process.

    customerClusterId stringrequired


    The unique identifier of the cluster where the environment will be placed. To obtain this identifier, use the GET /clusters operation to retrieve a list of available clusters.

    description stringnullable


    The detailed textual description of the environment. It allows users to add additional context, notes, or any relevant information about the purpose, usage, or characteristics of the environment.

    allowTriggerDeployment booleannullable


    A boolean flag that determines whether the environment can be targeted by Continuous Integration (CI) triggers for automated deployments. When set to true, CI triggers are allowed to deploy changes to this environment automatically. When set to false, CI triggers are disabled for this environment, and manual intervention is required for deployments.

Responses

Environment detail

Schema

    id stringrequired


    The user-defined identifier for the environment. It allows users to assign a custom and unique ID to the environment during the creation process.

    displayName stringrequired


    The user-friendly name or label for the environment. It allows users to provide a clear and descriptive name that helps in identifying and distinguishing different environments easily. The field accepts free text with alphanumeric and special characters.
    If the displayName is not explicitly set during creation, the system will automatically use the Environment ID as the default displayName, ensuring the environment has a recognizable and unique name.

    description stringnullable


    The detailed textual description of the environment. It allows users to add additional context, notes, or any relevant information about the purpose, usage, or characteristics of the environment.

    customerClusterId stringrequired


    The unique identifier of the cluster where the environment will be placed. To obtain this identifier, use the GET /clusters operation to retrieve a list of available clusters.

    errorCode stringnullable
    errorMessage stringnullable
    createdAt date-timerequired


    The timestamp when the environment was created. It is an automatically generated value that records the exact date and time when the environment was added to the system.

    status EnvironmentStatus (string)

    Possible values: [READY, CREATING, DOWN, DELETING, FAILED_TO_CREATE, UNKNOWN]


    Status of the environment.
    READY - Environment is ready to be used.
    CREATING - Environment is in the process of being created.
    DOWN - Environment is down / not usable.
    DELETING - Environment is in the process of being deleted.
    FAILED_TO_CREATE - Environment creation has failed.
    UNKNOWN - Environment status is unknown.

    hasDeployment boolean


    Expandable with query value expand=deployments

    Indicates whether there are any deployments associated with the environment. If set to true, there are active or completed deployments within this environment. If set to false, no deployments have taken place in this environment.

    allowTriggerDeployment booleanrequired


    A boolean flag indicating whether the environment can be targeted by Continuous Integration (CI) triggers for automated deployments. If set to true, CI triggers are allowed to deploy changes to this environment automatically. If set to false, CI triggers are disabled for this environment, and manual intervention is required for deployments.

    effectivePermissions string[]


    Effective user permissions.

Loading...