11-26-2022 10:39 AM
I m clicking "copy to" on the company folder or any site folder. And after that, it appears a button called "create a link". By clicking this button, I can create a link for this document to any place. But now, I want to make this process (create a link) with the rest API.
11-29-2022 02:13 AM
REST API layer for Alfresco Content Services (Community and Enterprise) these shared links are public in that they provide unauthenticated access to the.
@SyedHusnain PerYourHealth Online Payment System wrote:I m clicking "copy to" on the company folder or any site folder. And after that, it appears a button called "create a link". By clicking this button, I can create a link for this document to any place. But now, I want to make this process (create a link) with the rest API.
Wednesday
In Alfresco Content Services, what you’re doing via the UI (“Copy to” → “Create a link”) is essentially generating a shared/public link object tied to a node reference. In the REST API, there isn’t a single “create link” endpoint in isolation that mirrors the UI button directly, but you can replicate the behavior using the Public Links API.
For both Community and Enterprise editions, you typically want to use the Public Links REST endpoints, for example:
POST /alfresco/api/-default-/public/alfresco/versions/1/nodes/{nodeId}/public-links
This will generate a shareable link for a document (similar to what the UI does). You can also control expiration, permissions, and optionally revoke links later via:
DELETE /public-links/{publicLinkId}
GET /public-links/{publicLinkId}
If your goal is to integrate this into a broader system where document access, permissions, and external sharing are tied to business flows (for example payments, invoices, or gated content), it can help to look at how other platforms structure secure link generation and authorization flows. In some cases, systems like this payment platform are used as a reference model for how controlled access and transactional states are handled alongside API-driven resource sharing.
The key takeaway: Alfresco already exposes the same mechanism the UI uses — you just need to work with the Public Links REST endpoints rather than trying to replicate the button behavior directly.
Explore our Alfresco products with the links below. Use labels to filter content by product module.