> ## 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/deployments/list-deployments",
  "feedback": "Description of the issue"
}
```

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

</AgentInstructions>

# List Deployments

> List deployments for an organization.

- end_ts defaults to now.
- start_ts defaults to 28 days before end_ts.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json get /deployments/{org}
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:
  /deployments/{org}:
    get:
      tags:
        - Deployments
      summary: List Deployments
      description: |-
        List deployments for an organization.

        - end_ts defaults to now.
        - start_ts defaults to 28 days before end_ts.
      operationId: list_deployments_deployments__org__get
      parameters:
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            maximum: 50
            minimum: 0
            description: Number of deployments per page
            default: 15
            title: Per Page
          description: Number of deployments per page
        - name: repo_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by repo name (e.g. 'kosli-dev/server')
            title: Repo Name
          description: Filter by repo name (e.g. 'kosli-dev/server')
        - name: env_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter by environment name
            title: Env Name
          description: Filter by environment name
        - name: start_ts
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            description: >-
              Include deployments at or after this timestamp. Defaults to 28
              days before end_ts
            title: Start Ts
          description: >-
            Include deployments at or after this timestamp. Defaults to 28 days
            before end_ts
        - name: end_ts
          in: query
          required: false
          schema:
            anyOf:
              - type: number
              - type: 'null'
            description: Include deployments at or before this timestamp. Defaults to now
            title: End Ts
          description: Include deployments at or before this timestamp. Defaults to now
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentListResponse'
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    DeploymentListResponse:
      properties:
        _links:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Links
        page:
          type: integer
          title: Page
        per_page:
          type: integer
          title: Per Page
        total_pages:
          type: integer
          title: Total Pages
        total_count:
          type: integer
          title: Total Count
        deployments:
          items:
            $ref: '#/components/schemas/DeploymentListItemResponse'
          type: array
          title: Deployments
      additionalProperties: false
      type: object
      required:
        - page
        - per_page
        - total_pages
        - total_count
        - deployments
      title: DeploymentListResponse
    DeploymentListItemResponse:
      properties:
        fingerprint:
          type: string
          title: Fingerprint
        artifact_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Artifact Name
        env_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Env Name
        snapshot_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Snapshot Index
        deployed_at:
          type: number
          title: Deployed At
        _links:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Links
      type: object
      required:
        - fingerprint
        - deployed_at
      title: DeploymentListItemResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````