Share templates
This relation targets share templates.
Get all share templates
GET /api/dam/share/templates
The response will contain a paginated list of share template resources. Share template resources will follow the following schema:
"properties": {
"id": {
"type": "integer"
},
"title": {
"type": "array",
"items": {
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"description": {
"type": "array",
"items": {
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"baseUrl": {
"type": "string"
},
"creationDate": {
"type": "string",
"format": "date-time"
},
"creationUserId": {
"type": "integer"
},
"updateDate": {
"type": "string",
"format": "date-time"
},
"updateUserId": {
"type": "integer"
},
"shareUrl": {
"title": "Generated Share url",
"description": "Generated Share url",
"type": "string"
}
}
Possible errors are:
-
403
(shareTemplate-accessDenied): User needs to have public share feature access to be able to see share templates
Get a share template
GET /api/dam/share/template/77
If the share template exists and is readable by the user, the HTTP status of the response will be 200
. The body of the response will follow the following schema:
"properties": {
"id": {
"type": "integer"
},
"title": {
"type": "array",
"items": {
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"description": {
"type": "array",
"items": {
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"baseUrl": {
"type": "string"
},
"creationDate": {
"type": "string",
"format": "date-time"
},
"creationUserId": {
"type": "integer"
},
"updateDate": {
"type": "string",
"format": "date-time"
},
"updateUserId": {
"type": "integer"
},
"shareUrl": {
"title": "Generated Share url",
"description": "Generated Share url",
"type": "string"
}
}
Possible errors are:
-
403
(shareTemplate-accessDenied): User needs to have public share feature access to be able to see a share template -
404
(shareTemplate-notFound): Requested share template does not exist
Create a share template
Header: Content-type:application/json
POST /api/dam/share/templates
Request body must contain the following attributes:
-
title
: An array of objects with lang and value properties to set the title of the share template in different languagesexample:
"title": [ { "lang": "EN", "value": "Share template" }, { "lang": "FR", "value": "Template de partage" } ]
Request body can contain the following attributes:
-
description
: An array of object with lang and value properties to set the description of the share template in different languagesexample:
"description": [ { "lang": "EN", "value": "This is a share template" }, { "lang": "FR", "value": "Un template de partage" } ]
If the share template is created with success, the HTTP status of the response will be 201
. It is then possible to get the location of the newly created resource in the Location
HTTP response header.
Possible errors are:
-
400
(shareTemplate-invalidBody): The request body does not represent a valid share template, or some mandatory fields are empty or missing -
403
(shareTemplate-creationDenied): User needs to be an administrator to be able to create a new share template
Update a share template
Header: Content-type:application/json
PUT /api/dam/share/templates/3
Request body can contain the following attributes:
-
title
: An array of objects with lang and value properties to set the title of the share template in different languagesexample:
"title": [ { "lang": "EN", "value": "Share template" }, { "lang": "FR", "value": "Template de partage" } ]
-
description
: An array of object with lang and value properties to set the description of the share template in different languagesexample:
"description": [ { "lang": "EN", "value": "This is a share template" }, { "lang": "FR", "value": "Un template de partage" } ]
If the share template is updated with success, the HTTP status of the response will be 204
.
Possible errors are:
-
400
(shareTemplate-invalidBody): The request body does not represent a valid share template or user is trying to empty some mandatory fields -
403
(shareTemplate-updateDenied): User needs to be an administrator to be able to update a share template -
404
(shareTemplate-notFound): Requested share template does not exist
Delete a share template
DELETE /api/dam/share/templates/5
If the share template is deleted with success, the HTTP status of the response will be 204
.
Possible errors are:
-
403
(shareTemplate-deletionDenied): User needs to be an administrator to be able to delete a share template -
404
(shareTemplate-notFound): Requested share template does not exist
4.62.0+
Share templates domains
This relation targets share templates domains.
Get all share template domains
GET /api/dam/share/templates/{shareTemplateId}/domains
The response will contain a paginated list of share template domain resources. Share template domain resources will follow the following schema:
"properties": {
"id": {
"title": "id",
"description": "technical identifier",
"type": "integer"
},
"uri": {
"title": "share template domain uri",
"description": "The share template domain uri",
"type": "string"
}
}
Possible errors are:
-
403
(share-template-feature-access-denied): User needs to have public share feature access to be able to see share templates -
404
(share-template-not-found): GivenshareTemplateId
does not exists
Get a share template domain
GET /api/dam/share/template/{shareTemplateId}/domains/{shareTemplateDomainId}
If the share template domain exists and is readable by the user, the HTTP status of the response will be 200
. The body of the response will follow the following schema:
"properties": {
"id": {
"title": "id",
"description": "technical identifier",
"type": "integer"
},
"uri": {
"title": "share template domain uri",
"description": "The share template domain uri",
"type": "string"
}
}
Possible errors are:
-
403
(share-template-feature-access-denied): User needs to have public share feature access to be able to see a share template -
404
(share-template-not-found): GivenshareTemplateId
does not exists -
404
(share-template-domain-not-found): GivenshareTemplateDomainId
does not exists, or it's not part of givenshareTemplateId
4.62.0+
Create a share template domain
Header: Content-type:application/json
POST /api/dam/share/template/{shareTemplateId}/domains
This will add a domain to the share template with the given shareTemplateId
.
Request body must contain the following attribute:
-
uri
: the share template domain uri
Possible errors are:
-
403
(share-template-feature-access-denied): User must be admin and needs to have public share feature access to be able to see share templates -
404
(share-template-not-found): GivenshareTemplateId
does not exists
Delete a share template domain
Header: Content-type:application/json
DELETE /api/dam/share/template/{shareTemplateId}/domains/{shareTemplateDomainId}
This will delete the template domain with the given shareTemplateDomainId
.
Possible errors are:
-
400
(share-template-domain-used): The template domain is used by at least one share -
403
(share-template-feature-access-denied): User must be admin and needs to have public share feature access to be able to see share templates -
404
(share-template-not-found): GivenshareTemplateId
does not exists
Share templates
This relation targets share templates.
Get all share templates
GET /api/dam/share/templates
The response will contain a paginated list of share template resources. Share template resources will follow the following schema:
{
"$schema": "http://json-schema.org/draft-03/schema#",
"title": "shareTemplateAPI",
"description": "Share template api resource",
"type": "object",
"properties": {
"id": {
"title": "id",
"description": "technical identifier",
"type": "integer"
},
"title": {
"title": "title translations",
"description": "share template title translations",
"type": "array",
"items": {
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"description": {
"title": "description translations",
"description": "share template description translations",
"type": "array",
"items": {
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"baseUrl": {
"title": "base url",
"description": "share template base url",
"type": "string"
},
"creationDate": {
"title": "creation date",
"description": "share template creation date",
"type": "string",
"format": "date-time"
},
"creationUserId": {
"title": "creation user identifier",
"description": "share template creation user technical identifier",
"type": "integer"
},
"updateDate": {
"title": "update date",
"description": "share template update date",
"type": "string",
"format": "date-time"
},
"updateUserId": {
"title": "update user identifier",
"description": "share template update user technical identifier",
"type": "integer"
}
}
}
Possible errors are:
-
403
(shareTemplate-accessDenied): User needs to have public share feature access to be able to see share templates
Get a share template
GET /api/dam/share/template/77
If the share template exists and is readable by the user, the HTTP status of the response will be 200
. The body of the response will follow the following schema:
{
"$schema": "http://json-schema.org/draft-03/schema#",
"title": "shareTemplateAPI",
"description": "Share template api resource",
"type": "object",
"properties": {
"id": {
"title": "id",
"description": "technical identifier",
"type": "integer"
},
"title": {
"title": "title translations",
"description": "share template title translations",
"type": "array",
"items": {
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"description": {
"title": "description translations",
"description": "share template description translations",
"type": "array",
"items": {
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"baseUrl": {
"title": "base url",
"description": "share template base url",
"type": "string"
},
"creationDate": {
"title": "creation date",
"description": "share template creation date",
"type": "string",
"format": "date-time"
},
"creationUserId": {
"title": "creation user identifier",
"description": "share template creation user technical identifier",
"type": "integer"
},
"updateDate": {
"title": "update date",
"description": "share template update date",
"type": "string",
"format": "date-time"
},
"updateUserId": {
"title": "update user identifier",
"description": "share template update user technical identifier",
"type": "integer"
}
}
}
Possible errors are:
-
403
(shareTemplate-accessDenied): User needs to have public share feature access to be able to see a share template -
404
(shareTemplate-notFound): Requested share template does not exist
Create a share template
Header: Content-type:application/json
POST /api/dam/share/templates
Request body must contain the following attributes:
-
title
: An array of objects with lang and value properties to set the title of the share template in different languagesexample:
"title": [ { "lang": "EN", "value": "Share template" }, { "lang": "FR", "value": "Template de partage" } ]
Request body can contain the following attributes:
-
description
: An array of object with lang and value properties to set the description of the share template in different languagesexample:
"description": [ { "lang": "EN", "value": "This is a share template" }, { "lang": "FR", "value": "Un template de partage" } ]
If the share template is created with success, the HTTP status of the response will be 201
. It is then possible to get the location of the newly created resource in the Location
HTTP response header.
Possible errors are:
-
400
(shareTemplate-invalidBody): The request body does not represent a valid share template, or some mandatory fields are empty or missing -
403
(shareTemplate-creationDenied): User needs to be an administrator to be able to create a new share template
Update a share template
Header: Content-type:application/json
PUT /api/dam/share/templates/3
Request body can contain the following attributes:
-
title
: An array of objects with lang and value properties to set the title of the share template in different languagesexample:
"title": [ { "lang": "EN", "value": "Share template" }, { "lang": "FR", "value": "Template de partage" } ]
-
description
: An array of object with lang and value properties to set the description of the share template in different languagesexample:
"description": [ { "lang": "EN", "value": "This is a share template" }, { "lang": "FR", "value": "Un template de partage" } ]
If the share template is updated with success, the HTTP status of the response will be 204
.
Possible errors are:
-
400
(shareTemplate-invalidBody): The request body does not represent a valid share template or user is trying to empty some mandatory fields -
403
(shareTemplate-updateDenied): User needs to be an administrator to be able to update a share template -
404
(shareTemplate-notFound): Requested share template does not exist
Delete a share template
DELETE /api/dam/share/templates/5
If the share template is deleted with success, the HTTP status of the response will be 204
.
Possible errors are:
-
403
(shareTemplate-deletionDenied): User needs to be an administrator to be able to delete a share template -
404
(shareTemplate-notFound): Requested share template does not exist
4.62.0+