Box Doc Genテンプレート
Box Doc Genテンプレート
Box Doc Gen APIを使用すると、Box Doc Genテンプレートに関連した情報を取得できます。
前提条件
Box Doc Gen APIの使用を開始する前に、Box Doc Genの使い方ガイドに記載されている手順に従って、PlatformアプリとBox Doc Genテンプレー トを作成してください。
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>'Node/TypeScript v10
await client.docgenTemplate.getDocgenTemplatesV2025R0();Python v10
client.docgen_template.get_docgen_templates_v2025_r0().NET v10
await client.DocgenTemplate.GetDocgenTemplatesV2025R0Async();Swift v10
try await client.docgenTemplate.getDocgenTemplatesV2025R0()Java v10
client.getDocgenTemplate().getDocgenTemplatesV2025R0()レスポンスには、すでに作成済みの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>'Node/TypeScript v10
await client.docgenTemplate.getDocgenTemplateByIdV2025R0(
createdDocgenTemplate.file!.id,
);Python v10
client.docgen_template.get_docgen_template_by_id_v2025_r0(
created_docgen_template.file.id
).NET v10
await client.DocgenTemplate.GetDocgenTemplateByIdV2025R0Async(templateId: NullableUtils.Unwrap(createdDocgenTemplate.File).Id);Swift v10
try await client.docgenTemplate.getDocgenTemplateByIdV2025R0(templateId: createdDocgenTemplate.file!.id)Java v10
client.getDocgenTemplate().getDocgenTemplateByIdV2025R0(createdDocgenTemplate.getFile().getId())レスポンスには、Box Doc Genテンプレートとして使用されたファイルの詳細が含まれます。