Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 44 additions & 9 deletions content/guides/pro/api.ja-JP.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,21 @@ title: API
type: 'string',
required: true,
description: '作成者 ID',
}, {
name: 'idempotencyKey',
type: 'string',
required: false,
description: 'v0.20.0から導入されたオプションの冪等キー、文字数は<=64である必要があります',
}, {
name: 'metaData',
type: 'string',
required: false,
description: 'v0.20.0から導入されたオプションの元数据、ユーザー定義の情報で、作成されたunitに紐づけられ、その後の同期イベントやUSIP呼び出しで透過されます。全バイト数は<=1024である必要があります',
}],
example: `curl http://localhost:8000/universer-api/snapshot/{type}/unit/-/create \\
-X POST \\
-H 'Content-Type: application/json' \\
--data-raw '{"type":2,"name":"New Sheet By Univer","creator":"userID"}'`,
--data-raw '{"type":2,"name":"New Sheet By Univer","creator":"userID","idempotencyKey":"a-idgenerator-unique-id","metaData":"tenant12345"}'`,
}}
response={{
type: 'application/json',
Expand Down Expand Up @@ -223,7 +233,7 @@ title: API

## ファイルとインポート/エクスポート

### ファイルアップロード
### ファイルアップロード [#upload-file]

<APITable
request={{
Expand Down Expand Up @@ -259,7 +269,7 @@ title: API
}}
/>

### インポート
### インポート [#import-file]

<APITable
request={{
Expand Down Expand Up @@ -292,10 +302,20 @@ title: API
type: 'int',
required: true,
description: '最小列数',
}, {
name: 'idempotencyKey',
type: 'string',
required: false,
description: 'v0.20.0から導入されたオプションの冪等キー、文字数は<=64である必要があります',
}, {
name: 'metaData',
type: 'string',
required: false,
description: 'v0.20.0から導入されたオプションの元数据、ユーザー定義の情報で、インポートされたunitに紐づけられ、その後の同期イベントやUSIP呼び出しで透過されます。全バイト数は<=1024である必要があります',
}],
example: `curl -X POST 'http://localhost:8000/universer-api/exchange/2/import' \\
-H 'Content-Type: application/json' \\
--data-raw '{"fileID":"123","outputType":1,"minSheetRowCount":1000,"minSheetColumnCount":20}'`,
--data-raw '{"fileID":"123","outputType":1,"minSheetRowCount":1000,"minSheetColumnCount":20,"idempotencyKey":"a-idgenerator-unique-id","metaData":"tenant12345"}'`,
}}
response={{
type: 'application/json',
Expand Down Expand Up @@ -326,7 +346,7 @@ title: API
}}
/>

### エクスポート
### エクスポート [#export-file]

<APITable
request={{
Expand All @@ -343,12 +363,27 @@ title: API
name: 'unitID',
type: 'string',
required: true,
description: 'ドキュメント ID',
description: '協同ドキュメント ID;jsonID 方式でエクスポートする場合、unitID は空文字列を渡してください',
}, {
name: 'jsonID',
type: 'string',
required: true,
description: '非協同ドキュメントエクスポートの方式で、jsonID はフロントエンドの json 生成のファイルアップロード後に返される FileId です。unitID 方式でエクスポートする場合、jsonID は空文字列を渡してください',
}, {
name: 'sscSwitch',
type: 'boolean',
required: false,
description: 'SSC(Server Side Calculation)を有効化',
}, {
name: 'useImageUrl',
type: 'boolean',
required: false,
description: 'セル内の画像をリンクに変換することを禁止するかどうか。true の場合、セル内の画像はリンクに変換されません。デフォルトは false です',
}, {
name: 'ignoreTableExport',
type: 'boolean',
required: false,
description: 'テーブル(Table)エクスポートを無視するかどうか。デフォルトは false です',
}],
example: `curl -X POST 'http://localhost:8000/universer-api/exchange/2/export' \\
-H 'Content-Type: application/json' \\
Expand Down Expand Up @@ -383,7 +418,7 @@ title: API
}}
/>

### 変換結果の取得
### 変換結果の取得 [#get-task-result]

<APITable
request={{
Expand Down Expand Up @@ -454,7 +489,7 @@ title: API
}}
/>

### ファイル取得
### ファイル取得 [#get-file]

<APITable
request={{
Expand All @@ -465,7 +500,7 @@ title: API
name: 'fileID',
type: 'string',
required: true,
description: '結果ファイル ID',
description: '結果ファイル ID (export.fileID または import.jsonID)',
}],
example: `curl -X GET 'http://localhost:8000/universer-api/file/1234/sign-url'`,
}}
Expand Down
29 changes: 22 additions & 7 deletions content/guides/pro/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ This page lists common Univer Server APIs. The default base URL is `http://local

