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

# List connections

> Returns the project's app connections (including inherited organization connections) as a bare array. Filter with the `provider` query parameter.



## OpenAPI

````yaml /openapi.yaml get /connections
openapi: 3.1.0
info:
  title: OneCLI API
  version: '1.0'
  description: >
    The OneCLI API lets you manage agents, secrets, policy rules, app
    connections, and user settings programmatically.


    **Base URL:** `https://api.onecli.sh/v1` (Cloud) or
    `http://localhost:10254/v1` (self-hosted)


    ## Authentication


    All endpoints require authentication via one of:


    - **API Key** — `Authorization: Bearer <key>` header. Generate keys in the
    dashboard or via `GET /v1/user/api-key`.

    - **Session** — Cookie-based session from the web dashboard.


    For organization-scoped API keys, include the `X-Project-Id` header to
    specify which project to operate on.
servers:
  - url: https://api.onecli.sh/v1
    description: OneCLI Cloud
  - url: http://localhost:10254/v1
    description: Self-hosted (Docker)
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Manage agents and their access tokens, secrets, and configuration.
  - name: Secrets
    description: Manage credentials that the gateway injects into outbound requests.
  - name: Rules
    description: >-
      Manage policy rules that control how agents interact with external
      services.
  - name: User
    description: Manage your user profile and API keys.
  - name: Projects
    description: >-
      Manage projects within your organization. Requires admin role for
      create/update and owner role for delete. Cloud only.
  - name: Team
    description: Provision team members programmatically. Requires admin role. Cloud only.
  - name: Apps
    description: >-
      Manage app connections (OAuth and direct credentials), BYOC configuration,
      permission catalogs, and blocklists.
  - name: Connections
    description: App connections as a top-level resource.
  - name: Utility
    description: Health check and project resource summaries.
  - name: Agent Setup
    description: >-
      Endpoints agents and orchestrators use to bootstrap gateway access
      (container config, credential stubs, gateway skill).
  - name: Migration
    description: Migrate data from a self-hosted instance to OneCLI Cloud.
  - name: Organization Settings
    description: Organization-wide policy settings. Cloud only.
  - name: Organization Secrets
    description: >-
      Manage secrets at the organization level. Organization secrets apply
      across all projects. Cloud only.
  - name: Organization Rules
    description: >-
      Manage policy rules at the organization level. Organization rules apply
      across all projects. Cloud only.
  - name: Organization Connections
    description: Manage app connections at the organization level. Cloud only.
  - name: Organization App Config
    description: Manage BYOC app configuration at the organization level. Cloud only.
  - name: Partner Organizations
    description: >-
      Create and manage customer organizations as a partner. Requires a Partner
      API key. Cloud only.
  - name: Partner Projects
    description: Manage projects within an unclaimed partner organization. Cloud only.
  - name: Partner Secrets
    description: >-
      Manage partner-level secrets inherited by every organization you manage.
      Cloud only.
  - name: Partner Budgets
    description: >-
      Cap how much an organization can spend on a partner LLM key. Owner or
      admin only. Cloud only.
  - name: Partner Members
    description: >-
      Manage who can sign in to your partner portal. Owner or admin only. Cloud
      only.
  - name: Organization Partner
    description: Inspect and detach an organization's partner relationship. Cloud only.
paths:
  /connections:
    get:
      tags:
        - Connections
      summary: List connections
      description: >-
        Returns the project's app connections (including inherited organization
        connections) as a bare array. Filter with the `provider` query
        parameter.
      operationId: listConnections
      parameters:
        - $ref: '#/components/parameters/providerQuery'
      responses:
        '200':
          description: List of connections
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AppConnection'
components:
  parameters:
    providerQuery:
      name: provider
      in: query
      required: false
      schema:
        type: string
      description: Filter results to a single provider (e.g. `gmail`, `github`)
  schemas:
    AppConnection:
      type: object
      properties:
        id:
          type: string
        provider:
          type: string
        label:
          type: string
          nullable: true
          description: Display label extracted from metadata (e.g., email address)
        status:
          type: string
        scopes:
          type: array
          items:
            type: string
        scope:
          type: string
          enum:
            - project
            - organization
          description: >-
            Project lists include inherited organization connections; use this
            to tell them apart.
        metadata:
          type: object
          nullable: true
          description: >-
            Provider metadata captured at connect time (e.g. account email or
            username).
        connectedAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key obtained from the dashboard or `GET /user/api-key`

````