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

# Add a share from a profile

> Make an outside provider's connection profile into a catalog. Who may
query it is managed like any other catalog's policies.

**Required roles**: `nx1_catalog_admin` and a Data Access grant role



## OpenAPI

````yaml post /api/data-shares/incoming/profile
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/data-shares/incoming/profile:
    post:
      tags:
        - Data shares
      summary: Add a share from a profile
      description: |-
        Make an outside provider's connection profile into a catalog. Who may
        query it is managed like any other catalog's policies.

        **Required roles**: `nx1_catalog_admin` and a Data Access grant role
      operationId: import_profile_api_data_shares_incoming_profile_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProfileImportRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcceptResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ProfileImportRequest:
      properties:
        profile:
          additionalProperties: true
          type: object
          title: Profile
        catalog_name:
          type: string
          pattern: ^[a-z0-9_][a-z0-9_-]{0,127}$
          title: Catalog Name
      type: object
      required:
        - profile
        - catalog_name
      title: ProfileImportRequest
    AcceptResponse:
      properties:
        share:
          $ref: '#/components/schemas/IncomingShare'
        tables_visible:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tables Visible
      type: object
      required:
        - share
      title: AcceptResponse
    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
    IncomingShare:
      properties:
        id:
          type: string
          title: Id
        source:
          type: string
          title: Source
        provider_name:
          type: string
          title: Provider Name
          description: The name the provider gives itself; unverified.
        provider_url:
          type: string
          title: Provider Url
          default: ''
        provider_host:
          type: string
          title: Provider Host
          description: 'The host it was verified at: the provider''s real identity.'
          default: ''
        name:
          type: string
          title: Name
        purpose:
          type: string
          title: Purpose
          default: ''
        warehouse:
          type: string
          title: Warehouse
        tables:
          items:
            type: string
          type: array
          title: Tables
        expires_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Expires At
        status:
          type: string
          title: Status
        catalog_name:
          type: string
          title: Catalog Name
          default: ''
        granted_roles:
          items:
            type: string
          type: array
          title: Granted Roles
        received_at:
          type: string
          title: Received At
        accepted_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Accepted At
        accepted_by:
          type: string
          title: Accepted By
          default: ''
        last_test:
          additionalProperties: true
          type: object
          title: Last Test
      type: object
      required:
        - id
        - source
        - provider_name
        - name
        - warehouse
        - tables
        - status
        - received_at
      title: IncomingShare
  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.