This service provides methods for listing, creating, downloading, uploading, and removal of files.

/repo/files/backup

GET

Performs a complete system back up of the Pentaho system. This includes content, schedules, users, roles, datasources, and the metastore.

Example Request:
GET pentaho/api/repo/files/backup

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

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

Successfully exported the existing Pentaho System

403

User does not have administrative permissions

500

Failure to complete the export.

/repo/files/systemRestore

POST

Performs a system restore of the Pentaho system. This includes content, schedules, users, roles, datasources, and the metastore.

Example Request:
POST pentaho/api/repo/files/systemRestore

Parameters

name

description

type

fileUpload

The zip file generated using the backup endpoint, used to do a full system restore.

formdata

overwrite

If kept at the default of true, overwrites any value found on the system with the matching value that is being imported. Values that exist on the system, but do not exist in the import will not be deleted.

When the overwrite flag is equal to false, any value that is found in the import process that already exists will not be imported.

boolean

Response Body

element:

(custom)

media types:

*/*
application/xml
application/octet-stream

A jax-rs Response object with the appropriate status code, header, and body.

Status Codes

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.

Response Body

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.

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.

Status Codes

/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.

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.

Parameters

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

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.

GET

Parameters

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.

Parameters

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

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.