Users
users
Read users collection
This relation targets the collection of users, sorted alphabetically by user surname. User must be manager or administrator to access to the list of users.
- dam --> users: all the users in the DAM instance
4.20.0+
current-user
This relation targets the authenticated user resource.
4.0.0+
user
This relation targets the canonical resource representing a user.
GET http://baobab.keepeek.com/api/dam/users/3 HTTP/1.1
[...]
HTTP/1.1 200 OK
Content-Type: application/hal+json;version=1;charset=UTF-8
[...]
{
"id": 3,
"login": "mylogin",
"lastName": "Lastname",
"firstName": "Firstname",
"email": "firstname.lastname@domain",
"acronym": "LFI",
"externalAuthentication": false,
"permission": "READ",
[...]
The permission
field value will depend on the currently logged user rights :
- READ : the user resource is read only.
- WRITE : the user resource can be modified using a PUT request, or deleted using a DELETE.
- DELETE : the user can only be deleted using a DELETE request; it cannot be updated using a PUT request. This is the case for externally authenticated users, whose informations are held by external auth system.
4.20.0+
exports
This relation targets the collection of user's exports. The lifetime of an export is short, therefore do not persist export URI for a long time. Typical usage of these resources (Export and Export collection) is to request for an export on a media set ( basket, folder's media...).
Create an export request
An export can be created by sending POST request on the exports resource related to a selection.
The acceptTermsOfUse
property must be provided and reflect user's acceptance. Third party application must provide a convenient access for the user to the related terms of use. The terms-of-use
relation allows to retrieve terms of use for the selection medias.
If the user is not an administrator, the usage
property is mandatory.
Additional parameters can be passed through the _links
property :
- the
kpk:picture-export-format
link targets the requested export format for PICTUREs - the
kpk:video-export-format
link targets the requested export format for VIDEOs - the
kpk:document-export-format
link targets the requested export format for DOCUMENTs - the
kpk:sound-export-format
link targets the requested export format for SOUNDs - the
kpk:other-export-format
link targets the requested export format for OTHERs
Sample requests:
- Create an export for picture and video selection
POST /api/dam/users/123/selections/69jfiqhy/exports
Content-Type: application/json
{
"acceptTermsOfUse":true,
"usage":"Sample API document usage",
"_links": {
"kpk:picture-export-format": {
"href": "http://baobab.keepeek.com/api/dam/users/123/selections/69jfiqhy/media-types/PICTURE/export-formats/43"
},
"kpk:video-export-format": {
"href": "http://baobab.keepeek.com/api/dam/users/123/selections/69jfiqhy/media-types/VIDEO/export-formats/17"
}
}
}
Api returns the url of the created export in the location
response header, ex.: http://baobab.keepeek.com/api/dam/users/123/exports/gdvcq3vu
Get the target export file
Export file is created as a background task. To monitor this task, use polling stategy on the the export file:
GET http://baobab.keepeek.com/api/dam/users/123/exports/gdvcq3vu
{
"id": "gdvcq3vu",
"status": "RUNNING",
"creationDate": "2017-12-12T14:07:15.133Z",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/123/exports/gdvcq3vu"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
],
"kpk:terms-of-use": {
"href": "http://baobab.keepeek.com/api/dam/users/123/exports/gdvcq3vu/terms-of-use"
},
"kpk:from": {
"href": "http://baobab.keepeek.com/api/dam/users/123/selections/89vvubr6"
}
}
}
Export's status available values are:
- RUNNING
- FINISHED
- FAILED
When the export is finished, the target
link contains file archive url:
GET http://baobab.keepeek.com/api/dam/users/123/exports/gdvcq3vu
{
"id": "gdvcq3vu",
"status": "FINISHED",
"creationDate": "2017-12-12T14:07:15.133Z",
"updateDate": "2017-12-12T14:19:40.178Z",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/123/exports/gdvcq3vu"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
],
"kpk:terms-of-use": {
"href": "http://baobab.keepeek.com/api/dam/users/123/exports/gdvcq3vu/terms-of-use"
},
"kpk:from": {
"href": "http://baobab.keepeek.com/api/dam/users/123/selections/89vvubr6"
},
"kpk:target": {
"href": "http://static-baobab.keepeek.com/scache/domain1/2/Keepeek-Export-ejgibi93-12-12-2017-15-07-15.zip"
}
}
}
4.7.0+
selections
This relation allow to create a media selection. The lifetime of a selection is short, therefore do not persist selection URI for a long time. Typical usage of these resources is to request for an export on a media selection.
4.7.0+
media-types
This relation list all media types available in the selection. Media in selection can be of the following types:
- PICTURE
- VIDEO
- DOCUMENT
- SOUND
- OTHER
4.7.0+
export-formats
This relation targets the collection of custom export format for a specific media-type. The list of available formats depends on user permissions on all the media from the specified type. For example if the access to one of the picture is not high definition granted, only low definition format are available.
4.7.0+
picture-export-format
This relation a custom export format for the PICTURE media-type. Use this type of relation to define requested format in export create request.
4.7.0+
video-export-format
This relation a custom export format for the VIDEO media-type. Use this type of relation to define requested format in export create request.
4.7.0+
document-export-format
This relation a custom export format for the DOCUMENT media-type. Use this type of relation to define requested format in export create request.
4.7.0+
sound-export-format
This relation a custom export format for the SOUND media-type. Use this type of relation to define requested format in export create request.
4.7.0+
other-export-format
This relation a custom export format for the OTHER media-type. Use this type of relation to define requested format in export create request.
4.7.0+
bulks
This relation target the collection of bulk operations. There is 2 type of bulk operation:
- UPDATE : to update multiple metadata of multiple media in one call
- AUTOTAG : to use IA to add tag on media To use bulk operation, user must first create a selection media to update. If no operation is defined in bulk opearion creation, the default operation is
UPDATE
.
Bulk operations are limited to 300 medias. If the selection is larger, bulk operation creation fail with 400 - bulk-max-medias
error.
Bulk operation AUTOTAG
A bulk operation AUTOTAG
will be applied on the media selection.
Create the AUTOTAG
bulk operation
To create ths kind of operation, only the operation-type
attribute is required.
POST /api/dam/users/123/selections/69jfiqhy/bulks
Content-Type: application/json
{
"operation-type": "AUTOTAG"
}
4.96.0
Bulk operation UPDATE
To use UPDATE
bulk operation, the user need to get the list of fields available for bulk UPDATE
operation and then create a bulk operation to update one or several fields simultaneously.
Get the list of available fields
If the selection contains several type of media with multiple form definitions, all the field may not be available for the bulk operation.
GET /api/dam/users/123/selections/69jfiqhy/bulks/fields
Content-Type: application/json
{
"_links": {
"curies": [{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
],
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/2/selections/8v3ncb89/bulks/fields"
}
},
"_embedded": {
"field": [{
"id": "title",
"title": "Title",
"type": "TEXT",
"mandatory": true,
"forceSelection": false,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/forms/17/fields/176"
}
}
}, {
"id": "box_to_check",
"title": "Box to check",
"description": "",
"type": "CHECK_BOX",
"mandatory": true,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/forms/17/fields/177"
}
}
}, {
"id": "date",
"title": "DATE",
"description": "",
"type": "DATE",
"mandatory": false,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/forms/17/fields/180"
}
}
}, {
"id": "email",
"title": "EMAIL",
"description": "",
"type": "EMAIL",
"mandatory": false,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/forms/17/fields/182"
}
}
}, {
"id": "thesaurus",
"title": "THESAURUS",
"description": "",
"type": "THESAURUS",
"mandatory": false,
"forceSelection": true,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/forms/17/fields/188"
},
"kpk:thesaurus": {
"href": "http://baobab.keepeek.com/api/dam/thesauruses/134"
}
}
}
]
},
"totalCount": 5
}
Create the UPDATE
bulk operation
A bulk operation on a selection of media is based on the information provided in the _embedded[metadata] property. This property must contain an array of field with the desired modifications.
-
value
property contains the new value of a single value field (text, number, email, date...) -
_embedded.value
array contains the new value(s) of a multiple value field (thesaurus) -
append
property indicates if the new value should be append to the existing one instead of replace (default behavior)
If the new value
is omitted or if the _embedded.value
array is empty, the field is cleared.
The value must be well formatted :
- checkbox field : JSON boolean type
- number field : JSON numeric type
- date or datetime field : JSON string type conforming to RFC 3339 §5.6
POST /api/dam/users/123/selections/69jfiqhy/bulks
Content-Type: application/json
{
"_embedded": {
"metadata": [{
"id": "boxtocheck",
"value": true
}, {
"id": "suggestion",
"value": "suggested",
"append": true
}, {
"id": "email"
}, {
"id": "thesaurus",
"_embedded": {
"value": [{
"id": 145
}, {
"id": 140
}
]
}
}
]
}
}
4.16.0+
To use a thesaurus term that does not exist (candidate term) you can use this syntax:
{
"title": "my new term"
}
For exemple :
POST /api/dam/users/123/selections/69jfiqhy/bulks
Content-Type: application/json
{
"_embedded": {
"metadata": [{
"id": "thesaurus",
"_embedded": {
"value": [{
"title": "my new term"
}
]
}
}
]
}
}
Note:
- the thesaurus must be configured from the backoffice in order to allow the addition of terms.
- the "# " < >" characters are special and will be automatically removed from the term.
- if the term is not text, an "invalid-thesaurus-candidate-format" type error will be returned.
- if the term already exists, your term will not be added and the term already present will be used.
- the maximum size of the term must not exceed 100 characters, an "invalid-thesaurus-candidate-size" type error will be raised if this is the case.
4.72.0+
assigned-groups
This relation targets the list of assigned groups for the user.
4.20.0+
available-groups
This relation targets the list of groups available for the user.
4.20.0+
authorized-user-interfaces
This relation targets the list of user-interfaces available for the user.
4.36.0+
Get list of user-interfaces available for a user
Sample request:
GET /api/dam/users/21/authorized-user-interfaces
Content-Type: application/json
[...]
HTTP: 200 Ok
{
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/21/authorized-user-interfaces?page=1&size=20"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
]
},
"_embedded": {
"ui": [
{
"id": 0,
"title": "Backoffice",
"client_id": "4f23258f-8666-11eb-9e17-b07b254d2551",
"type": "BACKOFFICE",
"_links": {
"kpk:user-interface": {
"href": "http://baobab.keepeek.com/api/dam/user-interfaces/0"
},
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/21/authorized-user-interfaces/0"
}
}
},
{
"id": 1,
"title": "baobab-standard",
"client_id": "4f23299b-8666-11eb-9e17-b07b254d2551",
"type": "FRONTOFFICE",
"_links": {
"kpk:user-interface": {
"href": "http://baobab.keepeek.com/api/dam/user-interfaces/1"
},
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/21/authorized-user-interfaces/1"
}
}
},
{
"id": 2,
"title": "baobab-complet",
"client_id": "4f232a5c-8666-11eb-9e17-b07b254d2551",
"type": "FRONTOFFICE",
"_links": {
"kpk:user-interface": {
"href": "http://baobab.keepeek.com/api/dam/user-interfaces/2"
},
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/21/authorized-user-interfaces/2"
}
}
}
]
},
"totalCount": 3
}
authorized-user-interface
This relation targets a user-interfaces available for the user.
4.36.0+
Get a user-interface available for a user
Sample request :
GET /api/dam/users/21/authorized-user-interfaces/0
Content-Type: application/json
[...]
HTTP: 200 Ok
{
"id": 0,
"title": "Backoffice",
"_links": {
"kpk:user-interface": {
"href": "http://baobab.keepeek.com/api/dam/user-interfaces/0"
},
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/21/authorized-user-interfaces/0"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
],
"kpk:ui-user-preferences": {
"href": "http://baobab.keepeek.com/api/dam/users/21/authorized-user-interfaces/0/preferences"
}
}
}
preferences
This relation targets a list of preferences on available user-interface for the user.
Exposed preferences keys are:
- google-drive 4.36.0+
4.36.0+
Get the list of preferences
List all of preferences on API, even if the user has no preference
Sample request:
GET /api/dam/users/21/authorized-user-interfaces/0/preferences
Content-Type: application/json
[...]
HTTP: 200 Ok
{
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/21/authorized-user-interfaces/0/preferences?page=1&size=20"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
]
},
"_embedded": {
"preference": {
"preferenceKey": "google-drive",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/21/authorized-user-interfaces/0/preferences/google-drive"
}
}
}
},
"totalCount": 1
}
preference
This relation targets a preference on available user-interface for the user.
4.36.0+
Get a preference
If the user has no preference on the user interface, the default value is returned
Sample request:
GET /api/dam/users/21/authorized-user-interfaces/0/preferences/google-drive
Content-Type: application/json
[...]
HTTP: 200 Ok
{
"userId": 21,
"uiId": 0,
"preferenceKey": "google-drive",
"value": {
"exportInformationFile": true
},
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/21/authorized-user-interfaces/0/preferences/google-drive"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
]
}
}
Modify a preference
If the user preference on the user interface does not exist (i.e. user has the default preferences), the user preference on the user-interface is created.
PUT /api/dam/users/21/authorized-user-interfaces/0/preferences/google-drive
Content-Type: application/json
{
"userId": 21,
"uiId": 0,
"preferenceKey": "google-drive",
"value": {
"exportInformationFile": true
}
}
[...]
HTTP: 204 No Content
Errors:
- HTTP: 400 Bad Request
message:userId-invalid
, the userId defined in path and the userId in the body of the request are different, - HTTP: 400 Bad Request
message:uiId-invalid
, the uiId defined in path and the uiId in the body of the request are different, - HTTP: 400 Bad Request
message:preferenceKey-invalid
, the preferenceId defined in path and the preferenceKey in the body of the request are different, - HTTP: 400 Bad Request
message:value-invalid
, the value in the body does not respect the desired format
additional-attributes
This relation targets additional-attributes of a user.
4.92.0+
Create multiples attributes
The POST method allows you to create multiples attributes at once. All attributes must be defined in attributes
property.
An attribute has 3 mandatory fields:
-
id
: alphanumerical identifier of the attribute, must not contain special characters and max length is 128 -
type
: type of the attribute value, can beSTRING
,NUMERIC
,BOOLEAN
orOBJECT
-
value
: actual value of the attribute, iftype = OBJECT
, can be a true JSON or a stringify JSON
If the attribute's type is OBJECT
, an extra property must be provided:
-
schema
: name of the json schema that will be found inschemas
property
The schemas
property lists all json schema by name used by the attributes. The value can be a true JSON or a stringify JSON.
Once an attribute is created, its type
or schema
cannot be modified. The only way is to delete the attribute and create it again.
Sample request:
POST /api/dam/users/2/additional-attributes
Content-Type: application/json
{
"attributes": [
{
"id": "att-string",
"type": "STRING",
"value": "test string"
},
{
"id": "att-number",
"type": "NUMBER",
"value": 666
},
{
"id": "att-boolean",
"type": "BOOLEAN",
"value": true
},
{
"id": "att-object-1",
"type": "OBJECT",
"value": "{\"prop-a\":\"my prop\", \"prop-b\":45.3, \"prop-c\":false\n}",
"schema": "schema-1"
},
{
"id": "att-object-2",
"type": "OBJECT",
"value": {
"pro-1": "attr 1",
"pro-2": "45",
"pro-3": 42
},
"schema": "schema-2"
}
],
"schemas": {
"schema-1": "{\"$schema\":\"http://json-schema.org/draft-07/schema#\", \"type\":\"object\", \"properties\":{\"prop-a\":{\"type\":\"string\"}, \"prop-b\":{\"type\":\"number\"}, \"prop-c\":{\"type\":\"boolean\"}}}",
"schema-2": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"pr o-1": {
"type": "string"
},
"pro-2": {
"type": "string"
},
"pro-3": {
"type": "number"
}
}
}
}
}
Success:
- 201 Created
Errors:
- 400 Bad Request
- code:
user-attribute-already-exist
, the attribute id already exist for the targeted user - code:
user-attribute-missing-mandatory-field
, somme fields are missing - code:
user-attribute-wrong-value
, thevalue
is invalid according totype
or the jsonvalue
do not match json schema - code:
user-attribute-wrong-json-value
, the jsonvalue
is malformed - code:
user-attribute-wrong-schema-value
, the json schema is malformed - code:
user-attribute-id-contains-special-characters
, theid
contains special characters - code:
user-attribute-wrong-schema-name
, theschema
name do not match any json schema inschemas
- code:
user-attributes-create-request-with-empty-body
, the json body is missing - code:
user-attributes-create-request-without-attributes
,attributes
field is missing in the json body - code:
user-attributes-create-request-without-schemas
,shemas
field is missing in the json body and some attributes to create are of typeOBJECT
- code:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 403 Forbidden
- message:
user-read-accessDenied
, if the connected user is not of type tech, admin or manager and trys to access other user's additional-attributes
- message:
- 404 Not Found
- code:
user-not-found
, the user do not exist
- code:
Get all attributes of a user
Sample request:
GET /api/dam/users/2/additional-attributes
Success:
- 200 OK
{
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/2/additional-attributes?page=1&size=20"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
]
},
"_embedded": {
"additional-attribute": [
{
"id": "att-boolean",
"type": "BOOLEAN",
"value": true,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/2/additional-attributes/att-boolean"
}
}
},
{
"id": "att-number",
"type": "NUMBER",
"value": 666,
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/2/additional-attributes/att-number"
}
}
},
{
"id": "att-object-1",
"type": "OBJECT",
"value": {
"prop-1": "prop 1",
"prop_2": 45.3,
"prop-3": false
},
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/2/additional-attributes/att-object-1"
}
}
},
{
"id": "att-object-2",
"type": "OBJECT",
"value": {
"pro-1": "attr 1",
"pro-2": "45",
"pro-3": 42
},
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/2/additional-attributes/att-object-2"
}
}
},
{
"id": "att-string",
"type": "STRING",
"value": "test string",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/2/additional-attributes/att-string"
}
}
}
]
},
"totalCount": 5
}
Errors:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 403 Forbidden
- message:
user-read-accessDenied
, if the connected user is not of type tech, admin or manager and trys to access other user's additional-attributes
- message:
- 404 Not Found
- code:
user-not-found
, the user do not exist
- code:
Get one attribute
Sample request:
GET /api/dam/users/2/additional-attributes/att-object-2
Success:
- 200 OK
{
"id": "att-object-2",
"type": "OBJECT",
"value": {
"pro-1": "attr 1",
"pro-2": "45",
"pro-3": 42
},
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/2/additional-attributes/att-object-2"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
],
"kpk:attribute-schema": {
"href": "http://baobab.keepeek.com/api/dam/users/2/additional-attributes/att-object-2/schema"
}
}
}
The response contains the link kpk:attribute-schema
only if type = OBJECT
.
Errors:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 403 Forbidden
- message:
user-read-accessDenied
, if the connected user is not of type tech, admin or manager and trys to access other user's additional-attributes
- message:
- 404 Not Found
- code:
user-attribute-not-found
, the user and/or attribute do not exist
- code:
Update an attribute
The type
and json schema of an attribute cannot be modified, only its value
.
Sample request:
PUT /api/dam/users/2/additional-attributes/att-object-2
Content-Type: application/json
{
"value": {
"pro-1": "attr 1",
"pro-2": "text",
"pro-3": 666
}
}
Success:
- 204 No Content
Errors:
- 400 Bad Request
- code:
user-attribute-wrong-value
, thevalue
is wrong according totype
or against json schema - code:
user-attribute-update-request-with-empty-body
, the json body is missing - code:
user-attribute-missing-mandatory-field
, thevalue
field of the body is missing
- code:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 403 Forbidden
- message:
user-read-accessDenied
, if the connected user is not of type tech, admin or manager and trys to access other user's additional-attributes
- message:
- 404 Not Found
- code:
user-attribute-not-found
, the user and/or attribute do not exist
- code:
Delete an attribute
Sample request:
DELETE /api/dam/users/2/additional-attributes/att-object-2
Success:
- 204 No Content
Errors:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 403 Forbidden
- message:
user-read-accessDenied
, if the connected user is not of type tech, admin or manager and trys to access other user's additional-attributes
- message:
- 404 Not Found
- code:
user-not-found
, the user do not exist
- code:
Get the json schema of an attribute
Sample request:
GET /api/dam/users/2/additional-attributes/att-object-2/schema
Success:
- 200 OK
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"properties": {
"pro-1": {
"type": "string"
},
"pro-2": {
"type": "string"
},
"pro-3": {
"type": "number"
}
}
}
Errors:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 403 Forbidden
- message:
user-read-accessDenied
, if the connected user is not of type tech, admin or manager and trys to access other user's additional-attributes
- message:
- 404 Not Found
- code:
user-attribute-not-found
, the user and/or attribute do not exist - code:
user-attribute-schema-not-found
, if the attribute is not of typeOBJECT
- code:
thumbnail template
Get user thumbnail templates
The GET method returns all thumbnail templates that you created and thumbnail templates that are shared. This list is paginated (by default 20 elements per page), you can increase this limit by providing a size
query parameter.
Sample request:
POST /api/dam/users/2/thumbnail-templates
Content-Type: application/json
Success:
- 200 OK
{
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates?page=1&size=20"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
]
},
"_embedded": {
"thumbnail-template": [
{
"id": 256,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/256"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 258,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/258"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 270,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/270"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 273,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/273"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 275,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/275"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 277,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/277"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 234,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/234"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 238,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/238"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 250,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/250"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 251,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/251"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 252,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/252"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 253,
"label": "700x500 Thumbnail",
"width": 500,
"height": 700,
"format": "webp",
"shared": true,
"creationUserId": 1,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/253"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/1"
}
}
},
{
"id": 11,
"label": "keep_transparency",
"width": 5000,
"height": 500,
"format": "png",
"shared": true,
"creationUserId": 21,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/11"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/21"
}
}
},
{
"id": 3,
"label": "My - WebP",
"width": 800,
"height": 600,
"format": "webp",
"shared": false,
"creationUserId": 50,
"permission": "READ",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/3"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/50"
}
}
},
{
"id": 2,
"label": "WebP",
"width": 500,
"height": 500,
"format": "webp",
"shared": true,
"creationUserId": 2,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/2"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/2"
}
}
},
{
"id": 4,
"label": "WebP",
"width": 500,
"height": 500,
"format": "webp",
"shared": false,
"creationUserId": 50,
"permission": "READ",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/4"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/50"
}
}
},
{
"id": 5,
"label": "WebP",
"width": 500,
"height": 500,
"format": "webp",
"shared": false,
"creationUserId": 50,
"permission": "READ",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/5"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/50"
}
}
},
{
"id": 6,
"label": "WebP",
"width": 500,
"height": 500,
"format": "webp",
"shared": true,
"creationUserId": 21,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/6"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/21"
}
}
},
{
"id": 7,
"label": "WebP",
"width": 500,
"height": 500,
"format": "webp",
"shared": false,
"creationUserId": 50,
"permission": "READ",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/7"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/50"
}
}
},
{
"id": 12,
"label": "WebP3",
"width": 500,
"height": 500,
"format": "jpeg",
"shared": true,
"creationUserId": 21,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/12"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/21"
}
}
}
]
},
"totalCount": 20
}
Errors:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 403 Forbidden
- message:
user-thumbnail-template-read-operation-forbidden
, dynameek is not activated, the connected user is not the user in the ressource path or does not have the right to read a thumbnail template
- message:
Get a specific user thumbnail template
Sample request:
POST /api/dam/users/2/thumbnail-templates/11
Content-Type: application/json
Success:
- 200 OK
{
"id": 11,
"label": "keep_transparency",
"width": 5000,
"height": 500,
"format": "png",
"shared": true,
"creationUserId": 21,
"permission": "WRITE",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/dam/users/50/thumbnail-templates/11"
},
"kpk:creation-user": {
"href": "http://baobab.keepeek.com/api/dam/users/21"
}
}
}
Errors:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 404 Not Found
- message:
user-thumbnail-template-not-found
, the user thumbnail template does not exist
- message:
- 403 Forbidden
- message:
user-thumbnail-template-read-operation-forbidden
, dynameek is not activated, the connected user is not the user in the ressource path or does not have the right to read a thumbnail template
- message:
Create a user thumbnail template
This request permit to create a new thumbnail template for the user. Only an administrator can create shared thumbnail templates.
Sample request :
POST /api/dam/users/2/thumbnail-templates
Content-Type: application/json
{
"label": "WebP3",
"width": 500,
"height": 500,
"format": "jpeg"
}
Success:
- 201 Created
- The link to the created resource can be found in the HTTP Location header response.
Errors:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 400 Bad request
- message :
user-thumbnail-template-bad-format
, there is an error in the request payload, error can be one of the following :- one of the mandatory fields is missing, mandatories fields are:
label
,width
,height
andformat
-
width
orheight
fields has an invalid value, it must be higher than 0 -
share
attribute is set totrue
, but user is not an administrator
- one of the mandatory fields is missing, mandatories fields are:
- message :
- 403 Forbidden
- message:
user-thumbnail-template-create-operation-forbidden
, dynameek is not activated, the connected user is not the user in the resource path or does not have the right to create a thumbnail template
- message:
Update a user thumbnail template
This request allows to update an existing thumbnail template for the user. Only an administrator can update a shared thumbnail template.
Sample request :
PUT /api/dam/users/2/thumbnail-templates/11
Content-Type: application/json
{
"id": 11,
"label": "keep_transparency",
"width": 5000,
"height": 500,
"format": "png",
"shared": true
}
Success:
- 204 No content
Errors:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 404 Not Found
- message:
user-thumbnail-template-not-found
, the user thumbnail template does not exist
- message:
- 400 Bad request
- message :
user-thumbnail-template-bad-format
, there is an error in the request payload, error can be one of :- one of the mandatory field is missing, mandatory fields are
id
,label
,width
,height
andformat
-
width
orheight
fields has an invalid value, it must be higher than 0 -
share
attribute is set totrue
, but user is not an administrator -
id
in the payload is not the same as in the resource path
- one of the mandatory field is missing, mandatory fields are
- message :
- 403 Forbidden
- message:
user-thumbnail-template-update-operation-forbidden
, dynameek is not activated, the connected user is not the user in the ressource path or does not have the right to update a thumbnail template
- message:
Delete a user thumbnail template
This request permit to delete an existing thumbnail template for the user.
Sample request :
DELETE /api/dam/users/2/thumbnail-templates/11
Content-Type: application/json
Success:
- 204 No content
Errors:
- 401 Unauthorized
- message:
security-notAuthorized
, provided authorization is incomplete or invalid
- message:
- 403 Forbidden
- message:
user-thumbnail-template-delete-operation-forbidden
, dynameek is not activated, the connected user is not the user in the ressource path or does not have the right to delete a thumbnail template
- message: