Exactly look for a pdf in a emc documentum using rest api using dql

Im trying to use dql. My objective was to search for a pdf. For example the naming conventions of pdfs are like amd-1-prot MA-NI-123-1234.pdf or prot MA-NI-123-1234.pdf. I was able to search the exact folder using the dql query \dql?=select * from dm_folder where object_name="fOLDER_NAME". I dont know how to search for exact pdf with a pattern. .

Comments

  • PedroMaiaPedroMaia Senior Consultant (OpenText)

    I struggle to understand your question, but are you just trying to find documents with name ending in '.pdf'?
    If so, this is a possible DQL:
    SELECT r_object_id, object_name FROM dm_document WHERE object_name LIKE '%.pdf'

  • 400
    E_VALIDATION_QUERY_PARAM_MISSING
    The input request misses the query parameter dql.

    Required String parameter 'dql' is not present

    I got this error when I tried like this url/?dql=SELECT r_object_id, object_name FROM dm_document WHERE object_name LIKE '%.pdf'

  • Try replacing single quote with double quotes:

    url/?dql=SELECT r_object_id, object_name FROM dm_document WHERE object_name LIKE "%.pdf"

  • If you are looking for a document whose primary format is PDF, don't query for the filename (especially not with a wildcard at the beginning which is terrible for performance). Instead use the a_content_type attribute. You are not on a file system anymore!
    select * from dm_document where a_content_type = 'pdf'

    Hicham Bahi
    Consulting Services
    OpenText

Sign In or Register to comment.