Author Topic: REST & ODWEK  (Read 4941 times)

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2231
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
REST & ODWEK
« on: October 22, 2015, 09:35:44 AM »
Has anyone built a solution using REST with ODWEK?  I'm curious to hear from anyone who has some experience doing this.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: REST & ODWEK
« Reply #1 on: October 22, 2015, 11:11:51 PM »
Not yet :-) in my To Do list.

But I know my colleagues at IBM US Services team have done a REST interface to ODWEK.
But more than that I don't know.
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2231
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: REST & ODWEK
« Reply #2 on: October 23, 2015, 02:36:56 AM »
Yeah, my understanding is that RESTful apps are supposed to be 'stateless', which doesn't lend itself to working with ODWEK, which has states like 'logged in' and such.  I'm not sure how authentication would be handled at all -- and without authentication, you can't do things like queries or retrievals.

Maybe the key is to build an intermediate layer that has a persistent connection to ODWEK, and implements a RESTful interface to the upstream system.

This is all a little outside the realm of what I do on a daily basis -- so any discussion would be enlightening.  :)

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: REST & ODWEK
« Reply #3 on: October 27, 2015, 02:11:50 AM »
What I was thinking was to have a login at first before going the REST service.

Then the session information will be kept somewhere (cookie/...) and then when the user wants to do some actions, then either a login will happen (each time...) (take a long time)
or there is a connection pool created with generic technical user
or there is there is several connection pool per "user group"

When the login is done, and the user is associated with a connection, then you can do something "stateless".

At least it is in this direction I'm thinking to go...
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

RizwanK

  • Guest
Re: REST & ODWEK
« Reply #4 on: November 16, 2015, 08:16:21 AM »
REST doesn't led to "session-ing" and this is very true for other apps as well that to RESTful interactions, not just ODWEK. I have done implementations where, as Alessandro mentioned, you retain the UUID in a cookie and supply that as part of each request.

Another approach that could work with REST is to restrict the access to the endpoints via a List of IP addresses that this service can respond to i.e. internal network subnet address or a range of IP addresses. When a request comes in, the service can verify against the internal list (stored in DB somewhere to allow for changes without code deployment). If the IP address exists allow the request otherwise return a HTTP-403 (forbidden).

Good discussion though and definitely has me tempted to do a prototype against our implementation.

TTP4RFGrL3Ki

  • Guest
Re: REST & ODWEK
« Reply #5 on: January 08, 2016, 07:23:23 AM »
I've created a REST client for ODWEK. Of course, first a login has to be done.
The REST URL contains the user name because folder visibility depends on user access rights.

If you have any specific questions, please let me know.

Andreas

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: REST & ODWEK
« Reply #6 on: January 08, 2016, 08:57:38 AM »
One question, why do you need the username in the URL? Should that part be in the current session?
And once you are logged in, then, you cannot change your permissions... so I don't see the need to have this info in the URL.

or am I missing something?
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

TTP4RFGrL3Ki

  • Guest
Re: REST & ODWEK
« Reply #7 on: January 11, 2016, 04:40:04 AM »
You're right, it's not really necessary to have the user name in the URL.
The reason was simply to get always the same results (e. g. list of folders) with the same URLs.
However, this decision is just a matter of taste and doesn't make a real difference. (and could easily be changed since the REST API is not yet delivered to customers)

Btw.: I created the REST API with Jersey and have an interface that allows to select if ODWEK should be accessed directly or via REST. The small ODWEK proxy running on Tomcat allows to develop on platforms not supporting ODWEK like OS X without having to debug remotely.

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: REST & ODWEK
« Reply #8 on: January 12, 2016, 03:15:35 AM »
Ahhhhhhhhhh I see your point :-) Thank you for the explanation!

That means also that a URL is valid only for a user, and cannot be "shared". I am more thinking about documents that are available without special permissions/restrictions.
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML