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

# Post adminobservabilitytable query opssearch access pathsexecute

> Dry-run, create, or rebuild a generated text substring search access path

Required token scopes: `instance|update`



## OpenAPI

````yaml /swagger.json post /admin/observability/table-query-ops/search-access-paths/execute
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /admin/observability/table-query-ops/search-access-paths/execute:
    post:
      tags:
        - admin
        - observability
      description: >-
        Dry-run, create, or rebuild a generated text substring search access
        path


        Required token scopes: `instance|update`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tableId:
                  type: string
                  minLength: 1
                mode:
                  type: string
                  enum:
                    - create
                    - rebuild
                    - drop
                  default: create
                candidateKey:
                  type: string
                  minLength: 1
                semantics:
                  type: string
                  enum:
                    - substring
                  default: substring
                provider:
                  type: string
                  enum:
                    - pg_bigm
                    - pg_trgm
                fieldIds:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                searchProbe:
                  type: string
                validationMode:
                  type: string
                  enum:
                    - plan
                    - real_ddl
                  default: real_ddl
                execute:
                  type: boolean
                  default: false
                allowLargeTableRewrite:
                  type: boolean
                  default: false
                requestId:
                  type: string
                  format: uuid
                  description: >-
                    Reuse for retries; use a new ID for a newly reviewed
                    operation
              required:
                - tableId
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  dryRun:
                    type: boolean
                  action:
                    type: string
                    enum:
                      - dry_run
                      - queued
                      - failed
                  result:
                    nullable: true
                  task:
                    type: object
                    properties:
                      id:
                        type: string
                      recommendationId:
                        type: string
                        nullable: true
                      baseId:
                        type: string
                      tableId:
                        type: string
                      baseName:
                        type: string
                      tableName:
                        type: string
                      kind:
                        type: string
                      status:
                        type: string
                        enum:
                          - queued
                          - running
                          - succeeded
                          - failed
                          - cancelled
                      attempts:
                        type: number
                      maxAttempts:
                        type: number
                      lockedBy:
                        type: string
                        nullable: true
                      lockedAt:
                        type: string
                        nullable: true
                      lastError:
                        type: string
                        nullable: true
                      result:
                        nullable: true
                      createdTime:
                        type: string
                      lastModifiedTime:
                        type: string
                    required:
                      - id
                      - recommendationId
                      - baseId
                      - tableId
                      - kind
                      - status
                      - attempts
                      - maxAttempts
                  error:
                    type: string
                required:
                  - dryRun
                  - action
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/admin/observability/table-query-ops/search-access-paths/execute \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"tableId":"string","mode":"create","candidateKey":"string","semantics":"substring","provider":"pg_bigm","fieldIds":"string","searchProbe":"string","validationMode":"plan","execute":false,"allowLargeTableRewrite":false,"requestId":"d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/admin/observability/table-query-ops/search-access-paths/execute';

            const options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"tableId":"string","mode":"create","candidateKey":"string","semantics":"substring","provider":"pg_bigm","fieldIds":"string","searchProbe":"string","validationMode":"plan","execute":false,"allowLargeTableRewrite":false,"requestId":"d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6"}'
            };


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'POST',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/admin/observability/table-query-ops/search-access-paths/execute',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              tableId: 'string',
              mode: 'create',
              candidateKey: 'string',
              semantics: 'substring',
              provider: 'pg_bigm',
              fieldIds: 'string',
              searchProbe: 'string',
              validationMode: 'plan',
              execute: false,
              allowLargeTableRewrite: false,
              requestId: 'd385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6'
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload =
            "{\"tableId\":\"string\",\"mode\":\"create\",\"candidateKey\":\"string\",\"semantics\":\"substring\",\"provider\":\"pg_bigm\",\"fieldIds\":\"string\",\"searchProbe\":\"string\",\"validationMode\":\"plan\",\"execute\":false,\"allowLargeTableRewrite\":false,\"requestId\":\"d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST",
            "/api/admin/observability/table-query-ops/search-access-paths/execute",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````