Available in VPC
Get the asset search result. After calling the Request asset search, you can use the issued searchId to view the results.
totalCountandresultsare returned only ifstatusis in the"COMPLETED"status.- It is sorted by query score, followed by index creation.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| GET | /api/v1/workspaces/{workspace_name}/assets/search/{search_id} |
Request headers
For information about the headers common to all Media Intelligence APIs, see Media Intelligence request headers.
Request path parameters
You can use the following path parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
workspace_name |
String | Required | Workspace name |
search_id |
String | Required | Search identifier issued when requesting asset search
|
Request query parameters
You can use the following query parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
pageSize |
Integer | Optional | Number of results per page
|
pageNum |
Integer | Optional | Page number to query
|
Request example
The request example is as follows:
curl --location --request GET 'https://mi.apigw.ntruss.com/api/v1/workspaces/betatest/scene-search/JtWJKTDCKknMHP8Id4Gt?pageSize=50&pageNum=1' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'
Response
This section describes the response format.
Response body
The response body includes the following data:
| Field | Type | Required | Description |
|---|---|---|---|
code |
String | - | API processing result code |
message |
String | - | API processing result message |
result |
Object | - | Asset search result information |
result.searchId |
String | - | Search identifier issued when requesting asset search |
result.status |
String | - | Search status code
|
result.totalCount |
Integer | - | Total number of assets searched
|
result.totalPage |
Integer | - | Total page count
|
result.pageNo |
Integer | - | Current page number
|
result.pageSize |
Integer | - | Number of results per page
|
result.content |
Array | - | Scene/image-level search result list: content
|
content
The following describes content.
| Field | Type | Required | Description |
|---|---|---|---|
jobId |
Integer | - | Search target index (job) ID |
engine |
String | - | Index engine version |
type |
String | - | Asset type
|
assetId |
Integer | - | Search target media asset ID |
assetName |
String | - | Asset name |
scene |
Integer | - | Asset ID searched in the video
|
score |
Number | - | Asset similarity score |
startMs |
Number | - | Video asset start time (millisecond)
|
endMs |
Number | - | Video asset end time (millisecond)
|
assetUrl |
String | - | Media URL
|
sceneThumbnailUrl |
String | - | (During video analysis) Scene thumbnail image URL
|
shots |
Array | - | List of shot information included in the asset: shots |
shots
The following describes shots.
| Field | Type | Required | Description |
|---|---|---|---|
shot |
Integer | - | Shot ID
|
startMs |
Number | - | Shot start time (millisecond)
|
endMs |
Number | - | Shot end time (millisecond)
|
score |
Number | - | Shot similarity score |
persons |
Array | - | List of people in the shot: persons |
scripts |
Array | - | List of dialogues included in the shot: scripts |
queryRef |
Array | - | List of matching information with user query: queryRef |
persons
The following describes persons.
| Field | Type | Required | Description |
|---|---|---|---|
personId |
Integer | - | Person ID |
name |
String | - | Person name |
profileUrl |
String | - | Person thumbnail image URL
|
scripts
The following describes scripts.
| Field | Type | Required | Description |
|---|---|---|---|
startMs |
Number | - | Dialogue start time (millisecond) |
endMs |
Number | - | Dialogue end time (millisecond) |
text |
String | - | Dialogue text |
name |
String | - | Speaker name
|
personId |
Integer | - | Speaker person ID
|
queryRef
The following describes queryRef.
| Field | Type | Required | Description |
|---|---|---|---|
queryType |
String | - | Query type
|
conditionType |
String | - | Query condition
|
matchedValues |
Array[String] | - | Matching values of the entered query with the corresponding shot |
Response example
The response example is as follows:
{
"code": "0",
"message": "success",
"result": {
"search_id": "JtWJKTDCKknMHP8Id4Gt",
"status": "COMPLETED",
"totalCount": 1,
"totalPage": 1,
"pageNo": 1,
"pageSize": 50,
"content": [
{
"jobId": 12345,
"engine": "v2.1.0",
"type":"VIDEO",
"assetId": 67890,
"assetName": "Urban chase",
"scene": 7,
"score": 98.3,
"startMs": 120000,
"endMs": 135000,
"assetUrl": "https://kr.object.ncloudstorage.com/.../12345/video.mp4?X-Amz-...",
"sceneThumbnailUrl": "https://kr.object.ncloudstorage.com/.../12345/7.jpg?X-Amz-...",
"shots": [
{
"shot": 70,
"startMs": 121000,
"endMs": 123000,
"score": 98.3,
"persons": [
{
"personId": 1001,
"name": "Jae-suk Yoo",
"profileUrl": "https://kr.object.ncloudstorage.com/.../jiho0.jpg?X-Amz-..."
}
],
"scripts": [
{
"startMs": 121500,
"endMs": 122000,
"text": "This way, come on!",
"name": "Speaker 1",
"personId": null
}
],
"queryRef": [
{
"queryType": "TEXT",
"conditionType": "MUST",
"matchedValues": ["Dark alley"]
}
]
},
{
"shot": 71,
"startMs": 123000,
"endMs": 125000,
"score": 95.8,
"persons": [
{
"personId": 1001,
"name": "Jae-suk Yoo",
"profileUrl": "https://kr.object.ncloudstorage.com/.../jiho0.jpg?X-Amz-..."
}
],
"scripts": [
{
"startMs": 124000,
"endMs": 124500,
"text": "Danger, hide!",
"name": "Speaker 2",
"personId": 1001
}
],
"queryRef": [
{
"queryType": "DIALOGUE",
"conditionType": "ANY",
"matchedValues": ["Danger"]
}
]
}
]
}
]
}
}