POST /ws/rest/service/v1/dm/search
Purpose
Provide a web service to search a document/folder properties.
Input
Form Data (content Type: application/x-www-form-urlencoded)
- projectnumber (String) Optional. Project number for shell/project level DM. Empty for Company level DM.
- parentpath (String) Required. Path to a folder in DM
- match (String) : Search condition to apply for search terms. Default is AND. Possible values AND / OR
- nodetype (String) Optional. Specify if you want to search in "folders" or "files". Default is to search in both folders and documents. Values can be "Folder" or "Document".
- query (JSON String) Required if simplequery is not specified : array of search terms. Each of the search term will be joined with AND condition.
- name: uDesinger element name to be searched. (Required)
- comparator: Operation to be performed on the value (Optional)
- value: Search value (Required)
- value2: Search value for the range comparator (Optional)
Example:
"query":[{ "name":"uuu_file_title", "label":"Title","value":"first document title", "comparator":"like" }, { "name":"uuu_file_issue_date", "label":"Issue Date", "value":"2017-12-07T07:54", "value2":"2017-20-07T07:54", "comparator":"range" } ]
The above request will search for documents with title like "first document title" and issue date between 2017-12-07T07:54 and 2017-20-07T07:54.
Name | Label |
---|---|
uuu_dm_node_name | Name |
uuu_dm_create_by | Owner |
uuu_file_title | Title |
Comparator:
- like : For sting data types. Will perform a like query, %value% (Default)
- eq : For string and numeric data type. Will perform extact match.
- lt : Numeric , Date values. Will perform less than value.
- gt : Numeric , Date values. Will perform greater than value.
- le : Numeric , Date values. Will perform less than or equal value.
- ge : Numeric , Date values. Will perform greater than or equal value.
- ne : Numeric , Date values. Will perform not equal value.
- range : Numeric , Date values. Will perform range search between value and value2
Example:
"projectnumber":"0002"
"parentpath":"/Meeting%20Minutes"
"query":[ { "name":"uuu_dm_node_name", "label":"Name","value":"meetingnotes.txt", "comparator":"like" } ,[ { "name":"", "label":"Pub No.", "value":"2", "comparator":"gt" }]
"match":"OR"
Output
Output will be same as /dm/node/properties REST call.
Json object containing 'status', 'data', 'message'
"data" will be array of document or folder properties matching the search term specified in the request.
Example:
{
"data":
[
{
"Owner":"Company Administrator",
"projectnumber":null,
"node_path":"/Company Documents",
"Description":"",
"type":"Folder",
"foreignKeyId":-1000,
"parentUuid":null,
"Name":"Company Documents",
"parent_node_id":285,
"foreignEntityType":"company",
"% Complete":"0",
"Location":"/",
"node_id":700,
"upload_date":"2017-12-07T07:54"
},
{
"Revision No.":"",
"Owner":"Company Administrator",
"projectnumber":null,
"node_path":"/Folder City/Fremont/AutoVue_Applet-Free_Client_TUD.pdf",
"Description":"",
"Pub No.":"1",
"file_name":"AutoVue_Applet-Free_Client_TUD.pdf",
"annotate":true,
"type":"Document",
"title":"",
"foreignKeyId":-1000,
"parentUuid":294,
"file_size":"448519",
"uuu_create_by":"Company Administrator",
"file_id":58,
"Issue Date":"",
"foreignEntityType":"company",
"% Complete":"0",
"Location":"/Folder City/Fremont",
"node_id":306,
"upload_date":"2017-11-03T14:02"
},
],
"message":
[
],
"status":200
}