POST /v1/vcaHost: <MgrDomain>Authorization:<MgrToken>
curl –X POST –d "source=aHR0cDovL3d3dy5iYWlkdS5jb20=&bucket=bucketName"–H "Authorization: 86622e227a50d454542e4ac543a7:Y2JmMGY0YTNsdfQxZmBMHGM2ZTA0=="http://mrgdomain/v1/vca
| 参数 | 必填 | 描述 | 
|---|---|---|
| bucket | 是 | 空间名 | 
| source | 是 | 视频资源的完整URL,单次只支持一个URL,需经过URL安全的Base64编码 | 
| notifyUrl | 否 | 通知地址,需要urlBase64编码。注:接收到鉴定通知后,需要给云存储返回200状态码表 | 
| 参数 | 类型 | 说明 | 
|---|---|---|
| jobId | string | 任务id,请妥善保存,用于后续任务结果查询 | 
范例 
        请求成功
{ "jobId": < jobId> }
请求失败
{"code": "<code string>","message": "<ErrMsg string>"}
get /v1/vca/search?jobId=<xxxx>Host: <MgrDomain>
curl –v http://mrgdomain/v1/vca/search?jobId=xxx
| 参数 | 必填 | 描述 | 
|---|---|---|
| jobId | 是 | 任务ID | 
| 参数 | 类型 | 说明 | 
|---|---|---|
| jobId | string | 任务id | 
| code | int | 1分析中,2-分析失败,3分析成功 | 
| desc | string | code为分析失败时,返回分析失败的信息。否则返回"" | 
| notifyResult | string | 配置了notifyUrl时,客户通知情况。 0-未通知 1-通知中 2-通知失败 3-通知成功。 是否通知成功以客户通知服务器是否返回200状态码为准。未配置notifyUrl时,值返回0  | 
        
| results | array | 分析结果,code=3时返回 | 
| -type | string | 场景, 目前包括 scenario、entity、keyword、figure、logo 等 | 
| -result | array | 场景下标签结果 | 
| --attribute | string | 标签名称 | 
| --confidence | double 标签对应的置信度 | 
type类型说明
| type | 说明 | 
|---|---|
| scenario | 可识别场景标签 | 
| entity | 可识别实体标签 | 
| keyword | 可识别文字、语音关键字 | 
| location | 位置信息 | 
| figure | 可识别人物 | 
| logo | 可识别商标 | 
请求失败
{"code": "<code string>","message": "<ErrMsg string>"}
请求成功--分析中,http.code=200
{"jobId": "<jobId>","code": 1,"desc": "","notifyResult": 0,"results": [],}
请求成功--分析成功,http.code=200
{"jobId": "<jobId>","code": 3,"desc": ""," notifyResult": 2, // 通知成功,客户通知服务器返回200"results": [{"type": "scenario","result": [{"attribute": "会议室","confidence": 45.67,}],},{"type": "entity","result": [{"attribute": "马克杯","confidence": 78.65,}],},{"type": "figure","result": [{"attribute": "张三","confidence": 72.11,}]},{"type": "location","result": [{"attribute": "厦门","confidence": 88.88,}]},{"type": "keyword","result": [{"attribute": "上海","confidence": 94.25,}]},{"type": "logo","result": [{"attribute": "网宿","confidence": 94.25,}]}],}
请求成功--分析失败,http.code=200
{"jobId": "<jobId>","code": 2,"desc": "Video Analysis Failed. Internal Error"," notifyResult": 3, // 通知失败,客户通知服务器返回非200状态码" results": [],}
jobId不存在,http.code=401
{"code": "401","message": " JobId Not Found ",}
--分析成功通知举例
{"jobId": "<jobId>","code": 3,"desc": """results": [{"type": "scenario","result": [{"attribute": "会议室","confidence": 45.67,}],},{"type": "entity","result": [{"attribute": "马克杯","confidence": 78.65,}],}{"type": "figure", //type=figure时返回"result": [{"attribute": "张三","confidence": 72.11,}]},{"type": "keyword", //type=keyword时返回"result": [{"attribute": "上海","confidence": 94.25,}]}],}
| 错误码 | message | 说明 | 
|---|---|---|
| 404 | Bucket Not Found | 发送标签分析请求时,空间不存在 | 
| 401 | Smart Media Service Not Enabled | 未开通智能多媒体服务 | 
| 401 | Type Invalid,Type Is Not Supported | xxx type是不支持的类型。多个type时,只要有一个type不支持就返回该错误 | 
| 401 | Bucket Is Null | 必填项bucket没有传 | 
| 401 | Source Is Null | 必填项source没有传 | 
| 401 | Source Invalid | source没有做URL安全的Base64编码 | 
| 401 | NotifyUrl Invalid | 传了notifyUrl但是没有做URL安全的Base64编码 | 
| 404 | JobId Not Found | 查询分析结果时的jobId不存在 |