This service provides methods for listing, creating, downloading, uploading, and removal of files.
The following resources are applicable:
- /repo/files/{pathId }
- /repo/files/{pathId }/acl
- /repo/files/{pathId }/canAccess
- /repo/files/{pathId }/canAccessMap
- /repo/files/{pathId }/children
- /repo/files/{pathId }/createDir
- /repo/files/{pathId }/deleteLocale
- /repo/files/{pathId }/download
- /repo/files/{pathId }/generatedContent
- /repo/files/{pathId }/generatedContentForUser
- /repo/files/{pathId }/inline
- /repo/files/{pathId }/localeProperties
- /repo/files/{pathId }/locales
- /repo/files/{pathId }/metadata
- /repo/files/{pathId }/properties
- /repo/files/{pathId }/rename
- /repo/files/{pathId }/tree
- /repo/files/canAdminister
- /repo/files/canCreate
- /repo/files/children
- /repo/files/deleted
- /repo/files/generatedContentForSchedule
- /repo/files/pathsAccessList
- /repo/files/properties
- /repo/files/reservedCharacters
- /repo/files/reservedCharactersDisplay
- /repo/files/tree
/repo/files/{pathId }
PUT
Creates a new file with the provided contents at a given path.
Example Request:
PUT pentaho/api/repo/files/:jmeter-test:test_file_1.xml
PUT data:
This PUT body does not contain data.
Parameters
name | description | type |
---|---|---|
pathId | The path from the root folder to the root node of the tree to return using colon characters in place of / or \ characters. To clarify /path/to/file, the encoded pathId would be :path:to:file. | path |
Request Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
An Input Stream with the contents of the file to be created.
Response Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
This response does not contain data.
Status Codes
code | description |
---|---|
200 | Successfully created the file. |
403 | Failure to create the file due to permissions, file already exists, or invalid path id. |
GET
Takes a pathId and returns a Response with the output stream based on the file located at the pathId.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
Response Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
This response does not contain data.
Status Codes
code | description |
---|---|
200 | Successfully get the file or directory. |
404 | Failed to find the file or resource. |
500 | Failed to open content. |
/repo/files/{pathId }/acl
PUT
This method is used to update and save the acls of the selected file to the repository.
Example Request:
PUT pentaho/api/repo/files/:jmeter-test:test_file_1.xml/acl
PUT data:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><repositoryFileAclDto><entriesInheriting>true</entriesInheriting><id>d45d4972-989e-48d5-8bd0-f7024a77f08f</id><owner>admin</owner><ownerType>0</ownerType></repositoryFileAclDto>
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
Request Body
element: | repositoryFileAclDto |
media types: | application/xml application/json |
Acl of the repository file RepositoryFileAclDto.
Response Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
This response does not contain data.
Status Codes
code | description |
---|---|
200 | Successfully saved file. |
403 | Failed to save acls due to missing or incorrect properties. |
400 | Failed to save acls due to malformed xml. |
500 | Failed to save acls due to another error. |
GET
Retrieves the ACL settings of the requested repository file in either xml or json format.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml/acl
Parameters
name | description | type |
---|---|---|
pathId | colon separated path for the repository file. | path |
Response Body
element: | repositoryFileAclDto |
media types: | application/xml application/json |
RepositoryFileAclDto object containing the ACL settings of the requested file.
Example Response:
<repositoryFileAclDto> <aces> <modifiable>true</modifiable> <permissions>4</permissions> <recipient>admin</recipient> <recipientType>0</recipientType> </aces> <aces> <modifiable>false</modifiable> <permissions>4</permissions> <recipient>Administrator</recipient> <recipientType>1</recipientType> </aces> <entriesInheriting>true</entriesInheriting> <id>068390ba-f90d-46e3-8c55-bbe55e24b2fe</id> <owner>admin</owner> <ownerType>0</ownerType> </repositoryFileAclDto>
Status Codes
code | description |
---|---|
200 | Returns the requested file permissions in xml or json format |
500 | File failed to be retrieved. This could be caused by an invalid path, or the file does not exist. |
/repo/files/{pathId }/canAccess
GET
Check whether the current user has specific permission on the selected repository file.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml/canAccess?permissions=1
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
permissions | Pipe separated list of permissions. | query |
Response Body
element: | (custom) |
media types: | text/plain |
String "true" if the user has requested permissions on the file, or "false" otherwise.
Example Response:
true
Status Codes
code | description |
---|---|
200 | Successfully retrieved the permissions of the given paths. |
500 | Unable to retrieve the permissions of the given paths due to some other error. |
/repo/files/{pathId }/canAccessMap
GET
Checks whether the current user has permissions to the selected files. This can check for more than one permission at once but will only return true if all permissions checked are valid.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.txt/canAccessMap?permissions=1
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
permissions | Pipe separated permissions to be checked. | query |
Response Body
element: | (custom) |
media types: | application/xml application/json |
List of permissions for the selected files.
Example Response:
{"setting":[{"name":"1","value":"true"}]}
Status Codes
code | description |
---|---|
200 | Successfully retrieved the permissions of the file. |
500 | Unable to retrieve the permissions of the file due to some other error. |
/repo/files/{pathId }/children
GET
Retrieve a list of child files from the selected repository path of the repository.
Example Request:
GET pentaho/api/repo/files/:jmeter-test/children
Parameters
name | description | type |
---|---|---|
pathId | The path from the root folder to the root node of the tree to return using colon characters in place of / or \ characters. To clarify /path/to/file, the encoded pathId would be :path:to:file. | path |
filter | Filter to be applied for search. The filter can be broken down into 3 parts; File types, Child Node Filter, and Member Filters. Each part is separated with a pipe (|) character. File Types are represented by a word phrase. This phrase is recognized as a file type phrase and processed accordingly. Valid File Type word phrases include "FILES", "FOLDERS", and "FILES_FOLDERS" and denote whether to return files, folders, or both files and folders, respectively. The Child Node Filter is a list of allowed names of files separated by the pipe (|) character. Each file name in the filter may be a full name or a partial name with one or more wildcard characters ("*"). The filter does not apply to root node. The Member Filter portion of the filter parameter allows the caller to specify which properties of the metadata to return. Member Filters start with "includeMembers=" or "excludeMembers=" followed by a list of comma separated field names that are to be included in, or, excluded from, the list. Valid field names can be found in org.pentaho.platform.repository2.unified.webservices#RepositoryFileAdapter. Omission of a member filter will return all members. It is invalid to both and includeMembers= and an excludeMembers= clause in the same service call. | query |
showHidden | Include or exclude hidden files from the file list. | query |
includeAcls | Include permission information about the file in the output. | query |
Response Body
element: | (custom) |
media types: | application/xml application/json |
A RepositoryFileTreeDto object containing the files at the selected repository path of the repository. Will return files but not folders under the "/" folder. The fields returned will include the name, filesize, description, id and title.
Example Response:
<repositoryFileTreeDto> <children> <file> <createdDate>1405356318621</createdDate> <fileSize>-1</fileSize> <folder>true</folder> <hidden>false</hidden> <id>fileId;/id> <locale>en</locale> <locked>false</locked> <name>admin</name> <ownerType>-1</ownerType> <path>/path/to/dir</path> <title>admin</title> <versioned>false</versioned> </file> </children> </repositoryFileTreeDto>
Status Codes
code | description |
---|---|
200 | Successfully retrieved the list of child files from selected repository path of the repository. |
500 | Server Error. |
/repo/files/{pathId }/createDir
PUT
Creates a new folder with the specified name.
Example Request:
PUT pentaho/api/repo/files/:public:jmeter-test-dir/createDir
PUT data:
This PUT body does not contain data.
Parameters
name | description | type |
---|---|---|
pathId | The path from the root folder to the root node of the tree to return using colon characters in place of / or \ characters. To clarify /path/to/file, the encoded pathId would be :path:to:file. | path |
Response Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
This response does not contain data.
Status Codes
code | description |
---|---|
200 | Successfully created folder. |
409 | Path already exists. |
500 | Server Error. |
/repo/files/{pathId }/deleteLocale
PUT
Delete the locale for the selected file.
Example Request:
PUT pentaho/api/repo/files/:jmeter-test:test_file_1.xml/deleteLocale?locale=ja
PUT data:
This PUT body does not contain data.
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
locale | A string representations of the locale to be deleted. | query |
Response Body
element: | (custom) |
media types: | application/xml application/json |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
This response does not contain data.
Status Codes
code | description |
---|---|
200 | Successfully deleted the locale. |
500 | Unable to delete the locale properties due to some other error. |
/repo/files/{pathId }/download
GET
Download the selected file or folder from the repository. In order to download file from the repository, the user needs to have Publish action. How the file comes down to the user and where it is saved is system and browser dependent.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml/download?locale=de
Parameters
name | description | type |
---|---|---|
user-agent | A string representing the type of browser to use. Currently only applicable if contains 'FireFox' as FireFox requires a header with encoding information (UTF-8) and a quoted filename, otherwise encoding information is not supplied and the filename is not quoted. | header |
pathId | Colon separated path for the repository file. | path |
withManifest | true or false (download file with manifest). Defaults to true (include manifest) if this string can't be directly parsed to 'false' (case sensitive). This argument is only used if a directory is being downloaded. | query |
Response Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
Encrypted file stream
Status Codes
code | description |
---|---|
200 | Successful download. |
400 | Usually a bad pathId. |
403 | pathId points at a file the user doesn't have access to. |
404 | File not found. |
500 | Failed to download file for another reason. |
/repo/files/{pathId }/generatedContent
GET
Retrieve the list of executed contents for a selected content from the repository.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml/generatedContent?locale=de
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the destination for files to be copied. | path |
Response Body
element: | (custom) |
media types: | application/xml application/json |
A list of RepositoryDto objects containing the executed contents for a selected content from the repository.
Example Response:
<List> <repositoryFileDto> <createdDate>1402911997019</createdDate> <fileSize>3461</fileSize> <folder>false</folder> <hidden>false</hidden> <id>ff11ac89-7eda-4c03-aab1-e27f9048fd38</id> <lastModifiedDate>1406647160536</lastModifiedDate> <locale>en</locale> <localePropertiesMapEntries> <localeMapDto> <locale>default</locale> <properties> <stringKeyStringValueDto> <key>file.title</key> <value>myFile</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>jcr:primaryType</key> <value>nt:unstructured</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>title</key> <value>myFile</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>file.description</key> <value>myFile Description</value> </stringKeyStringValueDto> </properties> </localeMapDto> </localePropertiesMapEntries> <locked>false</locked> <name>myFile.prpt</name></name> <originalParentFolderPath>/public/admin</originalParentFolderPath> <ownerType>-1</ownerType> <path>/public/admin/ff11ac89-7eda-4c03-aab1-e27f9048fd38</path> <title>myFile</title> <versionId>1.9</versionId> <versioned>true</versioned> </repositoryFileAclDto> </List>
Status Codes
code | description |
---|---|
200 | Successfully retrieved the list of RepositoryFileDto objects. |
200 | Empty list of RepositoryFileDto objects. |
/repo/files/{pathId }/generatedContentForUser
GET
Retrieve the executed contents for a selected repository file and a given user.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml/generatedContentForUser?user=admin
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the destination for files to be copied. | path |
user | The username for the generated content folder. | query |
Response Body
element: | (custom) |
media types: | application/xml application/json |
A list of RepositoryDto objects containing the executed contents for a selected file from the repository.
Example Response:
<List> <repositoryFileDto> <createdDate>1402911997019</createdDate> <fileSize>3461</fileSize> <folder>false</folder> <hidden>false</hidden> <id>ff11ac89-7eda-4c03-aab1-e27f9048fd38</id> <lastModifiedDate>1406647160536</lastModifiedDate> <locale>en</locale> <localePropertiesMapEntries> <localeMapDto> <locale>default</locale> <properties> <stringKeyStringValueDto> <key>file.title</key> <value>myFile</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>jcr:primaryType</key> <value>nt:unstructured</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>title</key> <value>myFile</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>file.description</key> <value>myFile Description</value> </stringKeyStringValueDto> </properties> </localeMapDto> </localePropertiesMapEntries> <locked>false</locked> <name>myFile.prpt</name></name> <originalParentFolderPath>/public/admin</originalParentFolderPath> <ownerType>-1</ownerType> <path>/public/admin/ff11ac89-7eda-4c03-aab1-e27f9048fd38</path> <title>myFile</title> <versionId>1.9</versionId> <versioned>true</versioned> </repositoryFileAclDto> </List>
Status Codes
code | description |
---|---|
200 | Successfully retrieved the list of RepositoryFileDto objects. |
200 | Empty list of RepositoryFileDto objects. |
500 | Server Error. |
/repo/files/{pathId }/inline
GET
Retrieves the file from the repository as inline. This is mainly used for css and dependent files for the html document.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml/inline
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
Response Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><repositoryFileAclDto><entriesInheriting>true</entriesInheriting><id>d45d4972-989e-48d5-8bd0-f7024a77f08f</id><owner>admin</owner><ownerType>0</ownerType></repositoryFileAclDto>
Status Codes
code | description |
---|---|
200 | Successfully retrieved file. |
403 | Failed to retrieve file due to permission problem. |
404 | Failed to retrieve file due because file was not found. |
500 | Failed to download file because of some other error. |
/repo/files/{pathId }/localeProperties
GET
Retrieve the list of locale properties for a given locale.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml/localeProperties?locale=ja
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
locale | The specified locale. | query |
Response Body
element: | (custom) |
media types: | application/xml application/json |
A list of locale properties.
Example Response:
<stringKeyStringValueDtoes> <stringKeyStringValueDto> <key>file.title</key> <value>File Title</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>jcr:primaryType</key> <value>nt:unstructured</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>title</key> <value>File Title</value> </stringKeyStringValueDto> </stringKeyStringValueDtoes>
Status Codes
code | description |
---|---|
200 | Successfully retrieved locale properties. |
500 | Unable to retrieve locale properties due to some other error. |
PUT
Save list of locale properties for a given locale.
Example Request:
PUT pentaho/api/repo/files/:jmeter-test:test_file_1.xml/localeProperties?locale=ja
PUT data:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stringKeyStringValueDtoes><stringKeyStringValueDto><key>file.title</key><value>ãã£ã¼ãé¸æãªã¹ã</value></stringKeyStringValueDto><stringKeyStringValueDto><key>jcr:primaryType</key><value>nt:unstructured</value></stringKeyStringValueDto><stringKeyStringValueDto><key>file.description</key><value>è¤æ°ã®ãã£ã¼ãã¿ã¤ãã表示ãã¾ã</value></stringKeyStringValueDto></stringKeyStringValueDtoes>
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
locale | A string representation of the locale to set properties on. | query |
Request Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
The list of locale properties.
Response Body
element: | (custom) |
media types: | application/xml application/json |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
This response does not contain data.
Status Codes
code | description |
---|---|
200 | Successfully updated locale properties. |
500 | Unable to update locale properties due to some other error. |
/repo/files/{pathId }/locales
GET
Retrieves the list of locale maps for the selected repository file.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml/locales
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
Response Body
element: | (custom) |
media types: | application/xml application/json |
List Example Response:
<localePropertiesMapEntries>
<localeMapDto>
<locale>default</locale>
<properties>
<stringKeyStringValueDto>
<key>file.title</key>
<value>myFile</value>
</stringKeyStringValueDto>
<stringKeyStringValueDto>
<key>jcr:primaryType</key>
<value>nt:unstructured</value>
</stringKeyStringValueDto>
<stringKeyStringValueDto>
<key>title</key>
<value>myFile</value>
</stringKeyStringValueDto>
<stringKeyStringValueDto>
<key>file.description</key>
<value>myFile Description</value>
</stringKeyStringValueDto>
</properties>
</localeMapDto>
</localePropertiesMapEntries>
Status Codes
code | description |
---|---|
200 | Successfully retrieved locale information. |
404 | Failed to retrieve locales because the file was not found. |
500 | Unable to retrieve locales due to some other error. |
/repo/files/{pathId }/metadata
GET
Retrieve the metadata of the selected file. Even though the hidden flag is a property of the file node itself, and not the metadata child, it is considered metadata from PUC and is included in the setMetadata call.
Example Request:
GET pentaho/api/repo/files/:jmeter-test:test_file_1.xml/metadata
Parameters
name | description | type |
---|---|---|
pathId | The path from the root folder to the root node of the tree to return using colon characters in place of / or \ characters. To clarify /path/to/file, the encoded pathId would be :path:to:file. | path |
Response Body
element: | (custom) |
media types: | application/json |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
<stringKeyStringValueDtos> <stringKeyStringValueDto> <key>KEY<key> <value>KEY<value> </stringKeyStringValueDto> </stringKeyStringValueDtos>
Status Codes
code | description |
---|---|
200 | Successfully retrieved metadata. |
403 | Invalid path. |
500 | Server Error. |
PUT
Store the metadata of the selected file. Even though the hidden flag is a property of the file node itself, and not the metadata child, it is considered metadata from PUC and is included in the setMetadata call.
Example Request:
PUT pentaho/api/repo/files/:jmeter-test:test_file_1.xml/metadata
PUT data:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stringKeyStringValueDtoes><stringKeyStringValueDto><key>metadata.key.1</key><value>metadata.value.1</value></stringKeyStringValueDto></stringKeyStringValueDtoes>
Parameters
name | description | type |
---|---|---|
pathId | The path from the root folder to the root node of the tree to return using colon characters in place of / or \ characters. To clarify /path/to/file, the encoded pathId would be :path:to:file. | path |
Request Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
A list of StringKeyStringValueDto objects.
Response Body
element: | (custom) |
media types: | application/xml application/json |
A jax-rs Response object with the appropriate status code, header, and body.
Example Response:
This response does not contain data.
Status Codes
code | description |
---|---|
200 | Successfully retrieved metadata. |
403 | Invalid path. |
400 | Invalid payload. |
500 | Server Error. |
/repo/files/{pathId }/properties
GET
Retrieves the properties of a selected repository file.
Example Request:
GET pentaho/api/repo/files/:/properties
Parameters
name | description | type |
---|---|---|
pathId | Colon separated path for the repository file. | path |
Response Body
element: | repositoryFileDto |
media types: | application/xml application/json |
A RepositoryDto object containing the properties for the given file.
Example Response:
{ "createdDate":"1406732545857", "description":"description", "fileSize":"1234", "folder":"false", "hidden":"false", "id":"fileId", "lastModifiedDate":"1406732545858", "locale":"en", "localePropertiesMapEntries":[ { "locale":"default", "properties":[ {"key":"file.title","value":"afile"}, {"key":"description","value":"afile.prpti"}, {"key":"jcr:primaryType","value":"nt:unstructured"}, {"key":"title","value":"afile"}, {"key":"file.description","value":"afile.prpti"} ] } ], "locked":"false", "name":"filename", "ownerType":"-1","path":"pathToFile:filename", "title":"title","versioned":"false" }
Status Codes
code | description |
---|---|
200 | Successfully retrieved the properties for a file. |
204 | Invalid file path. |
/repo/files/{pathId }/rename
PUT
Rename the selected file.
Example Request:
PUT pentaho/api/repo/files/:jmeter-test:test_file_1.xml/rename?newName=test_file_8
PUT data:
This PUT body does not contain data.
Parameters
name | description | type |
---|---|---|
pathId | The path from the root folder to the root node of the tree to return using colon characters in place of / or \ characters. To clarify /path/to/file, the encoded pathId would be :path:to:file. | path |
newName | String indicating the new name of the file. | query |
Response Body
element: | (custom) |
media types: | */* application/xml application/octet-stream |
Response with 200 OK, if the file does not exist to be renamed the response will return 200 OK with the string "File to be renamed does not exist".
Example Response:
This response does not contain data.
Status Codes
code | description |
---|---|
200 | Successfully renamed file. |
200 | File to be renamed does not exist. |
/repo/files/{pathId }/tree
GET
Retrieve the recursive list of children of the selected repository file.
Example Request:
GET pentaho/api/repo/files/:public/tree?showHidden=false&filter=*|FILES&_=1389042244670
Parameters
name | description | type |
---|---|---|
pathId | The path from the root folder to the root node of the tree to return using colon characters in place of / or \ characters. To clarify /path/to/file, the encoded pathId would be :path:to:file. | path |
depth | How many level should the search go. | query |
filter | Filter to be applied for search. The filter can be broken down into 3 parts; File types, Child Node Filter, and Member Filters. Each part is separated with a pipe (|) character. File Types are represented by a word phrase. This phrase is recognized as a file type phrase and processed accordingly. Valid File Type word phrases include "FILES", "FOLDERS", and "FILES_FOLDERS" and denote whether to return files, folders, or both files and folders, respectively. The Child Node Filter is a list of allowed names of files separated by the pipe (|) character. Each file name in the filter may be a full name or a partial name with one or more wildcard characters ("*"). The filter does not apply to root node. The Member Filter portion of the filter parameter allows the caller to specify which properties of the metadata to return. Member Filters start with "includeMembers=" or "excludeMembers=" followed by a list of comma separated field names that are to be included in, or, excluded from, the list. Valid field names can be found in org.pentaho.platform.repository2.unified.webservices#RepositoryFileAdapter. Omission of a member filter will return all members. It is invalid to both and includeMembers= and an excludeMembers= clause in the same service call. | query |
showHidden | Include or exclude hidden files from the file list. | query |
includeAcls | Include permission information about the file in the output. | query |
Response Body
element: | repositoryFileTreeDto |
media types: | application/xml application/json |
A RepositoryFileTreeDto object containing the files at the root of the repository. Will return files but not folders under the "/" folder. The fields returned will include the name, filesize, description, id and title.
Example Response:
<repositoryFileTreeDto> <children> <file> <createdDate>1405356318621</createdDate> <fileSize>-1</fileSize> <folder>true</folder> <hidden>false</hidden> <id>fileId;/id> <locale>en</locale> <locked>false</locked> <name>admin</name> <ownerType>-1</ownerType> <path>/path/to/dir</path> <title>admin</title> <versioned>false</versioned> </file> </children> </repositoryFileTreeDto>
Status Codes
code | description |
---|---|
200 | Successfully retrieved the list of files from root of the repository. |
404 | Invalid parameters. |
500 | Server Error. |
/repo/files/canAdminister
GET
Checks to see if the current user is an administer of the platform and returns a boolean response.
Example Request:
GET pentaho/api/repo/files/canAdminister
Response Body
element: | (custom) |
media types: | text/plain |
String "true" if the user can administer the platform, or "false" otherwise.
Example Response:
true
Status Codes
code | description |
---|---|
200 | Successfully returns a boolean value, either true or false |
/repo/files/canCreate
GET
Checks the users permission to determine if that user can create new content in the repository.
Example Request:
GET pentaho/api/repo/files/canCreate
Response Body
element: | (custom) |
media types: | text/plain |
String "true" if the user can create new content, or "false" otherwise.
Example Response:
true
Status Codes
code | description |
---|---|
200 | Successfully returns true or false depending on the users permissions |
/repo/files/children
GET
Retrieve a list of child files from the root of the repository.
Example Request:
GET pentaho/api/repo/files/children?showHidden=false&filter=*|FILES&_=1389042244670
Parameters
name | description | type |
---|---|---|
filter | Filter to be applied for search. The filter can be broken down into 3 parts; File types, Child Node Filter, and Member Filters. Each part is separated with a pipe (|) character. File Types are represented by a word phrase. This phrase is recognized as a file type phrase and processed accordingly. Valid File Type word phrases include "FILES", "FOLDERS", and "FILES_FOLDERS" and denote whether to return files, folders, or both files and folders, respectively. The Child Node Filter is a list of allowed names of files separated by the pipe (|) character. Each file name in the filter may be a full name or a partial name with one or more wildcard characters ("*"). The filter does not apply to root node. The Member Filter portion of the filter parameter allows the caller to specify which properties of the metadata to return. Member Filters start with "includeMembers=" or "excludeMembers=" followed by a list of comma separated field names that are to be included in, or, excluded from, the list. Valid field names can be found in org.pentaho.platform.repository2.unified.webservices#RepositoryFileAdapter. Omission of a member filter will return all members. It is invalid to both and includeMembers= and an excludeMembers= clause in the same service call. | query |
showHidden | Include or exclude hidden files from the file list. | query |
includeAcls | Include permission information about the file in the output. | query |
Response Body
element: | (custom) |
media types: | application/xml application/json |
A RepositoryFileTreeDto object containing the files at the root of the repository. Will return files but not folders under the "/" folder. The fields returned will include the name, filesize, description, id and title.
Example Response:
<repositoryFileTreeDto> <children> <file> <createdDate>1405356318621</createdDate> <fileSize>-1</fileSize> <folder>true</folder> <hidden>false</hidden> <id>fileId;/id> <locale>en</locale> <locked>false</locked> <name>admin</name> <ownerType>-1</ownerType> <path>/path/to/dir</path> <title>admin</title> <versioned>false</versioned> </file> </children> </repositoryFileTreeDto>
Status Codes
code | description |
---|---|
200 | Successfully retrieved the list of child files from root of the repository. |
500 | Server Error. |
/repo/files/deleted
GET
Retrieve the list of files in the user's trash folder.
Example Request:
GET pentaho/api/repo/files/deleted
Response Body
element: | (custom) |
media types: | application/xml application/json |
A list of RepositoryDto objects containing the files in the trash folder of the repository.
Example Response:
<repositoryFileDtoes> <repositoryFileDto> <createdDate>1405356406448</createdDate> <deletedDate>1406573914167</deletedDate> <fileSize>10477</fileSize> <folder>false</folder> <hidden>false</hidden> <id>fileId</id> <lastModifiedDate>1405356406448</lastModifiedDate> <locale>en</locale> <localePropertiesMapEntries> <locale>default</locale> <properties> <key>file.title</key> <value>File Title</value> </properties> <properties> <key>jcr:primaryType</key> <value>nt:unstructured</value> </properties> <properties> <key>title</key> <value>filename</value> </properties> <properties> <key>file.description</key> <value /> </properties> </localePropertiesMapEntries> <locked>false</locked> <name>filename.ext</name> <originalParentFolderPath>/original/path/to/file</originalParentFolderPath> <ownerType>-1</ownerType> <path>/path/to/file</path> <title>File Title</title> <versionId>1.3</versionId> <versioned>true</versioned> </repositoryFileDto> </repositoryFileDtoes>
Status Codes
code | description |
---|---|
200 | Successfully retrieved the list of files from trash folder of the repository. |
500 | Server Error. |
/repo/files/generatedContentForSchedule
GET
Retrieve the list of execute content by lineage id.
Example Request:
GET pentaho/api/repo/files/generatedContentForSchedule?lineageId=
Parameters
name | description | type |
---|---|---|
lineageId | the path for the file. | query |
Response Body
element: | (custom) |
media types: | application/xml application/json |
list of RepositoryFileDto objects.
Example Response:
<List> <repositoryFileDto> <createdDate>1402911997019</createdDate> <fileSize>3461</fileSize> <folder>false</folder> <hidden>false</hidden> <id>ff11ac89-7eda-4c03-aab1-e27f9048fd38</id> <lastModifiedDate>1406647160536</lastModifiedDate> <locale>en</locale> <localePropertiesMapEntries> <localeMapDto> <locale>default</locale> <properties> <stringKeyStringValueDto> <key>file.title</key> <value>myFile</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>jcr:primaryType</key> <value>nt:unstructured</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>title</key> <value>myFile</value> </stringKeyStringValueDto> <stringKeyStringValueDto> <key>file.description</key> <value>myFile Description</value> </stringKeyStringValueDto> </properties> </localeMapDto> </localePropertiesMapEntries> <locked>false</locked> <name>myFile.prpt</name></name> <originalParentFolderPath>/public/admin</originalParentFolderPath> <ownerType>-1</ownerType> <path>/public/admin/ff11ac89-7eda-4c03-aab1-e27f9048fd38</path> <title>myFile</title> <versionId>1.9</versionId> <versioned>true</versioned> </repositoryFileAclDto> </List>
Status Codes
code | description |
---|---|
200 | Successfully got the generated content for schedule |
/repo/files/pathsAccessList
POST
Checks whether the current user has permissions to the provided list of paths.
Example Request:
POST pentaho/api/repo/files/pathsAccessList
POST data:
<?xml version="1.0" encoding="UTF-8"?> <stringListWrapper> <strings>/public</strings> </stringListWrapper>
Request Body
element: | stringListWrapper |
media types: | application/xml application/json |
Collection of Strings containing the paths to be checked.
Response Body
element: | (custom) |
media types: | application/xml application/json |
A collection of the permission settings for the paths.
Example Response:
<settings> <setting> <name> /public </name> <value> 0 </value> </setting> <setting> <name> /public </name> <value> 1 </value> </setting> </settings>
Status Codes
code | description |
---|---|
200 | Successfully retrieved the permissions of the given paths. |
500 | Unable to retrieve the permissions of the given paths due to some other error. |
/repo/files/properties
GET
Retrieves the properties of the root directory.
Example Request:
GET pentaho/api/repo/files/properties
Response Body
element: | repositoryFileDto |
media types: | application/xml application/json |
file properties object RepositoryFileDto for the root directory.
Example Response:
<repositoryFileDto> <createdDate>1406731649407</createdDate> <fileSize>-1</fileSize> <folder>true</folder> <hidden>false</hidden> <id>6d93372c-4908-47af-9815-3aa6307e392c</id> <locale>en</locale> <locked>false</locked> <name/> <ownerType>-1</ownerType> <path>/</path> <title/> <versioned>false</versioned> </repositoryFileDto>
Status Codes
code | description |
---|---|
200 | Successfully retrieved the properties of the root directory. |
404 | Unable to retrieve the properties of the root directory due to file not found error. |
500 | Unable to retrieve the properties of the root directory due to some other error. |
/repo/files/reservedCharacters
GET
Returns the list of reserved characters from the repository.
Example Request:
GET pentaho/api/repo/files/reservedCharacters
Response Body
element: | (custom) |
media types: | text/plain |
List of characters that are reserved by the repository.
Example Response:
"/ \"
Status Codes
code | description |
---|---|
200 | Successfully returns a list of repositroy reserved characters |
/repo/files/reservedCharactersDisplay
GET
Returns the list of reserved characters from the repository.
Example Request:
GET pentaho/api/repo/files/reservedCharactersDisplay
Response Body
element: | (custom) |
media types: | text/plain |
List of characters that are reserved by the repository.
Example Response:
"/, \, \t, \r, \nF"
Status Codes
code | description |
---|---|
200 | Successfully returns a list of repositroy reserved characters |
/repo/files/tree
GET
Retrieve the recursive list of files from root of the repository based on the filters provided.
Example Request:
GET pentaho/api/repo/files/tree?showHidden=false&filter=*|FILES&_=1389042244670
Parameters
name | description | type |
---|---|---|
depth | How many level should the search go. | query |
filter | Filter to be applied for search. The filter can be broken down into 3 parts; File types, Child Node Filter, and Member Filters. Each part is separated with a pipe (|) character. File Types are represented by a word phrase. This phrase is recognized as a file type phrase and processed accordingly. Valid File Type word phrases include "FILES", "FOLDERS", and "FILES_FOLDERS" and denote whether to return files, folders, or both files and folders, respectively. The Child Node Filter is a list of allowed names of files separated by the pipe (|) character. Each file name in the filter may be a full name or a partial name with one or more wildcard characters ("*"). The filter does not apply to root node. The Member Filter portion of the filter parameter allows the caller to specify which properties of the metadata to return. Member Filters start with "includeMembers=" or "excludeMembers=" followed by a list of comma separated field names that are to be included in, or, excluded from, the list. Valid field names can be found in org.pentaho.platform.repository2.unified.webservices#RepositoryFileAdapter. Omission of a member filter will return all members. It is invalid to both and includeMembers= and an excludeMembers= clause in the same service call. | query |
showHidden | Include or exclude hidden files from the file list. | query |
includeAcls | (no documentation provided) | query |
Response Body
element: | repositoryFileTreeDto |
media types: | application/xml application/json |
A RepositoryFileTreeDto object containing the files at the root of the repository. Will return files but not folders under the "/" folder. The fields returned will include the name, filesize, description, id and title.
Example Response:
<repositoryFileTreeDto> <children> <file> <createdDate>1405356318621</createdDate> <fileSize>-1</fileSize> <folder>true</folder> <hidden>false</hidden> <id>fileId;/id> <locale>en</locale> <locked>false</locked> <name>admin</name> <ownerType>-1</ownerType> <path>/path/to/dir</path> <title>admin</title> <versioned>false</versioned> </file> </children> </repositoryFileTreeDto>
Status Codes
code | description |
---|---|
200 | Successfully retrieved the list of files from root of the repository. |
404 | Invalid parameters. |
500 | Server Error. |