Media Analysis Solution
Media Analysis Solution

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Appendix A: Media Analysis Solution API

The Media Analysis Solution API enables you to access media metadata in a secure manner. The API acts as a “front door” to an AWS Lambda function that applications use to search and retrieve metadata extracted from media files.

The following operations are available in the Media Analysis Solution API.

GET /details/{object_id}

Description

The GET /details/{object_id} operation enables you to retrieve details about a specific media file that has been uploaded and analyzed by the Media Analysis Solution.

Request Parameter

object_id

The ID of the media file

Type: String

Required: Yes

Response

Name Description
object_id The unique ID of the media file
details A mapping containing details about the media file

GET/lookup/{object_id}/{lookup_type}?page={page}

Description

The GET/lookup/{object_id}/{lookup_type}?page={page} operation enables you to retrieve metadata that has been extracted by the media file by the solution.

Request Parameter

object_id

The ID of the media file

Type: String

Required: Yes

lookup_type

The type of metadata requested

Type: String

Required: Yes

Valid Values: labels | celebs | faces | face_matches | persons | transcript | phrases | entities

page

The page number to return

Type: Number

Required: No

Response

Name Description
S3 Amazon S3 bucket and key of the media file
<LookupType> Details for each <lookup_type> detected by the Media Analysis Solution
MediaType The format of the media file (image and video only)
Next If the response is truncated, the Media Analysis Solution returns this number that you can use in the subsequent request to retrieve the next set of <lookup_type>

Description

The GET /search?searchterm={search_term}&page={page} operation enables you to search for media files based on metadata that has been extracted by the Media Analysis Solution. Up to 30 results are returned at a time.

Request Parameter

search_term

Term to search for

Type: String

Required: Yes

page

Page number to request

Type: Number

Required: Yes

Minimum Value: 1

Response

Name Description
name The name of the media file
file_type The format of the media file
media_id The unique ID of the media file
thumbnail The location of the media file in Amazon S3
upload_time The date and time that the media file was uploaded to the solution

GET /status/{object_id}/

Description

The GET /status/{object_id} operation enables you to retrieve the status of the state machine analyzing the media file.

Request Parameter

object_id

The ID of the media file

Type: String

Required: Yes

Response

Name Description
state_machine_status The status of the state machine analyzing the media file
analysis The status of each indidvidual analysis being performed by the state machine