Media Server 24.1

# ListImageHashes

Returns a list of image hashes that exist in a specified database.

Type: synchronous

Parameter | Description | Required
--- | --- | ---
`database` | The name of the database that contains the image hashes to list. | Yes
`identifier` | A comma-separated list of identifiers to specify the image hashes to list. If you do not set this parameter, Media Server lists all of the image hashes in the specified database. | No
`imagestatus` | A Boolean value (default false) that specifies whether to return the status of the training image associated with each hash. The status for an image is always `trained`, but you can use this parameter to see the image label and whether the image data is present in the database or has been removed. | No
`maxresults` | The maximum number of image hashes to list. | No
`metadata` | A Boolean value (default false) that specifies whether to return the metadata associated with each image hash. | No
`start` | The starting point for the list when you set the `maxresults` parameter. For example, to start listing entries from the tenth entry in the database, set `start=10`. The entries in the database are indexed from 1. | No

## Example

The following example lists up to 10 image hashes contained in the `ImageHashes` database:

    /action=ListImageHashes&database=ImageHashes
                           &imagestatus=TRUE
                           &metadata=TRUE
                           &start=1
                           &maxresults=10

## Response

The response includes the identifier for each image hash. The `numimages` element always has the value `1`, because you can add only one image to each hash. The image hash is always trained so `numtrained`, `numfailed`, and `numuntrained` always have the values `1`, `0`, and `0` respectively.

If you set the action parameter `imagestatus` to `true`, Media Server returns information about each training image. The `label` element provides the label associated with the image. The `status` element always has the value `trained`. The `hasimagedata` element indicates whether the training image is saved in the database (the image data can be removed with the action NullImageHashImageData).

If you set the action parameter `metadata` to `true`, Media Server returns any custom metadata that you have added to the image hashes.

    <autnresponse>
      <action>LISTIMAGEHASHES</action>
      <response>SUCCESS</response>
      <responsedata>
        <entry>
          <identifier>6d8e53fd92e601a4b8948e1b9397e381</identifier>
          <numimages>1</numimages>
          <numtrained>1</numtrained>
          <numfailed>0</numfailed>
          <numuntrained>0</numuntrained>
          <images>
            <image>
              <label>image1</label>
              <status>trained</status>
              <hasimagedata>true</hasimagedata>
            </image>
          </images>
          <metadata>
            <item>
              <key>importance</key>
              <value>high</value>
            </item>
            ...
          </metadata>
        </entry>
      </responsedata>
    </autnresponse>

Copyright 2023 Open Text
Version 24.1 | Last updated December 2023

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL Media Server 24.1

Topic Title: ListImageHashes