About this resource

Representation of a public link

Properties

Property Description Type
additionalFileId Gets the id of the related additional file, if applicable. guid
canDelete Gets whether the public link can be deleted or not. boolean
createdOn Gets the creation datetime in UTC time. datetime
fileSize Gets the file size of the related additional file, if applicable. int64
fileVersionId Gets the id of the related file version. guid
id Gets the id of public link. guid
modifiedOn Gets the last modification datetime in UTC time. datetime
origin Get the origin of public link, i.e. Order or API. string (values: order, api)
provider Gets the CDN provider of the public link. string
recordId Gets the id of the related record. guid
renditionName Gets the name for rendition. Valid if this is created from API. string
status Gets the publish status. string (values: pending, published, failed, overwritten, tobedeleted)
uri Get the uri for published file. string

Relations

Method Name Select-key Resource type Description
GET self Provides a link to this resource.
GET modifiedby select-PublicLink: modifiedby User Gets or sets the user that last modified this resource.
GET createdby select-PublicLink: createdby User Gets or sets the user that created this resource.

Actions

Method Action Description Response codes
POST /publiclinks create Creates public link
PUT /publiclink/{publicLinkId} edit Edits existing public link
DELETE /publiclink/{publicLinkId} delete Deletes an existing public link
204 Request completed successfully
404 Content type not found

Examples

Creating a public link for latest version of master file
POST /publiclinks
{
	"renditionName": "renditionName",
	"URI": "http://you_uri.jpg",
	"provider": "providerName",
	"recordId": "227a694b1de8497da374af740082ddab",
	"fileSize": 1234
}
Creating a public link for specific version
POST /publiclinks
{
	"renditionName": "renditionName",
	"URI": "http://you_uri.jpg",
	"provider": "providerName",
	"recordId": "227a694b1de8497da374af740082ddab",
	"fileVersionId": "54efc7a0482a476a89c69d6f6dec4fac",
	"fileSize": 1234
}
Editing a public link
PUT /publiclink/fe93e661d86342eb9a1722f5ff4f6ee0
{
	"renditionName": "renditionName",
	"URI": "http://you_uri.jpg",
	"provider": "providerName",
	"fileSize": 5678
}
Reading a public link
GET /publiclink/59f9fb3858344bb8b6ded0da35ec9437 HTTP/1.1

If the public link was not found, the API call will fail with a 404 Not found HTTP status code.
{
"_links": {
"modifiedby": {
"href": "/user/98c01138110445281215afb8cd61d3bc",
"select-key": "modifiedby"
},
"createdby": {
"href": "/user/98c01138110445281215afb8cd61d3bc",
"select-key": "createdby"
},
"self": {
"href": "/publicuri/59f9fb3858344bb8b6ded0da35ec9437"
}
},
"uri": "/zzzz/wzhpqiWZlnfNvHYoQiHM2g/oHIMo6kHB-uUmyVsNGfLVA/qq11/10.jpg",
"status": "Published",
"provider": "FastlyCDN",
"canDelete": true,
"id": "59f9fb3858344bb8b6ded0da35ec9437",
"modifiedOn": "2019-05-10T13:29:57.59",
"createdOn": "2019-05-10T13:29:52.593"
}
Filtering for origins
When asking for the public link collection of a file version, you can filter public links with a specific (set of) origin(s). Therefore, add the header 'select-publiclink-origin' with the requested value. This value can be a single usage, or a comma separated string of origins (Order, API).
Filtering for providers
When asking for the public link collection of a file version, you can filter public links with a specific (set of) provider(s). Therefore, add the header 'select-publiclink-provider' with the requested value. This value can be a single usage, or a comma separated string of providers (case ignored).
Deleting a public uri
DELETE /publiclink/59f9fb3858344bb8b6ded0da35ec9437