scope
とtemplateKey
の値でメタデータテンプレートを取得します。
テンプレートのscope
とtemplateKey
を調べるには、会社のすべてのテンプレートまたはグローバルテンプレートのリストを取得するか、ファイルまたはフォルダに適用されているすべてのテンプレートのリストを取得します。
global
メタデータテンプレートのスコープ
次の値のいずれか1つ: global
,enterprise
properties
メタデータテンプレートの名前
scope
およびtemplate
の名前と一致するメタデータテンプレートを返します。
リクエストパラメータのいずれかが無効な場合に返されます。
bad_request
: テンプレートのスコープが認識されていない場合によく返されます。scope
の値として必ずenterprise
またはglobal
を使用してください。指定されたscope
およびtemplate_key
を持つテンプレートが見つからない場合に返されます。
予期しないクライアントエラー。
curl -i -X GET "https://api.box.com/2.0/metadata_templates/enterprise/blueprintTemplate/schema" \
-H "authorization: Bearer <ACCESS_TOKEN>"
{
"id": "58063d82-4128-7b43-bba9-92f706befcdf",
"type": "metadata_template",
"copyInstanceOnItemCopy": true,
"displayName": "Product Info",
"fields": [
{
"description": "The category",
"displayName": "Category",
"hidden": true,
"key": "category",
"options": [
{
"key": "Category 1",
"id": "45dc2849-a4a7-40a9-a751-4a699a589190"
}
],
"type": "string",
"id": "822227e0-47a5-921b-88a8-494760b2e6d2"
}
],
"hidden": true,
"scope": "enterprise_123456",
"templateKey": "productInfo"
}