メインコンテンツへスキップ
POST
/
metadata_templates
/
schema#classifications
最初の分類を追加
curl -i -X POST "https://api.box.com/2.0/metadata_templates/schema" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "templateKey": "securityClassification-6VMVochwUWo",
       "scope": "enterprise",
       "displayName": "Classification",
       "hidden": false,
       "copyInstanceOnItemCopy": true,
       "fields": [
         {
           "type": "enum",
           "key": "Box__Security__Classification__Key",
           "displayName": "Classification",
           "hidden": false,
           "options": [
             {
               "key": "Classified",
               "staticConfig": {
                 "classification": {
                   "colorID": 7,
                   "classificationDefinition": "Top Seret"
                 }
               }
             }
           ]
         }
       ]
     }'
{
  "id": "58063d82-4128-7b43-bba9-92f706befcdf",
  "type": "metadata_template",
  "scope": "enterprise_123456",
  "templateKey": "securityClassification-6VMVochwUWo",
  "displayName": "Classification",
  "fields": [
    {
      "id": "822227e0-47a5-921b-88a8-494760b2e6d2",
      "type": "enum",
      "key": "Box__Security__Classification__Key",
      "displayName": "Classification",
      "options": [
        {
          "id": "46aea176-3483-4431-856c-6b5b13d1cc50",
          "key": "Sensitive",
          "staticConfig": {
            "classification": {
              "classificationDefinition": "Sensitive information",
              "colorID": 4
            }
          }
        }
      ],
      "hidden": false
    }
  ],
  "hidden": false,
  "copyInstanceOnItemCopy": true
}

Documentation Index

Fetch the complete documentation index at: https://developer.box.com/llms.txt

Use this file to discover all available pages before exploring further.

このリソースは、バージョン2024.0のエンドポイントで使用されています。 詳細については、 Box APIのバージョン管理を参照してください。Box SDKのバージョニング戦略について詳しく学ぶ。」

承認

Authorization
string
header
必須

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

ボディ

application/json
scope
enum<string>
必須

分類を作成するスコープ。これには、enterpriseまたはenterprise_{id} (idは会社の一意のID) を指定する必要があります。

利用可能なオプション:
enterprise
:

"enterprise"

templateKey
enum<string>
必須

メタデータテンプレートのリストを定義します。

利用可能なオプション:
securityClassification-6VMVochwUWo
:

"securityClassification-6VMVochwUWo"

displayName
enum<string>
必須

ウェブインターフェースおよびモバイルインターフェースに表示されるテンプレートの名前。

利用可能なオプション:
Classification
:

"Classification"

fields
object[]
必須

分類テンプレートにはフィールドが1つだけ必要で、このフィールドでは、有効な分類の値がすべて保持されます。

hidden
boolean

分類テンプレートをウェブおよびモバイルデバイスで非表示にするか使用可能にするかを決定します。

:

false

copyInstanceOnItemCopy
boolean

ファイルまたはフォルダをコピーするときに分類もコピーするかどうかを決定します。

:

false

レスポンス

新しいsecurityClassificationメタデータテンプレートを返します。これには、この会社が使用できるすべての分類のリストを取得するBox__Security__Classification__Keyフィールドが含まれています。

会社が定義したセキュリティ分類を保持するメタデータテンプレート。

id
string
必須

分類テンプレートのID。

:

"58063d82-4128-7b43-bba9-92f706befcdf"

type
enum<string>
必須

値は常にmetadata_templateになります。

利用可能なオプション:
metadata_template
:

"metadata_template"

scope
string
必須

分類テンプレートのスコープ。これはenterprise_{id}形式 (idはEnterprise ID) になります。

:

"enterprise_123456"

templateKey
enum<string>
必須

値は常にsecurityClassification-6VMVochwUWoになります。

利用可能なオプション:
securityClassification-6VMVochwUWo
:

"securityClassification-6VMVochwUWo"

displayName
enum<string>
必須

ウェブインターフェースおよびモバイルインターフェースに表示されるこのテンプレートの名前。

利用可能なオプション:
Classification
:

"Classification"

fields
object[]
必須

この分類テンプレートのフィールドのリスト。これには、Box__Security__Classification__Keyというフィールドが1つだけ含まれています。これにより、この会社で使用できるさまざまな分類が定義されます。

Required array length: 1 element
hidden
boolean

このテンプレートを常にウェブインターフェースおよびモバイルインターフェースで使用可能にするかどうかを決定します。

:

false

copyInstanceOnItemCopy
boolean

ファイルまたはフォルダをコピーするときに分類もコピーするかどうかを決定します。

:

true