> ## 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.

# Get the catalogs every Trino instance should have (machine-to-machine)

> Return every catalog created through this API, with its connector and properties.
The nx1 Trino catalog store polls this, so a catalog created here exists on every
Trino instance rather than on one. Machine-to-machine only (general PSK), because
the properties carry each catalog's **unredacted** credentials.



## OpenAPI

````yaml get /api/metastore/trino/catalogs
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/trino/catalogs:
    get:
      tags:
        - Metastore
      summary: Get the catalogs every Trino instance should have (machine-to-machine)
      description: >-
        Return every catalog created through this API, with its connector and
        properties.

        The nx1 Trino catalog store polls this, so a catalog created here exists
        on every

        Trino instance rather than on one. Machine-to-machine only (general
        PSK), because

        the properties carry each catalog's **unredacted** credentials.
      operationId: get_trino_catalogs_api_metastore_trino_catalogs_get
      responses:
        '200':
          description: Catalogs retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrinoCatalogsResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    TrinoCatalogsResponse:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/TrinoCatalogConfig'
          type: array
          title: Catalogs
          description: Catalogs every Trino instance should have.
      type: object
      required:
        - catalogs
      title: TrinoCatalogsResponse
      description: |-
        Every catalog created through this API, for Trino's catalog store.

        Machine-to-machine only (general PSK), because the properties carry each
        catalog's unredacted credentials.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    TrinoCatalogConfig:
      properties:
        name:
          type: string
          title: Name
          description: Catalog name, as Trino SQL addresses it.
        connector:
          type: string
          title: Connector
          description: Trino connector, as in `CREATE CATALOG ... USING <connector>`.
        properties:
          additionalProperties:
            type: string
          type: object
          title: Properties
          description: Connector properties, unredacted.
      type: object
      required:
        - name
        - connector
        - properties
      title: TrinoCatalogConfig
      description: One catalog, as a Trino instance creates it.
  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.