Skip to content

[Airtable] Migrate at-import engine from v0 to new endpoint #5

@Tozarin

Description

@Tozarin

Контекст

packages/nocodb/src/modules/jobs/jobs/at-import/engine/index.ts обращается к старому Airtable share endpoint:

// initialize() — строка 16 const url = https://airtable.com/${appId ? ${appId}/ : ''}${shareId}; return await axios.get(url, { headers: { 'User-Agent': '...', accept: '...' } });
// read() — строка 42 return await axios('https://airtable.com' + info.link, { headers: { 'User-Agent': '...', cookie, accept: '...' }, method: 'GET', responseType: 'stream', });

Airtable объявил https://airtable.com/<appId>/<shareId> устаревшим. Переходим на новый API endpoint.

Изменения API

  1. Базовый URL для share-инициализации: https://airtable.com/<appId>/<shareId>https://api.airtable.com/v1/shares/<appId>/<shareId>.
  2. URL в read: https://airtable.com${info.link}https://api.airtable.com/v1${info.link}.
  3. Добавить заголовок X-Airtable-Api-Version: 2025-01-01 в обе axios-call.

Acceptance criteria

  • Оба URL в engine/index.ts начинаются с https://api.airtable.com/v1.
  • Старые упоминания 'https://airtable.com' (без api.) в этом файле удалены.
  • Заголовок X-Airtable-Api-Version присутствует в обеих axios-call.
  • pnpm bootstrap проходит без ошибок типизации.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions