Box Doc Genテンプレート
Box Doc Genテンプレート
Box Doc Gen APIを使用すると、Box Doc Genテンプレートに関連した情報を取得できます。
前提条件
Before you start using Box Doc Gen API, follow the steps listed in the get started with Box Doc Gen guide to create a platform app and a Box Doc Gen template.
Box Doc Genテンプレートのリストを取得
作成されたすべてのBox Doc Genテンプレートのリストを取得するには、GET /2.0/docgen_templates
エンドポイントを使用し ます。追加のパラメータを指定する必要はありません。
cURL
curl -L 'https://api.box.com/2.0/docgen_templates' \
-H 'box-version: 2025.0' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
TypeScript Gen
await client.docgenTemplate.getDocgenTemplatesV2025R0();
Python Gen
client.docgen_template.get_docgen_templates_v2025_r0()
.NET Gen
await client.DocgenTemplate.GetDocgenTemplatesV2025R0Async();
レスポンスには、すでに作成済みのBox Doc Genテンプレートを列挙するentries
配列が含まれます。
IDを指定してBox Doc Genテンプレートを取得
特定のBox Doc Genテンプレートを取得するには、GET /2.0/docgen_templates_id
エンドポイントを使用し、template_id
を指定します。
cURL
curl -L 'https://api.box.com/2.0/docgen_templates/12345678' \
-H 'box-version: 2025.0' \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
TypeScript Gen
await client.docgenTemplate.getDocgenTemplateByIdV2025R0(
createdDocgenTemplate.file!.id,
);
Python Gen
client.docgen_template.get_docgen_template_by_id_v2025_r0(
created_docgen_template.file.id
)
.NET Gen
await client.DocgenTemplate.GetDocgenTemplateByIdV2025R0Async(templateId: NullableUtils.Unwrap(createdDocgenTemplate.File).Id);
レスポンスには、Box Doc Genテンプレートとして使用されたファイルの詳細が含まれます。