## Files and Import/Export

### Upload File
### Upload File [#upload-file]

<APITable
request={{
Expand Down Expand Up @@ -269,7 +269,7 @@ This page lists common Univer Server APIs. The default base URL is `http://local
}}
/>

### Import
### Import [#import-file]

<APITable
request={{
Expand Down Expand Up @@ -346,7 +346,7 @@ This page lists common Univer Server APIs. The default base URL is `http://local
}}
/>

### Export
### Export [#export-file]

<APITable
request={{
Expand All @@ -363,12 +363,27 @@ This page lists common Univer Server APIs. The default base URL is `http://local
name: 'unitID',
type: 'string',
required: true,
description: 'Document id',
description: 'Collaborative document id; if exporting as jsonID, unitID can be empty string',
}, {
name: 'jsonID',
type: 'string',
required: true,
description: 'For non-collaborative document export, jsonID is the FileId returned after uploading the file generated from frontend json; if exporting as unitID, jsonID can be empty string',
}, {
name: 'sscSwitch',
type: 'boolean',
required: false,
description: 'Enable SSC (server-side calculation); default false',
}, {
name: 'useImageUrl',
type: 'boolean',
required: false,
description: 'Whether to disable converting cell images to links; if true, cell images will not be converted to links; default false',
}, {
name: 'ignoreTableExport',
type: 'boolean',
required: false,
description: 'Whether to ignore table export; default false',
}],
example: `curl -X POST 'http://localhost:8000/universer-api/exchange/2/export' \\
-H 'Content-Type: application/json' \\
Expand Down Expand Up @@ -403,7 +418,7 @@ This page lists common Univer Server APIs. The default base URL is `http://local
}}
/>

### Get Task Result
### Get Task Result [#get-task-result]

<APITable
request={{
Expand Down Expand Up @@ -474,7 +489,7 @@ This page lists common Univer Server APIs. The default base URL is `http://local
}}
/>

### Get File
### Get File [#get-file]

<APITable
request={{
Expand All @@ -485,7 +500,7 @@ This page lists common Univer Server APIs. The default base URL is `http://local
name: 'fileID',
type: 'string',
required: true,
description: 'Result file id',
description: 'Result file id (export.fileID or import.jsonID)',
}],
example: `curl -X GET 'http://localhost:8000/universer-api/file/1234/sign-url'`,
}}
Expand Down
29 changes: 22 additions & 7 deletions content/guides/pro/api.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ title: API

## 文件与导入导出

### 上传文件
### 上传文件 [#upload-file]

<APITable
request={{
Expand Down Expand Up @@ -269,7 +269,7 @@ title: API
}}
/>

### 导入
### 导入 [#import-file]

<APITable
request={{
Expand Down Expand Up @@ -346,7 +346,7 @@ title: API
}}
/>

### 导出
### 导出 [#export-file]

<APITable
request={{
Expand All @@ -363,12 +363,27 @@ title: API
name: 'unitID',
type: 'string',
required: true,
description: '文档 id',
description: '协同文档 id。若以 jsonID 方式导出,则无需 unitID,传空字符串即可',
}, {
name: 'jsonID',
type: 'string',
required: true,
description: '非协同文档导出的方式,jsonID 是前端 snapshot json 生成的文件上传后返回的 FileId。若以 unitID 方式导出,则无需 jsonID,传空字符串即可',
}, {
name: 'sscSwitch',
type: 'boolean',
required: false,
description: '是否开启 SSC(Server Side Calculation),true 则触发服务端公式计算,默认为 false',
}, {
name: 'useImageUrl',
type: 'boolean',
required: false,
description: '是否禁止单元格图片转换为链接,true 则单元格图片不会转换为链接,默认为 false',
}, {
name: 'ignoreTableExport',
type: 'boolean',
required: false,
description: '是否忽略表格(Table)导出,默认为 false',
}],
example: `curl -X POST 'http://localhost:8000/universer-api/exchange/2/export' \\
-H 'Content-Type: application/json' \\
Expand Down Expand Up @@ -403,7 +418,7 @@ title: API
}}
/>

### 获取转换结果
### 获取转换结果 [#get-task-result]

<APITable
request={{
Expand Down Expand Up @@ -474,7 +489,7 @@ title: API
}}
/>

### 获取文件
### 获取文件 [#get-file]

<APITable
request={{
Expand All @@ -485,7 +500,7 @@ title: API
name: 'fileID',
type: 'string',
required: true,
description: '转换任务的结果文件 id',
description: '转换任务的结果文件 id (export.fileID 或 import.jsonID)',
}],
example: `curl -X GET 'http://localhost:8000/universer-api/file/1234/sign-url'`,
}}
Expand Down
Loading
Loading