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

# Token-exchange presets

> Starting points for a catalog's token exchange (Keycloak, Google Workload Identity
Federation, Entra ID on-behalf-of). They only fill the form; nothing is special-cased, and
what a catalog uses is what is saved on it. No secrets are returned.



## OpenAPI

````yaml get /api/metastore/token-exchange/presets
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/metastore/token-exchange/presets:
    get:
      tags:
        - Metastore
      summary: Token-exchange presets
      description: >-
        Starting points for a catalog's token exchange (Keycloak, Google
        Workload Identity

        Federation, Entra ID on-behalf-of). They only fill the form; nothing is
        special-cased, and

        what a catalog uses is what is saved on it. No secrets are returned.
      operationId: get_token_exchange_presets_api_metastore_token_exchange_presets_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenExchangePresetsResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    TokenExchangePresetsResponse:
      properties:
        presets:
          items:
            $ref: '#/components/schemas/TokenExchangePreset'
          type: array
          title: Presets
      type: object
      required:
        - presets
      title: TokenExchangePresetsResponse
    TokenExchangePreset:
      properties:
        id:
          type: string
          title: Id
        label:
          type: string
          title: Label
        description:
          type: string
          title: Description
        settings:
          $ref: '#/components/schemas/TokenExchangeSettingsView'
      type: object
      required:
        - id
        - label
        - description
        - settings
      title: TokenExchangePreset
      description: >-
        A starting point for the form. Presets only fill fields; nothing is
        special-cased.
    TokenExchangeSettingsView:
      properties:
        enabled:
          type: boolean
          title: Enabled
          default: false
        trusted_actors:
          items:
            type: string
          type: array
          title: Trusted Actors
        on_behalf_of_header:
          type: string
          title: On Behalf Of Header
          default: X-Nx1-On-Behalf-Of
        impersonation:
          anyOf:
            - $ref: '#/components/schemas/TokenExchangeStepView'
            - type: 'null'
        steps:
          items:
            $ref: '#/components/schemas/TokenExchangeStepView'
          type: array
          title: Steps
        cache_skew_seconds:
          type: integer
          title: Cache Skew Seconds
          default: 60
      type: object
      title: TokenExchangeSettingsView
      description: A catalog's token exchange as returned to people (no secrets).
    TokenExchangeStepView:
      properties:
        name:
          type: string
          title: Name
          default: ''
        token_url:
          type: string
          title: Token Url
          default: ''
        grant_type:
          type: string
          title: Grant Type
          default: ''
        client_auth:
          anyOf:
            - type: string
              enum:
                - basic
                - post
                - none
            - type: 'null'
          title: Client Auth
        client_id:
          type: string
          title: Client Id
          default: ''
        client_secret_set:
          type: boolean
          title: Client Secret Set
          description: Whether a client secret is stored for this step.
          default: false
        subject_param:
          type: string
          title: Subject Param
          default: ''
        subject_token_type:
          type: string
          title: Subject Token Type
          default: ''
        user_param:
          type: string
          title: User Param
          default: ''
        requested_token_type:
          type: string
          title: Requested Token Type
          default: ''
        audience:
          type: string
          title: Audience
          default: ''
        scope:
          type: string
          title: Scope
          default: ''
        resource:
          type: string
          title: Resource
          default: ''
        params:
          additionalProperties:
            type: string
          type: object
          title: Params
        token_field:
          type: string
          title: Token Field
          default: ''
        verify_tls:
          type: boolean
          title: Verify Tls
          default: true
      type: object
      title: TokenExchangeStepView
      description: 'A step as returned to people: everything except the secret.'
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

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