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

# Accept (and provision + create/merge) selected suggestions



## OpenAPI

````yaml post /api/govern/data-access/suggest/{correlation_id}/accept
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/govern/data-access/suggest/{correlation_id}/accept:
    post:
      tags:
        - Policy management
      summary: Accept (and provision + create/merge) selected suggestions
      operationId: >-
        accept_suggestion_api_govern_data_access_suggest__correlation_id__accept_post
      parameters:
        - name: correlation_id
          in: path
          required: true
          schema:
            type: string
            description: Suggestion correlation ID.
            title: Correlation Id
          description: Suggestion correlation ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicySuggestionAcceptRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkPolicyCreateResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    PolicySuggestionAcceptRequest:
      properties:
        accepted:
          items:
            $ref: '#/components/schemas/PolicySuggestionAcceptItem'
          type: array
          title: Accepted
      type: object
      title: PolicySuggestionAcceptRequest
      description: Accept a subset of a suggestion row's proposals.
    BulkPolicyCreateResponse:
      properties:
        total:
          type: integer
          title: Total
          description: >-
            Total result lines equal the sum of created, updated, and failed. A
            multi-database row contributes one line per derived policy, so this
            can exceed the number of submitted rows.
        created:
          type: integer
          title: Created
        updated:
          type: integer
          title: Updated
        failed:
          type: integer
          title: Failed
        results:
          items:
            $ref: '#/components/schemas/BulkPolicyResult'
          type: array
          title: Results
      type: object
      required:
        - total
        - created
        - updated
        - failed
        - results
      title: BulkPolicyCreateResponse
      description: Aggregate response for the bulk-create endpoint.
    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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PolicySuggestionAcceptItem:
      properties:
        suggestion_id:
          type: string
          title: Suggestion Id
          description: ID of the suggestion being accepted.
        policy:
          $ref: '#/components/schemas/PolicyCreateRequest-Input'
          description: >-
            The policy to create/merge — re-validated server-side at accept
            time.
        provision_keycloak:
          type: boolean
          title: Provision Keycloak
          description: When true, provision missing Keycloak principals before Ranger.
          default: false
      type: object
      required:
        - suggestion_id
        - policy
      title: PolicySuggestionAcceptItem
      description: One accepted (possibly edited) suggestion.
    BulkPolicyResult:
      properties:
        row_index:
          type: integer
          title: Row Index
          description: Original 0-based row index in the submitted batch.
        name:
          type: string
          title: Name
          description: >-
            Policy name from the submitted row. Might be empty if the row failed
            before parsing.
        status:
          type: string
          enum:
            - created
            - updated
            - failed
          title: Status
        policy_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Policy Id
          description: Ranger policy ID on success.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message on failure.
      type: object
      required:
        - row_index
        - name
        - status
      title: BulkPolicyResult
      description: One row's outcome in a bulk-create response.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PolicyCreateRequest-Input:
      properties:
        name:
          type: string
          title: Name
          description: Policy name.
        description:
          type: string
          title: Description
          description: Policy description.
          default: ''
        resources:
          additionalProperties:
            $ref: '#/components/schemas/RangerResourceValue'
          type: object
          title: Resources
          description: >-
            Resource definitions keyed by resource type. For example, `catalog`,
            `schema`, `table`, `column`, `url`.
        policyType:
          type: integer
          title: Policytype
          description: 0=ACCESS, 1=MASKING, 2=ROWFILTER.
          default: 0
        policyPriority:
          type: integer
          title: Policypriority
          description: 0=NORMAL, 1=OVERRIDE. Controls evaluation order.
          default: 0
        isEnabled:
          type: boolean
          title: Isenabled
          default: true
        isAuditEnabled:
          type: boolean
          title: Isauditenabled
          default: true
        isDenyAllElse:
          type: boolean
          title: Isdenyallelse
          description: >-
            If true, Ranger denies any access not explicitly allowed by this
            policy.
          default: false
        policyItems:
          items:
            $ref: '#/components/schemas/RangerPolicyItemModel'
          type: array
          title: Policyitems
          description: Allow access items.
        denyPolicyItems:
          items:
            $ref: '#/components/schemas/RangerPolicyItemModel'
          type: array
          title: Denypolicyitems
          description: Deny access items.
        allowExceptions:
          items:
            $ref: '#/components/schemas/RangerPolicyItemModel'
          type: array
          title: Allowexceptions
          description: Allow exception items.
        denyExceptions:
          items:
            $ref: '#/components/schemas/RangerPolicyItemModel'
          type: array
          title: Denyexceptions
          description: Deny exception items.
        rowFilterPolicyItems:
          items:
            $ref: '#/components/schemas/RangerRowFilterItemModel'
          type: array
          title: Rowfilterpolicyitems
          description: Row filter items. Supports `policyType=2` only.
        dataMaskPolicyItems:
          items:
            $ref: '#/components/schemas/RangerDataMaskItemModel'
          type: array
          title: Datamaskpolicyitems
          description: Masking items. Supports `policyType=1` only.
        policyLabels:
          items:
            type: string
          type: array
          title: Policylabels
          description: Labels for grouping/filtering policies.
        overwrite:
          type: boolean
          title: Overwrite
          description: >-
            Defaults to `False`. If set to `False`, a name collision returns a
            409 error response. Set to `True` to intentionally update an
            existing policy of the same name.
          default: false
      type: object
      required:
        - name
        - resources
      title: PolicyCreateRequest
      description: Request to create or update a single Ranger policy.
    RangerResourceValue:
      properties:
        values:
          items:
            type: string
          type: array
          title: Values
          description: >-
            Resource values. For example, `['iceberg']`, `['my_schema']`, or
            `['*']`.
        isExcludes:
          type: boolean
          title: Isexcludes
          description: If set to `True`, NexusOne excludes the values.
          default: false
        isRecursive:
          type: boolean
          title: Isrecursive
          description: If set to `True`, applies recursively.
          default: false
      type: object
      required:
        - values
      title: RangerResourceValue
      description: >-
        A single resource entry in a Ranger policy. For example, `catalog`,
        `schema`, or `table`.
    RangerPolicyItemModel:
      properties:
        accesses:
          items:
            $ref: '#/components/schemas/RangerAccess'
          type: array
          title: Accesses
          description: Access types granted/denied.
        users:
          items:
            type: string
          type: array
          title: Users
          description: Users this item applies to.
        groups:
          items:
            type: string
          type: array
          title: Groups
          description: Groups this item applies to.
        roles:
          items:
            type: string
          type: array
          title: Roles
          description: Roles this item applies to.
        delegateAdmin:
          type: boolean
          title: Delegateadmin
          description: Whether grantees can delegate administrator rights.
          default: false
      type: object
      title: RangerPolicyItemModel
      description: An access control entry within a Ranger policy.
    RangerRowFilterItemModel:
      properties:
        accesses:
          items:
            $ref: '#/components/schemas/RangerAccess'
          type: array
          title: Accesses
        users:
          items:
            type: string
          type: array
          title: Users
        groups:
          items:
            type: string
          type: array
          title: Groups
        roles:
          items:
            type: string
          type: array
          title: Roles
        rowFilterInfo:
          additionalProperties: true
          type: object
          title: Rowfilterinfo
          description: 'Row filter definition. For example, `{''filterExpr'': ''col > 5''}`.'
      type: object
      required:
        - rowFilterInfo
      title: RangerRowFilterItemModel
      description: A row filter entry within a Ranger row-filter policy.
    RangerDataMaskItemModel:
      properties:
        accesses:
          items:
            $ref: '#/components/schemas/RangerAccess'
          type: array
          title: Accesses
        users:
          items:
            type: string
          type: array
          title: Users
        groups:
          items:
            type: string
          type: array
          title: Groups
        delegateAdmin:
          type: boolean
          title: Delegateadmin
          default: false
        dataMaskInfo:
          $ref: '#/components/schemas/RangerDataMaskInfoModel'
      type: object
      required:
        - dataMaskInfo
      title: RangerDataMaskItemModel
      description: A masking entry within a Ranger masking policy.
    RangerAccess:
      properties:
        type:
          type: string
          title: Type
          description: Access type. For example, `select`, `insert`, `use`, `show`.
        isAllowed:
          type: boolean
          title: Isallowed
          description: Whether you can use this Ranger access type.
          default: true
      type: object
      required:
        - type
      title: RangerAccess
      description: A single access type in a policy item.
    RangerDataMaskInfoModel:
      properties:
        dataMaskType:
          type: string
          title: Datamasktype
          description: >-
            Mask type name from the service-def. For example, `MASK`,
            `MASK_NULL`.
        conditionExpr:
          anyOf:
            - type: string
            - type: 'null'
          title: Conditionexpr
        valueExpr:
          anyOf:
            - type: string
            - type: 'null'
          title: Valueexpr
      type: object
      required:
        - dataMaskType
      title: RangerDataMaskInfoModel
      description: 'Masking spec: which mask type + optional expressions.'
  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.