cancel
Showing results for 
Search instead for 
Did you mean: 

REST Repository API

makz
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to access the Alfresco repository via the REST API. Currently I have the problem that I need the ID of a folder/space to get its children or other information about this folder/space:

GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/children?types={types}&filter={filter?}&skipCount={skipCount?}&maxItems={maxItems?}

Where do I get the ID of a folder? I'm missing a function that returns all spaces of "workspace/SpacesStore" or something like this.
How can I build a list of all spaces if I don't know all the IDs????

Best Regards
Markus
3 REPLIES 3

zaizi
Champ in-the-making
Champ in-the-making
Hi,

This particular REST API returns the children of a given node (e.g. space). You can use GET alfresco/service/sample/folder/Company Home to list spaces with Company Home. You can modify that webscript to return the nodeRefs (nodeRef = store_type://store_id/id) for all the children.

Ainga

makz
Champ in-the-making
Champ in-the-making
Hi,

Thanks for the answer!

1) the return value of this call is HTML … that's not a problem but somewhat ungly Smiley Happy
2) is this call documented somewhere in the wiki?

thanks,
Markus

zaizi
Champ in-the-making
Champ in-the-making
These API are built using Web Scripts. You can configure multiple return formats. Read up on web scripts: http://wiki.alfresco.com/wiki/Web_Scripts.

You can see all the out of the box ones at http://localhost:8080/alfresco/service/index.

Ainga