メタデータテンプレートの取得
メタデータテンプレートの取得
メタデータテンプレートに関する情報を取得するには、テンプレートの名前とスコープ、またはテンプレートの識別子を使用します。
名前を指定してメタデータテンプレートを取得
名前を指定してメタデータテンプレートを取得するには、テン プレートのscopeとtemplateKeyを指定してGET /metadata_templates/:scope/:templateKey/schema APIエンドポイントを呼び出します。
cURL
curl -i -X GET "https://api.box.com/2.0/metadata_templates/enterprise/blueprintTemplate/schema" \
-H "authorization: Bearer <ACCESS_TOKEN>"Node/TypeScript v10
await client.metadataTemplates.getMetadataTemplate(
'enterprise' as GetMetadataTemplateScope,
template.templateKey!,
);Python v10
client.metadata_templates.get_metadata_template(
GetMetadataTemplateScope.ENTERPRISE, template.template_key
).NET v10
await client.MetadataTemplates.GetMetadataTemplateAsync(scope: GetMetadataTemplateScope.Enterprise, templateKey: NullableUtils.Unwrap(template.TemplateKey));Swift v10
try await client.metadataTemplates.getMetadataTemplate(scope: GetMetadataTemplateScope.enterprise, templateKey: template.templateKey!)Java v10
client.getMetadataTemplates().getMetadataTemplate(GetMetadataTemplateScope.ENTERPRISE, template.getTemplateKey()).NET v6
await client.MetadataTemplates.GetMetadataTemplateAsync(scope: GetMetadataTemplateScope.Enterprise, templateKey: NullableUtils.Unwrap(template.TemplateKey));Node v4
await client.metadataTemplates.getMetadataTemplate(
'enterprise' as GetMetadataTemplateScope,
template.templateKey!,
);IDを指定してメタデータテンプレートを取得
IDを指定してメタデータテンプレートを取得するには、テンプレートのidをGET /metadata_templates/:id APIエンドポイントに渡す必要があります。
cURL
curl -i -X GET "https://api.box.com/2.0/metadata_templates/d9671692-3df6-11ea-b77f-2e728ce88125" \
-H "authorization: Bearer <ACCESS_TOKEN>"Node/TypeScript v10
await client.metadataTemplates.getMetadataTemplateById(template.id);Python v10
client.metadata_templates.get_metadata_template_by_id(template.id).NET v10
await client.MetadataTemplates.GetMetadataTemplateByIdAsync(templateId: template.Id);Swift v10
try await client.metadataTemplates.getMetadataTemplateById(templateId: template.id)Java v10
client.getMetadataTemplates().getMetadataTemplateById(template.getId()).NET v6
await client.MetadataTemplates.GetMetadataTemplateByIdAsync(templateId: template.Id);Node v4
await client.metadataTemplates.getMetadataTemplateById(template.id);