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

# Analyze Airtable import source

> List accessible Airtable bases or summarize one base schema before import



## OpenAPI

````yaml /swagger.json post /base/import-airtable/analyze
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:
  /base/import-airtable/analyze:
    post:
      tags:
        - base
      summary: analyze an Airtable import source
      description: >-
        List accessible Airtable bases or summarize one base schema before
        import
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                integrationId:
                  type: string
                  description: >-
                    Id of a connected Airtable user integration; its access
                    token is resolved (and refreshed) server-side and never
                    leaves the server.
                accessToken:
                  type: string
                  minLength: 1
                  description: >-
                    Airtable personal access token for direct API usage (never
                    persisted by the server). Ignored when integrationId is
                    provided.
                airtableBaseId:
                  type: string
                  description: >-
                    When omitted the accessible Airtable bases are listed; when
                    provided the base schema summary is returned.
      responses:
        '200':
          description: >-
            Returns accessible bases or the schema summary of the requested
            base.
          content:
            application/json:
              schema:
                type: object
                properties:
                  bases:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        permissionLevel:
                          type: string
                      required:
                        - id
                        - name
                        - permissionLevel
                  base:
                    type: object
                    properties:
                      id:
                        type: string
                      tables:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            fieldCount:
                              type: number
                            viewCount:
                              type: number
                            description:
                              type: string
                            fields:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                  type:
                                    type: string
                                  description:
                                    type: string
                                required:
                                  - name
                                  - type
                          required:
                            - id
                            - name
                            - fieldCount
                            - viewCount
                            - fields
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                              enum:
                                - fieldDegraded
                                - fieldSkipped
                                - viewSkipped
                                - valuesDropped
                                - viewConfigDegraded
                            tableName:
                              type: string
                            fieldName:
                              type: string
                            viewName:
                              type: string
                            fromType:
                              type: string
                            toType:
                              type: string
                            count:
                              type: number
                            reason:
                              type: string
                          required:
                            - code
                            - tableName
                    required:
                      - id
                      - tables
                      - issues
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://app.teable.ai/api/base/import-airtable/analyze \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"integrationId":"string","accessToken":"string","airtableBaseId":"string"}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/base/import-airtable/analyze';

            const options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"integrationId":"string","accessToken":"string","airtableBaseId":"string"}'
            };


            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/base/import-airtable/analyze',
              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({integrationId: 'string', accessToken:
            'string', airtableBaseId: 'string'}));

            req.end();
        - lang: Python
          source: >-
            import http.client


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


            payload =
            "{\"integrationId\":\"string\",\"accessToken\":\"string\",\"airtableBaseId\":\"string\"}"


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


            conn.request("POST", "/api/base/import-airtable/analyze", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


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

````