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

# List resources created by this OAuth connection



## OpenAPI

````yaml /api-reference/openapi.json get /oauth/protections
openapi: 3.0.0
info:
  title: AIRCTRL API
  description: >-
    Programmatic access to AIRCTRL. Record values are encrypted by the client,
    so the API stores ciphertext and encrypted keys instead of plaintext record
    values.
  version: '1'
  contact: {}
servers:
  - url: https://api.airctrl.dev/v1
    description: Production
  - url: https://api.staging.airctrl.dev/v1
    description: QA
security: []
tags:
  - name: Context
    description: Find the accounts available to the caller.
  - name: Projects
    description: Create and manage projects.
  - name: Records
    description: Store and use client-encrypted records.
  - name: Audit
    description: Read record activity and access history.
  - name: Providers
    description: Discover supported AI providers.
  - name: Provider Credentials
    description: Manage encrypted provider credentials.
  - name: Gateways
    description: Create and operate AI gateways.
  - name: Usage
    description: Read gateway usage and spend data.
  - name: Service Accounts
    description: Read Service Account metadata and grant records.
paths:
  /oauth/protections:
    get:
      tags:
        - OAuth
      summary: List resources created by this OAuth connection
      responses:
        '200':
          description: Non-secret protections bound to this OAuth connection only.
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                  - data
                properties:
                  ok:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - protectionId
                        - externalResourceId
                        - project
                        - serviceAccount
                        - providerCredential
                        - gateway
                        - gatewayToken
                        - state
                        - accessRevokedAt
                        - connectionSuspendedAt
                        - createdAt
                      properties:
                        protectionId:
                          type: string
                          format: uuid
                        externalResourceId:
                          type: string
                        project:
                          type: object
                          required:
                            - id
                            - name
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                        serviceAccount:
                          type: object
                          required:
                            - id
                            - name
                            - active
                          properties:
                            id:
                              type: string
                              format: uuid
                            name:
                              type: string
                            active:
                              type: boolean
                        providerCredential:
                          type: object
                          required:
                            - id
                            - providerId
                            - providerSlug
                            - label
                          properties:
                            id:
                              type: string
                              format: uuid
                            providerId:
                              type: string
                              format: uuid
                            providerSlug:
                              type: string
                            label:
                              type: string
                        gateway:
                          type: object
                          required:
                            - id
                            - slug
                            - name
                            - models
                            - settings
                          properties:
                            id:
                              type: string
                              format: uuid
                            slug:
                              type: string
                            name:
                              type: string
                            models:
                              type: array
                              items:
                                type: string
                            settings:
                              type: object
                              properties:
                                spendLimit:
                                  type: number
                                  minimum: 0
                                  multipleOf: 0.01
                                  nullable: true
                                spendWindow:
                                  type: string
                                  enum:
                                    - daily
                                    - weekly
                                    - monthly
                                rateLimitPerMin:
                                  type: integer
                                  minimum: 1
                                  nullable: true
                                loggingEnabled:
                                  type: boolean
                                logBodies:
                                  type: boolean
                                guardrailMode:
                                  type: string
                                  enum:
                                    - 'off'
                                    - flag
                                    - redact
                                    - block
                              additionalProperties: false
                              required:
                                - spendLimit
                                - spendWindow
                                - rateLimitPerMin
                                - loggingEnabled
                                - logBodies
                                - guardrailMode
                        gatewayToken:
                          type: object
                          required:
                            - id
                            - prefix
                          properties:
                            id:
                              type: string
                              format: uuid
                            prefix:
                              type: string
                            plaintext:
                              type: string
                              writeOnly: true
                              description: >-
                                Returned once on creation, rotation or
                                reactivation.
                        state:
                          type: string
                          enum:
                            - active
                            - connection_suspended
                            - revoked
                          description: >-
                            connection_suspended means the parent OAuth
                            connection was disconnected; revoked means this
                            protection was explicitly revoked.
                        accessRevokedAt:
                          type: string
                          format: date-time
                          nullable: true
                        connectionSuspendedAt:
                          type: string
                          format: date-time
                          nullable: true
                        createdAt:
                          type: string
                          format: date-time
                        replayed:
                          type: boolean
      security:
        - oauth2:
            - protections:read
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.airctrl.dev/oauth/authorize
          tokenUrl: https://api.airctrl.dev/v1/oauth/token
          refreshUrl: https://api.airctrl.dev/v1/oauth/token
          scopes:
            protections:provision: >-
              Atomically create the disclosed AIRCTRL resources for a protected
              external key.
            protections:read: Read only resources created by this OAuth connection.
            protections:update: >-
              Update allowlisted settings only on gateways created by this OAuth
              connection.
            protections:manage: >-
              Revoke, reactivate or rotate secrets only for protections created
              by this OAuth connection.
            protections:read-logs: >-
              Read request metadata only for protections created by this OAuth
              connection.
            protections:read-spend: >-
              Read token usage and spend only for protections created by this
              OAuth connection.
            offline_access: Receive rotating refresh tokens.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.