Upload File or Create Folder

put

/essbase/rest/v1/files/{path}

Uploads a file to Essbase.

Supported file types include text files, rules files, calculation script files, and MaxL script files.

If there is no content type, and a folder name is specified in the URL, a folder is created.

Request

Supported Media Types
Path Parameters
  • Pattern: .+

    Catalog path. If Content-Type=application/octet-stream, this is a file name. Otherwise, it is a folder name.

Query Parameters
  • Applicable only for adding a file. Overwriting folders is not supported.

    Default Value: false
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

OK

The file uploaded successfully (if Content-Type is application/octet-stream), or the folder was created successfully (if there is no Content-Type).

Body ()
Root Schema : GenericEntity
Type: object
Show Source
Nested Schema : entity
Type: object
Nested Schema : Type
Type: object
Show Source

400 Response

Bad Request

Logged in user may not have appropriate permissions, or the file or folder may already exist.

500 Response

Internal Server Error.

Back to Top

Examples

The following examples show 1) how to upload files to an Essbase cube directory, and 2) how to upload a file to a shared directory.

cURL Command 1

curl -X PUT "https://192.0.2.1:443/essbase/rest/v1/files/applications/Sample/Basic/Data_Basic.txt?overwrite=true" 
     -H "accept: application/json"

Response Body 1

[
  {
    "rel": "download",
    "href": "https://192.0.2.1:443/essbase/rest/v1/files/applications/Sample/Basic/Data_Basic.txt",
    "method": "GET",
    "type": "application/octet-stream"
  }
]

cURL Command 2

curl -X PUT "https://myserver.example.com:9001/essbase/rest/v1/files/shared/datafile.txt" -H Accept:application/json -H Content-Type:application/octet-stream --data-binary @datafile.txt -u %User%:%Password%

Response Body 2

[ {
  "rel" : "download",
  "href" : "https://myserver.example.com:9001/essbase/rest/v1/files/shared/datafile.txt",
  "method" : "GET",
  "type" : "application/octet-stream"
} ]
Back to Top