Alfresco REST API for Document Upload
I want to use Afresco REST API to download a document. After some research, I found out about this REST API:
/alfresco/s/api/node/content{property}/{store_type}/{store_id}/{id}
But I'm not sure how to pass the parameters.
If the document information URL is in Share:
http://127.0.0.1:8080/share/page/context/mine/document-details?nodeRef=workspace://SpacesStore/7f77488a-60a0-48c3-9369-77183ccad0d2
You need to pass in the {property}
, {store_type}
, {store_id}
and {id}
?
source to share
For this NodeRef
workspace://SpacesStore/7f77488a-60a0-48c3-9369-77183ccad0d2
values ββfor the parameter will be:
{property}: content
{store_type}: Workspace
{store_id}: spaceStore
{id}: 7f77488a-60a0-48c3-9369-77183ccad0d2
The details associated with each parameter have already been set by Krutik.
And you have to use this URL to download.
/alfresco/d/<d|a>/<workspace>/<store>/<nodeId>/<filename>
where d=direct
and a=attached
.
The attach
or element is direct
used to indicate whether to display the stream directly in the browser or download it as a file attachment.
source to share
Information about each web script interface (REST API) can be found on the open air page.
http://localhost:8080/alfresco/service/index
For your API, this is listed below.
http://localhost:8080/alfresco/service/script/org/alfresco/cmis/content.get
The parameter description is given below.
Property : Name of property which you want to retrieve.
store_type : Workspace Protocol
store_id : Store Id of node
id : Id of node.
source to share