Public access on Share token
These relations target the public representation of share token and its children. To manage the share tokens, see the previous section "Share token". These paths can be requested without any authentication.
Get the public representation of the share token
GET /api/share/{tokenValue}
The tokenValue
URL parameter is the tokenValue
attribute of the share token (see the "Share token" section). The body of the response will follow the following schema:
{
"$schema": "http://json-schema.org/draft-03/schema#",
"title": "publicTokenShareAPI",
"description": "Token share api resource",
"type": "object",
"properties": {
"title": {
"title": "Title",
"description": "Title of public share token",
"type": "string"
},
"tokenValue": {
"title": "Token value",
"description": "The token value",
"type": "string"
},
"suffix": {
"title": "Suffix",
"description": "The token suffix",
"type": "string"
},
"manualActivate": {
"title": "Manual Activation",
"description": "True if the token has been manually activated",
"type": "boolean"
},
"activationDate": {
"title": "Activate date",
"description": "Auto activate share when the date has been reached",
"type": "string",
"format": "date-time"
},
"deactivationDate": {
"title": "Deactivation date",
"description": "Auto deactivate share when the date has been reached",
"type": "string",
"format": "date-time"
},
"exportDefinition": {
"title": "Export definition",
"description": "Share export definition",
"type": "string",
"enum": [
"NONE",
"BD",
"HD"
]
},
"createDate": {
"title": "Create date",
"description": "Date of token creation",
"type": "string",
"format": "date-time"
},
"updateDate": {
"title": "Update date",
"description": "Date of token update",
"type": "string",
"format": "date-time"
}
}
}
4.63.0+
Get the public representation of shared medias from a share token
GET /api/share/{tokenValue}/shared-medias/{sharedMediaId}
The tokenValue
URL parameter is the tokenValue
attribute of the share token (see the "Share token" section).
The sharedMediaId
URL parameter is the sharedMediaId
attribute of the media linked with the share token (see the " Share token" section).
The body of the response will follow the following schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MediaAPI",
"description": "Media resource",
"type": "object",
"extends": {
"javaType": "com.keepeek.kpk360.server.api.hal.HalEntity<MediaAPI>"
},
"properties": {
"originalFileName": {
"title": "originalFileName",
"description": "Original filename",
"type": "string"
},
"fileSize": {
"title": "Original file size",
"description": "Size in byte",
"type": "integer",
"format": "long"
},
"fileSizeString": {
"title": "Original file size as a string",
"description": "Size in kilo-byte",
"type": "string"
},
"duration": {
"title": "duration",
"description": "duration",
"type": "string"
},
"mediaType": {
"title": "mediaType",
"description": "media type",
"type": "string"
},
"width": {
"title": "width",
"description": "width",
"type": "integer"
},
"height": {
"title": "height",
"description": "height",
"type": "integer"
},
"resolution": {
"title": "resolution",
"description": "resolution",
"type": "integer"
},
"colorSpace": {
"title": "Color space",
"type": "string",
"enum": [
"sRGB",
"CMYK"
]
},
"duplicationStatus": {
"title": "duplicationStatus",
"description": "Duplication status",
"type": "string",
"enum": [
"NO_DUPLICATES",
"DUPLICATES_FOUND",
"DUPLICATES_ACKNOWLEDGED"
]
},
"thumbnailGenerationStatus": {
"title": "thumbnailGenerationStatus",
"description": "Thumbnail generation status",
"type": "string",
"enum": [
"NOT_GENERATED",
"GENERATED",
"ERROR",
"REFRESHING"
]
},
"annotation": {
"title": "annotation",
"description": "annotation",
"type": "string",
"enum": [
"RED",
"ORANGE",
"GREEN",
"PURPLE",
"YELLOW",
"KO",
"OK",
"IN_PROGRESS",
"ATTENTION",
"BOOKMARK",
"TO_REMOVE",
"FLAG",
"TO_RECYCLE",
"REJECTED",
"ACCEPTED",
"NONE"
]
},
"creationDate": {
"title": "creationDate",
"description": "creation date",
"type": "string",
"format": "date-time"
},
"updateDate": {
"title": "updateDate",
"description": "update date",
"type": "string",
"format": "date-time"
},
"importDate": {
"title": "importDate",
"description": "import date",
"type": "string",
"format": "date-time"
}
}
}
Example of response:
{
"id": 4703,
"annotation": "NONE",
"width": 1140,
"height": 854,
"resolution": -1,
"mediaType": "image/jpeg",
"fileSize": 49576,
"fileSizeString": "49,6 Ko",
"originalFileName": "43471324_900560913476183_3080968599075028992_o.jpg",
"creationDate": "2020-08-31T09:48:37.000Z",
"updateDate": "2023-03-28T09:33:50.000Z",
"importDate": "2020-08-31T09:48:37.000Z",
"colorSpace": "sRGB",
"duplicationStatus": "NO_DUPLICATES",
"thumbnailGenerationStatus": "GENERATED",
"formType": "PICTURE",
"_links": {
[...]
"self": {
"href": "http://baobab.keepeek.com/api/share/b8zlUaacc/shared-medias/4703"
},
"kpk:metadata": {
"href": "http://baobab.keepeek.com/api/share/b8zlUaacc/shared-medias/4703/metadata"
},
"kpk:form": {
"href": "http://baobab.keepeek.com/api/share/b8zlUaacc/forms/1"
},
"kpk:terms-of-use": {
"href": "http://baobab.keepeek.com/api/share/b8zlUaacc/shared-medias/4703/terms-of-use"
},
"kpk:custom-status": {
"href": "http://baobab.keepeek.com/api/dam/medias/custom-statuses/1"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
]
},
"_embedded": {
"metadata": [
{
"id": "title",
"name": "Titre",
"value": "43471324_900560913476183_3080968599075028992_o",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/share/b8zlUaacc/shared-medias/4703/metadata/title"
},
"kpk:field": {
"href": "http://baobab.keepeek.com/api/share/b8zlUaacc/forms/1/fields/2"
}
}
},
[...]
]
}
}
4.63.0+
Get all metadata of a shared media
GET /api/share/{tokenValue}/shared-medias/{sharedMediaId}/metadata
The metadata resource of a token shared media returns all public metadata of the media.
Metadata is embedded in the response:
{
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/share/d847479a-f233-4d0e-9c56-c834aaffdfef/shared-medias/50568/metadata?page=1&size=20"
},
"curies": [
{
"name": "kpk",
"href": "http://baobab.keepeek.com/api/doc/rels/{rel}",
"templated": true
}
]
},
"_embedded": {
"metadata": [
{
"id": "title",
"name": "Titre",
"value": "file_example_MP4_1920_18MG",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/share/d847479a-f233-4d0e-9c56-c834aaffdfef/shared-medias/50568/metadata/title"
}
}
},
{
"id": "duration",
"name": "Durée",
"value": "0:00:31",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/share/d847479a-f233-4d0e-9c56-c834aaffdfef/shared-medias/50568/metadata/duration"
}
}
},
{
"id": "legend",
"name": "Légende",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/share/d847479a-f233-4d0e-9c56-c834aaffdfef/shared-medias/50568/metadata/legend"
}
}
},
{
"id": "shot_date",
"name": "Date de prise de vue",
"value": "2015-08-06T22:00:00.000Z",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/share/d847479a-f233-4d0e-9c56-c834aaffdfef/shared-medias/50568/metadata/shot_date"
}
}
}
]
},
"totalCount": 4
}
4.63.0+
Get one specific metadata of a shared media
GET /api/share/{tokenValue}/shared-medias/{sharedMediaId}/metadata/{metadataId}
Public metadata of a shared media can be retrieved with their id.
The response body contains the metadata id
, its name
and its value
if there is one:
{
"id": "duration",
"name": "Durée",
"value": "0:00:31",
"_links": {
"self": {
"href": "http://baobab.keepeek.com/api/share/d847479a-f233-4d0e-9c56-c834aaffdfef/shared-medias/50568/metadata/duration"
}
}
}
4.63.0+
Get terms of use of a shared media
GET /api/share/{tokenValue}/shared-medias/{sharedMediaId}/terms-of-use
The response body contains global and media terms of use:
{
"mediaId": 171887,
"mediaTitle": "997",
"globalTerms": "Global terms",
"terms": [
{
"name": "Term name",
"value": "Term value"
}
],
[...]
}
4.63.0+
Get the video player web component configuration of a shared media
GET /api/share/{tokenValue}/shared-medias/{sharedMediaId}/player
Keepeek gives access to a video player web component. It is possible to get its configuration for a specific shared media through the player related resource.
The returned JSON configuration file follows the following JSON schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "KpkVideoConfiguration",
"type": "object",
"properties": {
"statistics": {
"description": "Statistics configuration",
"type": "object",
"properties": {
"url": {
"description": "Hit endpoint",
"type": "string",
"title": "url"
},
"mediaId": {
"description": "Media identifier",
"type": "integer",
"title": "mediaId"
},
"instanceId": {
"description": "Instance identifier",
"type": "integer",
"title": "instanceId"
},
"uiId": {
"description": "UI identifier",
"type": "integer",
"title": "uiId"
},
"maxDuration": {
"description": "Maximum video duration",
"type": "integer",
"format": "long",
"title": "maxDuration"
},
"referrer": {
"description": "Referrer url",
"type": "string",
"title": "referrer"
}
},
"required": [
"instanceId",
"maxDuration",
"mediaId",
"referrer",
"uiId",
"url"
],
"title": "statistics"
},
"theme": {
"description": "Theme for video.js (default or fantasy)",
"type": "object",
"properties": {
"value": {
"type": "string",
"enum": [
"default",
"fantasy"
]
}
}
},
"autoplay": {
"description": "Autoplay video, player will be muted because most browser disallow autoplay with sound",
"type": "boolean",
"title": "autoplay"
},
"posterSrc": {
"description": "Sets the image that displays before the video begins playing",
"type": "string",
"title": "posterSrc"
},
"customDownloadUrl": {
"description": "Url to download highest available resolution video as mp4",
"type": "string",
"title": "customDownloadUrl"
},
"tracks": {
"title": "tracks",
"description": "Tracks configuration",
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"enum": [
"chapters",
"subtitles"
],
"type": "string",
"title": "kind"
},
"src": {
"description": "Source",
"type": "string",
"title": "src"
},
"srclang": {
"description": "Language (EN)",
"type": "string",
"title": "srclang"
},
"default": {
"description": "Is default track?",
"type": "boolean",
"title": "default"
}
},
"required": [
"default",
"kind",
"src",
"srclang"
]
}
},
"sources": {
"title": "sources",
"description": "Sources configuration",
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"description": "Label ",
"type": "string",
"title": "label"
},
"res": {
"description": "Resolution",
"type": "integer",
"title": "res"
},
"src": {
"description": "The url to the source",
"type": "string",
"title": "src"
},
"type": {
"description": "The mime type of the source",
"type": "string",
"title": "type"
},
"default": {
"description": "Is default resolution?",
"type": "boolean",
"title": "default"
}
},
"required": [
"default",
"label",
"res",
"src"
]
}
}
},
"required": [
"sources",
"statistics",
"theme",
"tracks"
]
}
4.63.0+