すべてのグローバルメタデータテンプレートのリストを取得

get
https://api.box.com/2.0
/metadata_templates/global

Boxを使用するすべての会社が利用できる、すべての汎用グローバルメタデータテンプレートを取得する場合に使用します。

リクエスト

application/json

クエリパラメータ

integer / int64クエリ内省略可能
10001000

返す項目の1ページあたりの最大数。

stringクエリ内省略可能
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii

結果が返される開始位置のマーカー。マーカーベースのページ割りを使用している場合に使用されます。

これを使用するには、usemarkertrueに設定する必要があります。

レスポンス

すべての会社とそれに対応するスキーマで使用できるすべてのメタデータテンプレートを返します。

リクエストパラメータが無効な場合に返されます。

予期しないクライアントエラー。

get
すべてのグローバルメタデータテンプレートのリストを取得
このドキュメント内で一部のAPIを試せるようになりました。
ログイン

リクエストの例

cURL
curl -X GET https://api.box.com/2.0/metadata_templates/global \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
.NET
BoxEnterpriseMetadataTemplateCollection<BoxMetadataTemplate> templates = await client.MetadataManager
    .GetEnterpriseMetadataAsync("global");
Java
Iterable<MetadataTemplate> templates = MetadataTemplate.getEnterpriseMetadataTemplates('global', api);
for (MetadataTemplate templateInfo : templates) {
    // Do something with the metadata template.
}
Python
templates = client.get_metadata_templates(scope='global)
for template in templates:
    print('Metadata template {0} is in global scope'.format(template.templateKey))
Node
client.metadata.getTemplates('global')
	.then(templates => {
		// ...
	});
iOS
client.metadata.listEnterpriseTemplates(scope: "global") { results in
    switch results {
    case let .success(iterator):
        for i in 1 ... 10 {
            iterator.next { result in
                switch result {
                case let .success(template):
                    print("Template name: \(template.displayName)")
                case let .failure(error):
                    print(error)
                }
            }
        }
    case let .failure(error):
        print(error)
    }
}