メインコンテンツへスキップ
POST
/
folders
/
{folder_id}
/
metadata
/
{scope}
/
{template_key}
cURL
curl -i -X POST "https://api.box.com/2.0/folders/4353455/metadata/enterprise_27335/blueprintTemplate" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "audience": "internal",
       "documentType": "Q1 plans",
       "competitiveDocument": "no",
       "status": "active",
       "author": "Jones",
       "currentState": "proposal"
     }'
{
  "$parent": "folder_59449484661,",
  "$template": "marketingCollateral",
  "$scope": "enterprise_27335",
  "$version": 1,
  "$canEdit": true,
  "$id": "01234500-12f1-1234-aa12-b1d234cb567e",
  "$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
  "$typeVersion": 2
}
このリソースは、バージョン2024.0のエンドポイントで使用されています。 詳細については、 Box APIのバージョン管理を参照してください。Box SDKのバージョニング戦略について詳しく学ぶ。」

承認

Authorization
string
header
必須

The access token received from the authorization server in the OAuth 2.0 flow.

パスパラメータ

folder_id
string
必須

フォルダを表す一意の識別子。

フォルダIDを確認するには、ウェブアプリケーションでこのフォルダにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/folder/123の場合、folder_id123です。

Boxアカウントのルートフォルダは常にID 0で表されます。

scope
enum<string>
必須

メタデータテンプレートのスコープ。

利用可能なオプション:
global,
enterprise
template_key
string
必須

メタデータテンプレートの名前。

ボディ

application/json
{key}
any

A value for each of the fields that are present on the metadata template. For the global.properties template this can be a list of zero or more fields, as this template allows for any generic key-value pairs to be stored in the template. For a taxonomy field, the value should be a list of the node identifiers of the selected taxonomy nodes, since taxonomy fields support multi-select. If a single select taxonomy field is being set, the list should contain a single node identifier.

:

"Aaron Levie"

レスポンス

テンプレートに適用されたデータを含む、フォルダに適用されたテンプレートのインスタンスを返します。

ファイルまたはフォルダに適用された、メタデータテンプレートのインスタンス。

$parent
string

このメタデータインスタンスが追加されている項目の識別子。これは、親のtypeid{type}_{id}という形式で組み合わせたものです。

:

"folder_59449484661,"

$template
string

テンプレートの名前。

:

"marketingCollateral"

$scope
string

このテンプレートが適用されているスコープのID。これは、この会社で使用するために定義されたテンプレートの場合はenterprise_{enterprise_id}、Boxを使用するすべての会社が利用できる一般的なテンプレートの場合はglobalになります。

:

"enterprise_27335"

$version
integer

メタデータインスタンスのバージョン。このバージョンは0から始まり、ユーザー定義プロパティが変更されるたびに増加します。

:

1

$canEdit
boolean

このメタデータインスタンスをユーザーが編集できるかどうか。

:

true

$id
string<uuid>

メタデータインスタンスを識別するためのUUID。

Maximum string length: 36
:

"01234500-12f1-1234-aa12-b1d234cb567e"

$type
string

このインスタンスの「タイプ」に対応する一意の識別子。これは内部システムプロパティであるため、クライアントアプリケーションでは使用しないでください。

:

"properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0"

$typeVersion
integer

オブジェクトテンプレートの既知の最新バージョン。これは内部システムプロパティであるため、クライアントアプリケーションでは使用しないでください。

:

2

{key}
any

メタデータテンプレートに存在する各フィールドの値。global.propertiesテンプレートの場合、汎用的なキー/値ペアをテンプレートに保存できるため、0個以上のフィールドのリストにすることができます。

:

"Aaron Levie"