> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kosli.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.kosli.com/feedback

```json
{
  "path": "/api-reference/environments/get-environment",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Get environment

> Get an environment for an organization.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json get /environments/{org}/{env_name}
openapi: 3.1.0
info:
  title: Kosli API
  summary: The API for communicating with Kosli
  description: >

    # Authentication 


    When making requests against Kosli API, you can authenticate your requests
    using a bearer token. 

    Set the bearer token in the request Authorization header to a valid API
    key. 

    API Keys can be personal or for service accounts. Check the [service
    accounts
    documentation](https://docs.kosli.com/getting_started/service-accounts/) for
    details. 


    ## Curl example


    ```shell

    curl -H "Authorization: Bearer <<your-api-key>>"
    https://app.kosli.com/api/v2/environments/<<your-org-name>>

    ```
  version: '2.0'
servers:
  - url: https://app.kosli.com/api/v2
    description: EU
  - url: https://app.us.kosli.com/api/v2
    description: US
security:
  - HTTPBearer: []
paths:
  /environments/{org}/{env_name}:
    get:
      tags:
        - Environments
      summary: Get environment
      description: Get an environment for an organization.
      operationId: get_environment_environments__org___env_name__get
      parameters:
        - name: env_name
          in: path
          required: true
          schema:
            type: string
            title: Env Name
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEnvironmentResponse'
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    GetEnvironmentResponse:
      properties:
        org:
          type: string
          title: Org
          description: Organization which owns the environment
        name:
          type: string
          title: Name
          description: Name for the environment
        type:
          type: string
          title: Type
          description: Type of the report source infrastructure
        description:
          type: string
          title: Description
          description: Description for the environment
        last_modified_at:
          type: number
          title: Last Modified At
          description: Last report modification timestamp
        last_reported_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Last Reported At
          description: Last report received timestamp
        state:
          anyOf:
            - type: boolean
            - type: 'null'
          title: State
          description: Compliance state of the environment
        include_scaling:
          type: boolean
          title: Include Scaling
          description: If the environment record scaling events
        tags:
          additionalProperties: true
          type: object
          title: Tags
          description: User-defined tags for the environment
        policies:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Policies
          description: List of attached policies to the environment
        included_environments:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Included Environments
          description: List of included environments for logical environments
      type: object
      required:
        - org
        - name
        - type
        - description
        - last_modified_at
        - include_scaling
        - tags
      title: GetEnvironmentResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````