LegalStack

Google Drive и Sheets

Интеграция с Google-сервисами (Sheets, Drive).

OAuth-callback от Google

GET
/api/v1/integrations/google/callback

Параметры запроса

code?string
state?string

Тело ответа

curl -X GET "https://loading/api/v1/integrations/google/callback"
Пусто

Отключить Google

POST
/api/v1/integrations/google/disconnect
АвторизацияBearer <токен>

В: header

Тело ответа

application/json

curl -X POST "https://loading/api/v1/integrations/google/disconnect"
{
  "success": true
}

Список файлов Google Drive

GET
/api/v1/integrations/google/files
АвторизацияBearer <токен>

В: header

Параметры запроса

folderId?string
mimeType?string
pageToken?string
pageSize?string

Тело ответа

application/json

application/problem+json

curl -X GET "https://loading/api/v1/integrations/google/files"
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Health-check Google-интеграции

GET
/api/v1/integrations/google/health

Тело ответа

application/json

curl -X GET "https://loading/api/v1/integrations/google/health"
{
  "service": "string",
  "status": "string"
}

Импортировать Google Doc как SmartDoc

POST
/api/v1/integrations/google/import/document
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/google/import/document" \  -H "Content-Type: application/json" \  -d '{    "fileId": "string"  }'
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Импортировать Google Sheet в реестр

POST
/api/v1/integrations/google/import/sheet
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/google/import/sheet" \  -H "Content-Type: application/json" \  -d '{    "fileId": "string",    "registryTypeId": "string"  }'
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Создать реестр из Google Sheet

POST
/api/v1/integrations/google/import/sheet/create-registry
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/google/import/sheet/create-registry" \  -H "Content-Type: application/json" \  -d '{    "columnMapping": {      "property1": "string",      "property2": "string"    },    "fields": [      {        "dataType": "string",        "key": "string",        "name": "string"      }    ],    "fileId": "string",    "registryName": "string"  }'
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Предпросмотр Google Sheet

POST
/api/v1/integrations/google/import/sheet/preview
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/google/import/sheet/preview" \  -H "Content-Type: application/json" \  -d '{    "fileId": "string"  }'
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Получить URL для авторизации в Google

POST
/api/v1/integrations/google/oauth/prepare
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

returnUrl?string

Тело ответа

application/json

curl -X POST "https://loading/api/v1/integrations/google/oauth/prepare" \  -H "Content-Type: application/json" \  -d '{}'
{
  "url": "string"
}

Статус подключения Google

GET
/api/v1/integrations/google/status
АвторизацияBearer <токен>

В: header

Тело ответа

application/json

curl -X GET "https://loading/api/v1/integrations/google/status"
{
  "connected": true,
  "status": "connected"
}

Синхронизировать реестр с Google Sheet

POST
/api/v1/integrations/google/sync/{typeId}
АвторизацияBearer <токен>

В: header

Параметры пути

typeId*string

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/google/sync/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}

Предпросмотр синхронизации реестра

GET
/api/v1/integrations/google/sync/{typeId}/preview
АвторизацияBearer <токен>

В: header

Параметры пути

typeId*string

Тело ответа

application/json

curl -X GET "https://loading/api/v1/integrations/google/sync/string/preview"
{
  "property1": null,
  "property2": null
}

Загрузить файл в Google Drive

POST
/api/v1/integrations/google/upload
АвторизацияBearer <токен>

В: header

Тело запроса

application/json

TypeScript-определения

Используйте тип request body в TypeScript.

Тело ответа

application/json

application/problem+json

curl -X POST "https://loading/api/v1/integrations/google/upload" \  -H "Content-Type: application/json" \  -d '{    "contentBase64": "string",    "fileName": "string"  }'
{
  "property1": null,
  "property2": null
}
{
  "code": "string",
  "detail": "string",
  "errors": [
    {
      "name": "string",
      "pointer": "string",
      "reason": "string",
      "rule": "string"
    }
  ],
  "instance": "string",
  "request_id": "string",
  "status": 0,
  "title": "string",
  "trace_id": "string",
  "type": "http://example.com",
  "property1": null,
  "property2": null
}