How to get the Data ID the last folder in a given path in Content Server? - REST API
If I have a folder path in content server which is let's say :
A:B:C:D
I want to get the DataID of the folder D. How to get the last folder DataID?
I did SQL query but it's not fast enough.
On the REST API I only familiar with the ancestors of a given DataID.
Any other way I can somehow to achieve the required goal?
Thanks.
Answers
-
is C always Known? or is that an example if not you can do listnodes on C and find a match for D
A:B:C
Otherwise, I don't understand why you say SQLquery is slower. how are you arriving at that conclusion?
Behind the scenes in Oscript there is a lliapi NodePath function if you look at that oscript is also using SQL… although CS has to cache so it won't seek a node that is already in memory…
Try this Create a Simple WR and find its path using a hardcoded DataID does it fare better than your SQL query if so Wrap the WR as a REST call and run with it…
Do you have Answer Modules?
Can we see your database query? Many companies create a database function that is faster..
0 -
I'll explain what I am trying to achieve.
I want to create a custom post request which will get a CS folder path as input.
To create a node (document) you have to use create node post request and one of the parameters is parent_id which is in our case folder D. Instead of sending post with parent_id I want to send folder path.
Hope I managed to explain.
0 -
I want to create a custom post request which will get a CS folder path as input.
In the absence of anything OOB from OT on this and I am assuming you do not program in Oscript what I would do is
Printing the ID of a String like [LL_REPTAG_!dest NODEINFO:PATHTOID /] Example and actual WR code of a trial path
[/* Title: Blank Reportview */] [LL_REPTAG_'Enterprise:Asset Management:1. Admin:A-69994.dwg' NODEINFO:PATHTOID /] [LL_WEBREPORT_STARTROW /] [LL_WEBREPORT_ENDROW /]
When I executed that it was pretty fast…
Now, all you need to do is call this WR as a REST call using developer documentation. When you return the values to REST, you can choose JSON and trim a lot of chaff.It is all explained in the API call.
If your expectation was to make your code efficient by not resorting to more and more calls unfortunately that is how OT wants you to use it and if it proved too onerous I would consider writing my own restapi node path.
It is not conceivable that OT doesnt have a NodePath function.I have to look in code …
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 150 General Questions
- 148 Thrust Services
- 57 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories