# Environment Variable

URL: https://developers.cloud66.com/v3/models/environment-variable/

Environment variables are configuration values that can be set for your stacks. They can be used to store application settings, API keys, and other configuration data that your application needs.

<Model>
    <ModelProperty name="id" type="integer">
        The unique identifier of the environment variable.
    </ModelProperty>
    <ModelProperty name="key" type="string">
        The name of the environment variable.
    </ModelProperty>
    <ModelProperty name="value" type="string">
        The value of the environment variable.
    </ModelProperty>
    <ModelProperty name="readonly" type="boolean">
        Whether this environment variable is locked and cannot be modified.
    </ModelProperty>
    <ModelProperty name="created_at" type="datetime">
        The date and time the environment variable was created, in ISO 8601 format.
    </ModelProperty>
    <ModelProperty name="updated_at" type="datetime">
        The date and time the environment variable was last updated, in ISO 8601 format.
    </ModelProperty>
    <ModelProperty name="is_password" type="boolean">
        Whether this environment variable contains sensitive password data.
    </ModelProperty>
    <ModelProperty name="is_generated" type="boolean">
        Whether this environment variable was automatically generated by the system.
    </ModelProperty>
    <ModelProperty name="history" type="array">
        An array of historical values for this environment variable, showing changes over time.
    </ModelProperty>
</Model>

## Example

```json
{
  "id": 7890,
  "key": "DATABASE_URL",
  "value": "postgresql://user:pass@localhost:5432/myapp_prod",
  "readonly": false,
  "created_at": "2023-01-15T10:30:00Z",
  "updated_at": "2024-01-10T14:20:00Z",
  "is_password": true,
  "is_generated": false,
  "history": [
    {
      "value": "postgresql://user:pass@localhost:5432/myapp_prod",
      "created_at": "2024-01-10T14:20:00Z"
    },
    {
      "value": "postgresql://user:oldpass@localhost:5432/myapp_prod",
      "created_at": "2023-01-15T10:30:00Z"
    }
  ]
}
```
