curl -i -X POST "https://api.box.com/2.0/files/12345/metadata/global/boxSkillsCards" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"cards": [{
"type": "skill_card",
"skill_card_type": "keyword",
"skill_card_title": {
"code": "license-plates",
"message": "Licence Plates"
},
"skill": {
"type": "service",
"id": "license-plates-service"
},
"invocation": {
"type": "skill_invocation",
"id": "license-plates-service-123"
},
"entries": [
{ "text": "DD-26-YT" },
{ "text": "DN86 BOX" }
]
},{
"type": "skill_card",
"skill_card_type": "transcript",
"skill_card_title": {
"code": "video-transcription",
"message": "Video Transcription"
},
"skill": {
"type": "service",
"id": "video-transcription-service"
},
"invocation": {
"type": "skill_invocation",
"id": "video-transcription-service-123"
},
"duration": 1000,
"entries": [
{
"text": "Hi John, have I told you about Box recently?",
"appears": [{ "start": 0 }]
},
{
"text": "No Aaron, you have not. Tell me more!",
"appears": [{ "start": 5 }]
}
]
},{
"type": "skill_card",
"skill_card_type": "timeline",
"skill_card_title": {
"code": "face-detection",
"message": "Faces"
},
"skill": {
"type": "service",
"id": "face-detection-service"
},
"invocation": {
"type": "skill_invocation",
"id": "face-detection-service-123"
},
"duration": 1000,
"entries": [
{
"text": "John",
"appears": [{ "start": 0, "end": 5 }, { "start": 10, "end": 15 }],
"image_url": "https://example.com/john.png"
},
{
"text": "Aaron",
"appears": [{ "start": 5, "end": 10 }],
"image_url": "https://example.com/aaron.png"
}
]
},{
"type": "skill_card",
"skill_card_type": "status",
"skill_card_title": {
"code": "hold",
"message": "Please hold..."
},
"skill": {
"type": "service",
"id": "face-detection-service"
},
"invocation": {
"type": "skill_invocation",
"id": "face-detection-service-123"
},
"status": {
"code": "processing",
"message": "We are processing this file right now."
}
}]
}'client.skills.create_box_skill_cards_on_file(file.id, cards_to_create)await client.skills.createBoxSkillCardsOnFile(file.id, {
cards: cardsToCreate,
} satisfies CreateBoxSkillCardsOnFileRequestBody);client.getSkills().createBoxSkillCardsOnFile(file.getId(), new CreateBoxSkillCardsOnFileRequestBody(cardsToCreate)){
"$canEdit": true,
"$id": "01234500-12f1-1234-aa12-b1d234cb567e",
"$parent": "folder_59449484661,",
"$scope": "enterprise_27335",
"$template": "properties",
"$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
"$typeVersion": 2,
"$version": 1,
"cards": [
{
"type": "skill_card",
"skill_card_type": "keyword",
"skill": {
"type": "service",
"id": "image-recognition-service"
},
"invocation": {
"type": "skill_invocation",
"id": "image-recognition-service-123"
},
"entries": [
{
"text": "keyword1"
}
],
"created_at": "2018-04-13T13:53:23-07:00",
"skill_card_title": {
"message": "Labels",
"code": "labels"
}
}
]
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}ファイルにBox Skillカードを作成
ファイルに1つ以上のBox Skillsメタデータカードを適用します。
curl -i -X POST "https://api.box.com/2.0/files/12345/metadata/global/boxSkillsCards" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"cards": [{
"type": "skill_card",
"skill_card_type": "keyword",
"skill_card_title": {
"code": "license-plates",
"message": "Licence Plates"
},
"skill": {
"type": "service",
"id": "license-plates-service"
},
"invocation": {
"type": "skill_invocation",
"id": "license-plates-service-123"
},
"entries": [
{ "text": "DD-26-YT" },
{ "text": "DN86 BOX" }
]
},{
"type": "skill_card",
"skill_card_type": "transcript",
"skill_card_title": {
"code": "video-transcription",
"message": "Video Transcription"
},
"skill": {
"type": "service",
"id": "video-transcription-service"
},
"invocation": {
"type": "skill_invocation",
"id": "video-transcription-service-123"
},
"duration": 1000,
"entries": [
{
"text": "Hi John, have I told you about Box recently?",
"appears": [{ "start": 0 }]
},
{
"text": "No Aaron, you have not. Tell me more!",
"appears": [{ "start": 5 }]
}
]
},{
"type": "skill_card",
"skill_card_type": "timeline",
"skill_card_title": {
"code": "face-detection",
"message": "Faces"
},
"skill": {
"type": "service",
"id": "face-detection-service"
},
"invocation": {
"type": "skill_invocation",
"id": "face-detection-service-123"
},
"duration": 1000,
"entries": [
{
"text": "John",
"appears": [{ "start": 0, "end": 5 }, { "start": 10, "end": 15 }],
"image_url": "https://example.com/john.png"
},
{
"text": "Aaron",
"appears": [{ "start": 5, "end": 10 }],
"image_url": "https://example.com/aaron.png"
}
]
},{
"type": "skill_card",
"skill_card_type": "status",
"skill_card_title": {
"code": "hold",
"message": "Please hold..."
},
"skill": {
"type": "service",
"id": "face-detection-service"
},
"invocation": {
"type": "skill_invocation",
"id": "face-detection-service-123"
},
"status": {
"code": "processing",
"message": "We are processing this file right now."
}
}]
}'client.skills.create_box_skill_cards_on_file(file.id, cards_to_create)await client.skills.createBoxSkillCardsOnFile(file.id, {
cards: cardsToCreate,
} satisfies CreateBoxSkillCardsOnFileRequestBody);client.getSkills().createBoxSkillCardsOnFile(file.getId(), new CreateBoxSkillCardsOnFileRequestBody(cardsToCreate)){
"$canEdit": true,
"$id": "01234500-12f1-1234-aa12-b1d234cb567e",
"$parent": "folder_59449484661,",
"$scope": "enterprise_27335",
"$template": "properties",
"$type": "properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
"$typeVersion": 2,
"$version": 1,
"cards": [
{
"type": "skill_card",
"skill_card_type": "keyword",
"skill": {
"type": "service",
"id": "image-recognition-service"
},
"invocation": {
"type": "skill_invocation",
"id": "image-recognition-service-123"
},
"entries": [
{
"text": "keyword1"
}
],
"created_at": "2018-04-13T13:53:23-07:00",
"skill_card_title": {
"message": "Labels",
"code": "labels"
}
}
]
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}承認
The access token received from the authorization server in the OAuth 2.0 flow.
パスパラメータ
ファイルを表す一意の識別子。
ファイルIDを確認するには、ウェブアプリケーションでファイルにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/files/123の場合、file_idは123です。
ボディ
このファイルに適用するBox Skillカードのリスト。
一連のキーワードを含むスキルカード。
- キーワードスキルカード
- タイムラインスキルカード
- トランスクリプトスキルカード
- ステータススキルカード
Show child attributes
Show child attributes
レスポンス
テンプレートに適用されたデータを含む、ファイルに適用されたテンプレートのインスタンスを返します。
Boxスキルの使用に割り当てられたメタデータ。
このメタデータをユーザーが編集できるかどうか。
true
メタデータオブジェクトを識別するためのUUID。
36"01234500-12f1-1234-aa12-b1d234cb567e"
親フォルダのID。
"folder_59449484661,"
このテンプレートが適用されているスコープのID。
"enterprise_27335"
テンプレートの名前。
"properties"
このインスタンスの「タイプ」に対応する一意の識別子。これは内部システムプロパティであるため、クライアントアプリケーションでは使用しないでください。
"properties-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0"
オブジェクトテンプレートの既知の最新バージョン。これは内部システムプロパティであるため、クライアントアプリケーションでは使用しないでください。
2
メタデータオブジェクトのバージョン。0から始まり、ユーザー定義プロパティが変更されるたびに増加します。
1
このファイルに適用されているBox Skillカードのリスト。
一連のキーワードを含むスキルカード。
- キーワードスキルカード
- タイムラインスキルカード
- トランスクリプトスキルカード
- ステータススキルカード
Show child attributes
Show child attributes
このページは役に立ちましたか?
