curl -i -X PUT "https://api.box.com/2.0/skill_invocations/33243242" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"status": "success",
"metadata": {
"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."
}
}],
},
"file": {
"id": "12345"
},
"usage": {
"unit": "file",
"value": 1
}
}'{
"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メタデータカードを上書きおよび更新するために使用できる代替方法。
curl -i -X PUT "https://api.box.com/2.0/skill_invocations/33243242" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"status": "success",
"metadata": {
"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."
}
}],
},
"file": {
"id": "12345"
},
"usage": {
"unit": "file",
"value": 1
}
}'{
"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"
}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.
The access token received from the authorization server in the OAuth 2.0 flow.
このメタデータを適用するスキルのID。
この呼び出しのステータスを定義します。スキルカードを設定する際は、successに設定します。
invoked, processing, success, transient_failure, permanent_failure "success"
このスキルに設定するメタデータ。Box Skillsカードのリストです。ファイルの既存のBox Skillsカードはすべてこれらのカードで上書きされます。
Show child attributes
カードを割り当てるファイル。
Show child attributes
カードを割り当てるファイルバージョン (省略可)。
Show child attributes
この呼び出しの影響を受ける項目を定義する記述子。
カードをsuccess状態に設定する場合はこれをデフォルト値に設定し、それ以外のほとんどの場合には省略してください。
Show child attributes
ファイルが正常に更新された場合は、空のレスポンスを返します。
このページは役に立ちましたか?