AnsweredAssumed Answered

REST APIs and documentation

Question asked by b_victor on Mar 4, 2014
Latest reply on Mar 4, 2014 by jpotts
Hello,
I'm integrating with a standalone Alfresco 4.2 from an external client app written in Java.  I've had great luck with the CMIS API using OpenCMIS with extensions.  I'm having more difficulty figuring out if I'm doing things right for some of my needs, though.

Specifically, my app needs to two more things, and I'm not really sure where to begin:
1) Get user and group info, to include membership in certain groups.
2) Kick off advanced workflows (that I've written), and get the status of these workflows via an API


For item (1), I'm able to do these things, but am not sure if I'm doing them right.  I'm using the Google HTTP API, and parsing JSON into objects using a tutorial I found by Jeff Potts - good stuff, thanks.  But, I think I'm mixing APIs/URLs, and am basically just fumbling around because I haven't found Alfresco documentation on which URLs I should be using.  For example, I can get user info from both of these URLs:

a) http://<hostname:port>/alfresco/service/api/people/<user>
b) http://<hostname:port>/alfresco/api/-default-/public/alfresco/versions/1/people/<user>
aside) http://<hostname:port>alfresco/api/people <— I can't authenticate to this one… are these the old ones?

But the JSON objects returned are different formats.  Which should I be using?  What is the difference between these urls, so I have my terminology correct?  It also seems like those urls in the form of (b) are less powerful, in that I haven't figured out how to do things like get members of a group using the 'api' urls.

For item (2), I'm not really sure where to begin.  I need to, for example, kick off a workflow passing in some parameters from my application into the workflow (i.e. email addresses for users outside of Alfresco, etc.) Can these things be done through a REST API?  Is there some documentation that shows how to tackle a task like this?

I'm sure I'm missing something here, I'm pretty new to Alfresco dev, so I appreciate any nudges in the right direction.
Thanks much,
BV

Outcomes