> ## 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 Iceberg REST catalogs as Spark properties (machine-to-machine)

> Return every Iceberg REST catalog as the `spark.sql.catalog.<name>*` properties that
register it in a Spark session. The nx1 Spark catalogs extension polls this so a catalog
created here is visible to Spark without a redeploy. Machine-to-machine only (general PSK),
because the properties carry each catalog's **unredacted** OAuth2 credential or token.



## OpenAPI

````yaml get /api/metastore/spark/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/spark/catalogs:
    get:
      tags:
        - Metastore
      summary: Get the Iceberg REST catalogs as Spark properties (machine-to-machine)
      description: >-
        Return every Iceberg REST catalog as the `spark.sql.catalog.<name>*`
        properties that

        register it in a Spark session. The nx1 Spark catalogs extension polls
        this so a catalog

        created here is visible to Spark without a redeploy. Machine-to-machine
        only (general PSK),

        because the properties carry each catalog's **unredacted** OAuth2
        credential or token.
      operationId: get_spark_catalogs_api_metastore_spark_catalogs_get
      responses:
        '200':
          description: Iceberg REST catalogs retrieved successfully.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api__models__metastore_models__SparkCatalogsResponse
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    api__models__metastore_models__SparkCatalogsResponse:
      properties:
        catalogs:
          items:
            $ref: '#/components/schemas/SparkCatalogConfig'
          type: array
          title: Catalogs
          description: Iceberg REST catalogs, as Spark properties.
      type: object
      required:
        - catalogs
      title: SparkCatalogsResponse
      description: >-
        Every Iceberg REST catalog Spark sessions should see.


        Machine-to-machine only (general PSK), because the properties carry the
        unredacted

        OAuth2 credential or bearer token each catalog authenticates with.
    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
    SparkCatalogConfig:
      properties:
        name:
          type: string
          title: Name
          description: Catalog name, as Spark SQL addresses it.
        properties:
          additionalProperties:
            type: string
          type: object
          title: Properties
          description: >-
            Spark properties that register the catalog. Every key is
            `spark.sql.catalog.<name>` or starts with
            `spark.sql.catalog.<name>.`.
      type: object
      required:
        - name
        - properties
      title: SparkCatalogConfig
      description: One Iceberg REST catalog, as the Spark properties that register 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.