AnsweredAssumed Answered

Uploading files via REST API

Question asked by Dirk Sachse on Feb 27, 2019


Hi,

I would like to upload files via the REST API and I m not sure if it even works.

 

The documentation says:

 

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:

 

1This PUT body does not contain data.

 

 

Parameters

namedescriptiontype
pathIdThe 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

 

 

 

My command looks like this:

 

curl -k -s --basic -u admin:password -X PUT http://localhost:8080/pentaho/api/repo/files/:home:test.kjb

 

I get this response:

 

ExceptionOnCreatingFile: File with the name "b_TEST_MONITOR.kjb" will be created.

 

I m not even sure if the API call does what I need. I have a bunch of KJB file which I need to upload to the server. Is this the right API call or do I overlook something? And is this feature even working properly?

 

Thanks and Regards

Dirk

Outcomes