Querying a Single Job
Function
Query and display the details of a single job.
URI
- URI format:
GET /v2/{project_id}/services/video-moderation/tasks/{task_id} - Parameters
Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.
task_id
Yes
String
Job ID
Request Parameters
GET /v2/6204a5bd270343b5885144cf9c8c158d/services/video-moderation/tasks/f18320e61e4c4dc685aa2dfc22a28dc5
Response Parameters
- Example response
{ "description": "description", "service_version": "1.2", "output": { "obs": { "bucket": "obs-iva", "path": "output/" }, "hosting": { "obs": [ { "bucket": "obs-iva", "path": "hosting/f18320e61e4c4dc685aa2dfc22a28dc5/result.json" } ], "result_json_overdue_at": "2019-03-01T10:32:32Z" } }, "input": { "type": "obs", "data": [ { "bucket": "obs-iva", "path": "input/demo.mp4", "index": 0 } ] }, "created_at": "2019-03-01T10:32:12Z", "service_config": { "common": { "frame_interval": 1, "categories": "ad", "text_categories": "ad", "upload": "false", "use_ocr": "true", "use_sis": "true" } }, "name": "video-moderation-2", "id": "f18320e61e4c4dc685aa2dfc22a28dc5", "state": "SUCCEEDED", "hosting_result": { "overdueDate": "2019-03-28T10:32:32Z", "data": "{\"result\": {\"frames\": [{\"detail\": {\"ad\": [{\"confidence\": 0,\"label\": \"ad\"},{\"confidence\": 1,\"label\": \"normal\"}],\"ocr_ad\": [{\"text\": \"Chinese text\"}]},\"frame_begin\": 92.0,\"frame_end\": 93.0,\"frame_img_path\": \"taskrd16xsvl/92_ad.jpg\",\"frame_suggestion\": \"block\",\"suspect_categories\": [\"ocr_ad\"]}],\"suggestion\": \"block\",\"voices\": [{\"content\": \"replace the words here to the Chinese text you need\",\"detail\": {\"ad\": [\"Chinese text\"]},\"voice_begin\": 92.24,\"voice_end\": 117.62,\"voice_suggestion\": \"block\"}]},\"video_path\": \"input/demo.mp4\"}", "fileSize": "329 bytes", "status": "AVAILABLE" }, "updated_at": "2019-03-02T10:32:34Z" } - Response parameters
Parameter
Type
Description
taskDetail
Object
Job details. For details, see task.detail.
Result Descriptions
The video content moderation results are saved in JSON format in the output path you specified.
- Example result file
{ "video_path": "demo.mp4", "result": { "frames": [ { "detail": { "ad": [ { "confidence": 0, "label": "ad" }, { "confidence": 1, "label": "normal" } ], "ocr_ad": [ { "text": "Text" } ] }, "frame_begin": 92.0, "frame_end": 93.0, "frame_img_path": "taskrd16xsvl/92_ad.jpg", "frame_suggestion": "block", "suspect_categories": [ "ocr_ad" ] } ], "voices": [ { "content": "Query result", "detail": { "ad": [ "Text" ] }, "voice_begin": 92.24, "voice_end": 117.62, "voice_suggestion": "block" } ], "suggestion": "block" } }
- Fields in the result file
Parameter
Description
video_path
Path of the video
result
Video processing result
- result field description
Parameter
Description
suggestion
Video processing suggestions
- review: Manual review is recommended.
- block: It is recommended that the video segment be blocked.
- pass: The video is approved.
voices
JSON arrays, indicating the detected problem details of the audio segments. For details about the parameter definition, see the Problematic audio segment field description.
When there is no problem audio frame, this array is empty.
frames
JSON arrays, indicating the detected problem details of the video frame. For details about the parameter definition, see the Problematic video frame field description.
When there is no problem video frame, this array is empty.
- Problematic audio segment field description
Parameter
Description
voice_begin
Time when the audio segment begins
voice_end
Time when the audio segment ends
content
Text content of the audio segment
detail
The value indicates the check result of the audio segment. The keyword politics specifies the political related elements and porn specifies the pornographic content in the audio segment. For details about the fields, see Text Moderation in the Content Moderation API Reference.
voice_suggestion
Processing suggestions for the audio segment
- review: Manual review is recommended.
- block: It is recommended that the audio segment be blocked.
- Problematic video frame field description
Parameter
Description
frame_begin
Start frame of the video segment
Unit: second
frame_end
End frame of the video segment
Unit: second
suspect_categories
Suspicious scenario in this frame. The content prefixed with ocr is the check result after the image is converted to text.
frame_img_path
When frame_suggestion of the frame is set to review or block, and the upload parameter is set to true during video task creation, the current frame is saved as an image to OBS. The parameter indicates the OBS storage path of the image.
detail
Check result details of the frame. politics specifies the political elements detected, terrorism specifies the terrorism or violence related content detected, and porn specifies the pornographic related contents detected. For details about the fields, see the image moderation and the preceding Text Moderation in Content Moderation API Reference.
frame_suggestion
Frame processing suggestions
- review: Manual review is recommended.
- block: It is recommended that the audio segment be blocked.
Status Codes
- Normal
- Abnormal
Status Code
Description
400 Bad Request
Request error. For details about the returned error code, see Error Codes.
401 Unauthorized
Authentication failed.
403 Forbidden
No operation permission.
404 Not Found
The requested resource was not found.
500 Internal Server Error
Internal service error.
503 Service Unavailable
Service unavailable.
Last Article: Querying the Job List
Next Article: Deleting a Job
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.