Add
Slot |
Description |
contentFileAdd |
This function adds a new content file |
FileSystem:
Input parameters
Key |
Type |
Description |
folderId |
Integer |
ID of the parent folder |
name |
String |
File name (also used to determine the MimeType) |
description |
String (optional) |
Description of the file |
securitySchemeID |
String |
‘public’: file is public, ‘private’: file is not public |
permissionObjectType |
String |
Must be specified as ‘Session’ |
permissionObjectID |
String |
The ID of the Object Type can be freely selected |
data |
String (optional) |
Base64 encoded content of the file |
uploadSession |
String (optional) |
Session of an AppServer Html5 Upload |
copyFrom |
Integer (optional) |
ID of the copied file |
Note:
The content of the file can be transferred in three different ways. Exactly one of the following parameters must be passed:
- data: The content is passed directly with the JSON request as a Base64 encoded byte array.
- uploadSession: The content is first transferred to the AppServer via chunked HTML5 upload and the returned session is used as source. The Content Repository plugin downloads the file from the app server and uses it as content of the file
- copyFrom: The content is copied from another existing content file (copyFrom contains the ID of the file to be copied). Attention: The calling user must have the appropriate permissions to read the content file. Only the content is copied, not other properties (such as names, access rights, etc.). Any content file can be used as a source file, even in a different repository.
{
"folderId" : 5,
"name" : "test.txt",
"description" : "My file description",
"securitySchemeID" : "public",
"permissionObjectType" : "Session",
"permissionObjectID" : "abc",
"data" : "dGVzdA=="
}
Output parameters
Key |
Type |
Description |
id |
Integer |
ID of the created content file |
name |
String |
Name of the created content file |
{
"id": 15,
"name": "test.txt"
}
ClearFileSystem:
Input parameters
Key |
Type |
Description |
contentId |
Integer |
ID of the content repository |
fileName |
String |
Name of the file |
folderPath |
String |
Path under which the file is to be stored |
data |
String (optional) |
Base64 encoded content of the file |
uploadSession |
String (optional) |
Session of an AppServer Html5 Upload |
copyFrom |
String (optional) |
ID of the copied file |
forceOverwrite |
Boolean (optional) |
If the flag has the value ‘true’, any existing file with the same name will be overwritten;
If not set or ‘false’, the creation leads to an error if a file with the same name already exists |
Note:
The content of the file can be transferred in three different ways. Exactly one of the following parameters must be passed:
- data: The content is passed directly with the JSON request as a Base64 encoded byte array.
- uploadSession: The content is first transferred to the AppServer via chunked HTML5 upload and the returned session is used as the source. The Content-Repo plugin downloads the file from the AppServer and uses it as the content of the file
- copyFrom: The content is copied from another existing content file (copyFrom contains the ID of the file to be copied). Attention: The calling user must have the appropriate permissions to read the content file. Only the content is copied, not other properties (such as names, access rights, etc.). Any content file can be used as a source file, even in a different repository.
{
"contentId" : 5,
"fileName" : "test.txt",
"folderPath" : "MyParentFolder/MyChildFolder"
"data" : "dGVzdA=="
}
Find
Slot |
Description |
contentFileFind |
This function lists the searched content file |
FileSystem:
Input parameters
Key |
Type |
Description |
folderId |
Integer |
ID of the content folder in which the content is listed |
name |
String |
Name of the searched file |
{
"folderId": 3,
"name": "test.txt"
}
Output parameters
Key |
Type |
Description |
files |
Array |
Array of all files (max. 1 element) |
id |
Integer |
ID of the file |
name |
String |
Name of the file |
description |
String |
Description of the file |
permissionObjectType |
String |
Must be specified as ‘Session’ |
permissionObjectID |
String |
The ID of the Object Type can be freely selected |
securitySchemeID |
String |
Security scheme (‘public’/’private’) |
statusSchemeID |
String |
Status scheme (not implemented yet; always ‘default’) |
statusID |
String |
Status scheme (not implemented yet; always ‘default’) |
mimeType |
Object |
MimeType information |
mimeType/extension |
String |
The file extension |
mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
url |
String |
The download URL of the file |
{
"files": [
{
"id": 3,
"name": "test.txt",
"description": "My file description 1",
"statusSchemeID": "Default",
"statusID": "Default",
"securitySchemeID": "public",
"permissionObjectType": "Session",
"permissionObjectID": "abc",
"mimeType": {
"extension": "jpg",
"mimeType": "image"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/ParentFolder/ChildFolder/file.jpg/",
}
]
}
ClearFileSystem:
Input parameters
Key |
Type |
Description |
contentId |
Integer |
ID of the content repository in which you want to search |
fileName |
String |
Name of the searched file |
folderPath |
String (optional) |
Path of the folder to search in |
{
"contentId": 3,
"filename": "test.txt",
"folderPath: "MyParentFolder/MyChildfolder"
}
Output parameters
Key |
Type |
Description |
files |
Array |
Array of all files |
filePath |
String |
Path of the file |
mimeType |
Object |
MimeType information |
mimeType/extension |
String |
The file extension |
mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
url |
String |
The download URL of the file |
{
"files": [
{
"filePath": "MyParentFolder/MyChildFolder/test.txt",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder/test.txt/"
},
{
"filePath": "MyParentFolder/MyChildFolder/MyFolder/test.txt",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder/MyFolder/test.txt/"
}
]
}
List
Slot |
Description |
contentFileList |
This function lists a file |
FileSystem:
Input parameters
Key |
Type |
Description |
folderId |
Integer |
ID of the listed content folder |
{
"folderId": 3
}
Output parameters
Key |
Type |
Description |
files |
Array |
Array of all files |
id |
Integer |
ID of the file |
name |
String |
Name of the file |
description |
String |
Description of the file |
permissionObjectType |
String |
Must be specified as ‘Session’ |
permissionObjectID |
String |
The ID of the Object Type can be freely selected |
securitySchemeID |
String |
Security scheme (‘public’/’private’) |
statusSchemeID |
String |
Status scheme (not implemented yet; always ‘default’) |
statusID |
String |
Status scheme (not implemented yet; always ‘default’) |
mimeType |
Object |
MimeType information |
mimeType/extension |
String |
The file extension |
mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
url |
String |
The download URL of the file |
{
"files": [
{
"id": 3,
"name": "test.txt",
"description": "My file description 1",
"statusSchemeID": "Default",
"statusID": "Default",
"securitySchemeID": "public",
"permissionObjectType": "Session",
"permissionObjectID": "abc",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder/test.txt/"
},
{
"id": 4,
"name": "test2.txt",
"description": "My file description 2",
"statusSchemeID": "Default",
"statusID": "Default",
"securitySchemeID": "public",
"permissionObjectType": "Session",
"permissionObjectID": "abc",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder/test2.txt/"
}
]
}
ClearFileSystem:
Input parameters
Key |
Type |
Description |
contentId |
Integer |
ID of the listed content repository |
folderPath |
String (optional) |
Path of the folder of the listed files |
{
"contentId": 3,
"folderPath": "MyFolder"
}
Output parameters
Key |
Type |
Description |
files |
Array |
Array of all files |
fileName |
String |
Name of the file |
mimeType |
Object |
MimeType information |
mimeType/extension |
String |
The file extension |
mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
url |
String |
The download URL of the file |
{
"files": [
{
"fileName": "test.txt",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder/test.txt/"
},
{
"name": "test2.txt",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder/test2.txt/"
}
]
}
Get
Slot |
Description |
contentFileGet |
This function queries |
FileSystem:
Input parameters
Key |
Type |
Description |
id |
Integer |
Primary key |
{
"id": 3
}
Output parameters
Key |
Type |
Description |
id |
Integer |
ID of the file |
folderId |
Integer |
ID of the parent folder |
name |
String |
Name of the file |
description |
String |
Description of the file |
permissionObjectType |
String |
Must be specified as ‘Session’ |
permissionObjectID |
String |
The ID of the Object Type can be freely selected |
securitySchemeID |
String |
Security scheme (‘public’/’private’) |
statusSchemeID |
String |
Status scheme (not implemented yet; always ‘default’) |
statusID |
String |
Status scheme (not implemented yet; always ‘default’) |
data |
String |
Base64 encoded content of the file |
mimeType |
Object |
MimeType information |
mimeType/extension |
String |
The file extension |
mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
url |
String |
The download URL of the file |
{
"id": 3,
"folderId": 5,
"name": "test.txt",
"description": "My file description",
"statusSchemeID": "Default",
"statusID": "Default",
"securitySchemeID": "public",
"permissionObjectType": "Session",
"permissionObjectID": "abc",
"data": "dGVzdA==",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder/test.txt/"
}
ClearFileSystem:
Input parameters
Key |
Type |
Description |
contentId |
Integer |
ID of the listed content repository |
filePath |
String |
Path of the file |
{
"contentId": 3,
"filePath": "MyFolder/test.txt"
}
Output parameters
Key |
Type |
Description |
filePath |
String |
File name |
data |
String |
Base64 encoded content of the file |
length |
Integer |
Length of the file in bytes |
mimeType |
Object |
MimeType information |
mimeType/extension |
String |
The file extension |
mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
url |
String |
The download URL of the file |
{
"filePath": "MyFolder/test.txt",
"data": "dGVzdA==",
"length": 59570,
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyFolder/test.txt/"
}
Get Metadata
Slot |
Description |
contentFileGetMetadata |
This function queries the metadata |
FileSystem:
Input parameters
Key |
Type |
Description |
id |
Integer |
Primary key |
{
"id": 3
}
Output parameters
Key |
Type |
Description |
id |
Integer |
ID of the file |
folderId |
Integer |
ID of the parent folder |
name |
String |
File name |
description |
String |
Description of the file |
permissionObjectType |
String |
Must be specified as ‘Session’ |
permissionObjectID |
String |
The ID of the Object Type can be freely selected |
securitySchemeID |
String |
Security scheme (‘public’/’private’) |
statusSchemeID |
String |
Status scheme (not implemented yet; always ‘default’) |
statusID |
String |
Status scheme (not implemented yet; always ‘default’) |
mimeType |
Object |
MimeType information |
mimeType/extension |
String |
The file extension |
mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
url |
String |
The download URL of the file |
{
"id": 3,
"folderId": 5,
"name": "test.txt",
"description": "My file description",
"statusSchemeID": "Default",
"statusID": "Default",
"securitySchemeID": "public",
"permissionObjectType": "Session",
"permissionObjectID": "abc",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder/test.txt"
}
ClearFileSystem:
Input parameters
Key |
Type |
Description |
contentId |
Integer |
ID of the listed content repository |
filePath |
String |
Path of the file |
{
"contentId": 3,
"filePath": "MyFolder/test.txt"
}
Output parameters
Key |
Type |
Description |
filePath |
String |
File name |
mimeType |
Object |
MimeType information |
mimeType/extension |
String |
The file extension |
mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
url |
String |
The download URL of the file |
{
"filePath": "MyFolder/test.txt",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyFolder/test.txt"
}
Get Metadata batched
Slot |
Description |
contentFileGetMetadataBatched |
This function queries the metadata batched |
FileSystem:
Input parameters
Key |
Type |
Description |
contentId |
Integer |
ID of the repository in which the files are stored |
files |
Array[Object] |
A list of file objects |
files/id |
Integer |
ID of the file |
{
"contentId": 1,
"files": [{
"id": 1
},
{
"id": 2
}]
}
Output parameters
Key |
Type |
Description |
fileMetadata |
Array[Object] |
A list of metadata objects |
fileMetadata/id |
Integer |
ID of the file |
fileMetadata/folderId |
Integer |
ID of the parent folder |
fileMetadata/name |
String |
Name of the file |
fileMetadata/description |
String |
Description of the file |
fileMetadata/permissionObjectType |
String |
Must be specified as ‘Session’ |
fileMetadata/permissionObjectID |
String |
The ID of the Object Type can be freely selected |
fileMetadata/securitySchemeID |
String |
Security scheme (‘public’/’private’) |
fileMetadata/statusSchemeID |
String |
Status scheme (not implemented yet; always ‘default’) |
fileMetadata/statusID |
String |
Status scheme (not implemented yet; always ‘default’) |
fileMetadata/mimeType |
Object |
MimeType information |
fileMetadata/mimeType/extension |
String |
The file extension |
fileMetadata/mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
fileMetadata/url |
String |
The download URL of the file |
{
fileMetadata: [{
"id": 1,
"folderId": 5,
"name": "test.txt",
"description": "My file description",
"statusSchemeID": "Default",
"statusID": "Default",
"securitySchemeID": "public",
"permissionObjectType": "Session",
"permissionObjectID": "abc",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder/test.txt"
},
{
"id": 2,
"folderId": 3,
"name": "picture.jpg",
"description": "My file description",
"statusSchemeID": "Default",
"statusID": "Default",
"securitySchemeID": "public",
"permissionObjectType": "Session",
"permissionObjectID": "abc",
"mimeType": {
"extension": "jpg",
"mimeType": "picture"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/MyParentFolder/MyChildFolder2/picture.jpg"
}]
}
ClearFileSystem:
Input parameters
Key |
Type |
Description |
contentId |
Integer |
ID of the listed content repository |
files |
Array[Object] |
A list of file objects |
files/filePath |
String |
Path of the file |
{
"contentId": 6,
"files": [{
"filePath": "Folder/picture.jpg"
},
{
"filePath": "Folder2/text.txt"
}]
}
Output parameters
Key |
Type |
Description |
fileMetadata |
Array[Object] |
A list of metadata object |
fileMetadata/filePath |
String |
File name |
fileMetadata/mimeType |
Object |
MimeType information |
fileMetadata/mimeType/extension |
String |
The file extension |
fileMetadata/mimeType/mimeType |
String |
The mimeType stored in the MimeMapping for the file extension |
fileMetadata/url |
String |
The download URL of the file |
{
fileMetadata: [{
"filePath": "Folder/picutre.jpg",
"mimeType": {
"extension": "jpg",
"mimeType": "picture"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/Folder/picture.jpg"
},
{
"filePath": "Folder2/test.txt",
"mimeType": {
"extension": "txt",
"mimeType": "text"
},
"url": "http://localhost:8080/client/2.0/plugin/contentRepoPlugin/file/RepoName/Folder2/test.txt"
}]
}
Edit
Slot |
Description |
contentFileEdit |
This function edits a content file |
FileSystem:
Input parameters
Key |
Type |
Description |
id |
Integer |
ID of the data to be processed |
name |
String |
File name (also used to determine the MimeType) |
description |
String (Optional) |
Description of the file |
securitySchemeID |
String |
‘public’: file is public, ‘private’: file is not public |
permissionObjectType |
String |
Must be specified as ‘Session’ |
permissionObjectID |
String |
The ID of the Object Type can be freely selected |
data |
String |
Base64 encoded content of the file |
{
"id" : 5,
"name" : "test.txt",
"description": "My new file description",
"securitySchemeID" : "public",
"permissionObjectType" : "Session",
"permissionObjectID" : "abc",
"data" : "dGVzdA=="
}
ClearFileSystem:
Input parameters
Key |
Type |
Description |
contentId |
Integer |
ID of the content repository in which the file is stored |
sourceFilePath |
String |
Path of the file to be edited |
destFilePath |
String |
Path incl. new name under which the file is to be stored |
forceOverwrite |
Boolean (optional) |
If the flag has the value ‘true’, any existing file with the same name will be overwritten;
If not set or ‘false’, the creation leads to an error if a file with the same name already exists |
{
"contentId" : 5,
"sourceFilePath" : "MyParentFolder/test.txt",
"destFilePath": "MyParentFolder/MyChildFolder/myRenamedMovedFile.txt"
}
Delete
Slot |
Description |
contentFileDelete |
This function deletes a content file |
FileSystem:
Input parameters
Key |
Type |
Description |
id |
Integer |
Primary key |
{
"id": 15
}
ClearFileSystem:
Input parameters
Key |
Type |
Description |
contentId |
Integer |
ID of the content repository in which the file is stored |
filePath |
String |
Path of the file to be deleted |
{
"contentId": 10,
"filePath" : "MyFolder/myFile.txt"
}