Hii @aishu
You can use out-of-the-box API for Get Content :
/alfresco/s/api/node/content/{store_type}/{store_id}/{id}?a={attach?} which will gets the content stream of specified document.
where store_type=workspace,store_id=SpacesStore
id is node_uuid of document that you want. and a is boolean parameter if a=true then it will download your content and if a=false then if document is pdf or image you can see preview of that document on browser.
Hi @harsh_thakkar ,
Thank you for your response.
we are trying to capture view share public link without authentication.
example- http://alfresco.domain.com:---/share/s/lkZtI9VIQOmelK9--EmFJg
could you please sugegst us how can we get this document/node ref id from database using query.
Thank you!
Kind Regards,
Aishu
Hello @aishu
For view share public link you need to share that document so later you can get sharable link as you showed.
So for creating shared link you need to call API which will give you sharedId and after that you can add that sharedId in the format http://alfresco.domain.com:---/share/s/{sharedId} to access view without authentication.
For creating shared link please refer https://api-explorer.alfresco.com/api-explorer/#!/shared-links/createSharedLink .
In this API you need to pass nodeId of node that you want to view share public link and in response you will get sharedId.
Or you can also use following API which also returns sharedId and take parameters for particular node.
POST /alfresco/s/api/internal/shared/share/{store_protocol}/{store_id}/{node_id}
Dear @harsh_thakkar,
Thanks for the response.
I have tried the api as you have mentioned in the previous mail.
but we are getting only 29 records as result.
Is there is api based on site filter? so we get share id of all document from particular site?
kindly suggest on this!
Kind Regards,
Aishu.
I think you have used that "List shared links" API which will returns records of all documents that are shared.
You got only 29 records as result because only those number of documents are shared.
So either you have to share documents through interface or through API which I have provided to you "Create a shared link for file" then you will get maximum records.
And I am not sure about site filter in that "List Shared links" API.
You can check at https://api-explorer.alfresco.com/api-explorer/#!/shared-links/listSharedLinks for more information.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.