cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get the RootFolderID?

wouter
Champ in-the-making
Champ in-the-making
Hi,

I am developing an iPhone app that should connect to an alfresco repository.
What I have accomplished today is that I have been able to do the following using the REST interface:
- Login
- Get repository Info

I request the repository Info using the following call:
  /service/api/repository
or
  /service/api/cmis

Both calls give me the same response …
The response is valid xml that contains all sorts of info about the repository.

The line that I am interested in is the following:

<cmis:rootFolderId>http://sub.mydomain.net:10265/alfresco/service/api/path/workspace/SpacesStore/Company%20Home</cmis:rootFolderId>

Is this the rootFolderId that I need to call for instance the 'descendants' Service??

If I do that … I get an error (Not Found).
If I trim the first bit off (and keep all after 'alfresco') I get a NotFound error.

I think it is kinda strange that I get a URL as the rootFolderId … while 'all' other folder-id's are generated id's like 9f6000a8-9484-11dc-90b9-7fa4aa914986

If I login on the website and view the source of the pages, I do find some id's in the html … When I use these folder id's for the descendants call, I do get a very nice response!

How do I proceed from here?

Regards,
Wouter
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
I know this is an old thread, but what version of Alfresco were you running when you saw this? The root folder ID should look like:
<cmis:rootFolderId>workspace://SpacesStore/98f66c7a-b300-48b9-b35f-8695b8ca22b8</cmis:rootFolderId>

In Alfresco 4, asking the root folder for its descendants would look like:
http://localhost:8080/alfresco/cmisatom/558e5b3c-71a0-42ac-b420-eda16e93e95b/descendants?id=workspac...

The two key ingredients are the repository ID (558e5b3c…) and the ID of the folder being queried, which in this case is the root folder ID.

Jeff