cancel
Showing results for 
Search instead for 
Did you mean: 

Download api

tpardabe
Champ on-the-rise
Champ on-the-rise

I am currently using V1 upload URL {URL} /alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children and it returns nodeId.

However, for downloading the document I would need extra information about node such as store_type and store-id.

Can I always assume that store-type would always be workspace and the store-id to be SpacesStore? I googled about it, but without success.

Thanks in advance

4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator

I don't know what download URL you are using, but it sure can't be from the v1 ReST API. You do not need store_type or store_id for the access to the node content aka "download". Only if you were to use the legacy APIs, like the download servlet, would you need to have those extra parameters.

tpardabe
Champ on-the-rise
Champ on-the-rise

We are currently using GET /alfresco/service/api/node/content{property}/{store_type}/{store_id}/{id}?a={attach?}

For the above URL, can I assume that store-type would always be workspace and the store-id to be SpacesStore?

jpotts
World-Class Innovator
World-Class Innovator

Yes, if you are downloading content from the spaces store, which is most likely, then your assumptions are correct.

tpardabe
Champ on-the-rise
Champ on-the-rise

I am little confused about the version I am currently using. If I try to use the URL as you specified, how alfresco would know where it saved? Will it get information from the document by id such as store type and store_id, and then get the content of the file? If you know its implementation and explain it here, I would be thankful