07-23-2020 03:46 AM
Dear Team,
I need a api for display an document from site.
i have reffered the below api -
http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/{id}/renditions/{renditionId}/content
but i am not understood how to get renditionid of document.
Kinldy suggest!
Thank you.
Kind regards,
Aishu.
07-24-2020 09:43 AM
Dear @adelaidenx
If i remove status from url then also same output is displayed.
07-27-2020 03:04 AM
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.
08-04-2020 04:15 AM
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
08-05-2020 07:55 AM
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}
08-06-2020 04:28 AM
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.
08-07-2020 01:31 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.