List or Download Files

get

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

Returns a list of files, or downloads the specified file. To list files, use Accept='application/json' for the Accept header. To download, use Accept='application/octet-stream' for the Accept header.

Request

Path Parameters
  • Pattern: .+

    Catalog path, starting with applications, shared, or users. If listing files, this is the folder path. If downloading files, this is the file path.

    Examples:

    • applications/sample
    • shared
    • users/ksmith
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

OK

Response type can be either JSON/XML or stream, depending on the Accept header. If Accept=application/json or Accept=application/xml, the response lists files and current folder details. If Accept=application/octet-stream, the response is returned as a stream. If query parameters include action=validateUpload and Accept='application/json' or Accept='application/xml', the response is empty.

Body ()
Root Schema : CollectionResponse
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : properties
Type: object
Additional Properties Allowed
Show Source
Nested Schema : items
Type: object

400 Response

Bad Request

Logged in user may not have appropriate permissions, or the file may already exist when query parameters include action=validateUpload and Accept='application/json' or Accept='application/xml'.

500 Response

Internal Server Error.

Back to Top

Examples

The following examples show how to list or download files.

This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat.

cURL Command ? User Files

The following example shows how to list or download files from a user directory.

curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/files/users/power1?overwrite=false&recursive=false" -H "accept: application/json" -u %User%:%Password%

Example of Response Body

{
  "currentFolder": {
    "name": "power1",
    "fullPath": "/users/power1",
    "type": "folder",
    "permissions": {
      "addFolder": true,
      "addFile": true
    }
  },
  "items": [
    {
      "name": "groups.csv",
      "fullPath": "/users/power1/groups.csv",
      "type": "csv",
      "modifiedTime": 1585088753000,
      "sizeInBytes": 50,
      "permissions": {
        "delete": true
      },
      "links": [
        {
          "rel": "download",
          "href": "https://myserver.example.com:9001/essbase/rest/v1/files/users/power1/groups.csv",
          "method": "GET",
          "type": "application/octet-stream"
        }
      ]
    },
    {
      "name": "testexamp.txt",
      "fullPath": "/users/power1/testexamp.txt",
      "type": "txt",
      "modifiedTime": 1585088753000,
      "sizeInBytes": 1074,
      "permissions": {
        "delete": true
      },
      "links": [
        {
          "rel": "download",
          "href": "https://myserver.example.com:9001/essbase/rest/v1/files/users/power1/testexamp.txt",
          "method": "GET",
          "type": "application/octet-stream"
        }
      ]
    }
  ]
}

cURL Command ? Cube Files

The following example shows how to list or download files from an Essbase cube directory.

curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/files/applications/Sample/Basic?overwrite=false&recursive=false&links=none" -H "accept: application/json" -o output_listfiles.json -u %User%:%Password%

Example of Response Body

{
  "currentFolder": {
    "name": "Basic",
    "fullPath": "/applications/Sample/Basic",
    "type": "folder",
    "permissions": {
      "addFile": true
    }
  },
  "items": [
    {
      "name": "CalcAll.csc",
      "fullPath": "/applications/Sample/Basic/CalcAll.csc",
      "type": "csc",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 64,
      "permissions": {
        "delete": true
      },
    {
      "name": "CDSSampl.xml",
      "fullPath": "/applications/Sample/Basic/CDSSampl.xml",
      "type": "xml",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 34467,
      "permissions": {
        "delete": true
      },
    {
      "name": "copy.csc",
      "fullPath": "/applications/Sample/Basic/copy.csc",
      "type": "csc",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 84,
      "permissions": {
        "delete": true
      },
    {
      "name": "Count.csc",
      "fullPath": "/applications/Sample/Basic/Count.csc",
      "type": "csc",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 355,
      "permissions": {
        "delete": true
      },
    {
      "name": "Data.rul",
      "fullPath": "/applications/Sample/Basic/Data.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1255,
      "permissions": {
        "delete": true
      },
    {
      "name": "Data_Basic.txt",
      "fullPath": "/applications/Sample/Basic/Data_Basic.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 337898,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Caffeinated.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Caffeinated.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1032,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Caffeinated.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Caffeinated.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 150,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Intro_Date.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Intro_Date.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1029,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Intro_Date.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Intro_Date.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 360,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Market.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Market.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1503,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Market.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Market.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 2560,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Measures.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Measures.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1896,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Measures.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Measures.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 2224,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Ounces.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Ounces.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1017,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Ounces.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Ounces.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 158,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Pkg_Type.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Pkg_Type.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1023,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Pkg_Type.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Pkg_Type.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 217,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Population.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Population.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1149,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Population.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Population.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 863,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Product.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Product.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1920,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Product.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Product.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 2995,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Scenario.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Scenario.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1517,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Scenario.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Scenario.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 497,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Year.rul",
      "fullPath": "/applications/Sample/Basic/Dim_Year.rul",
      "type": "rul",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1254,
      "permissions": {
        "delete": true
      },
    {
      "name": "Dim_Year.txt",
      "fullPath": "/applications/Sample/Basic/Dim_Year.txt",
      "type": "txt",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 1221,
      "permissions": {
        "delete": true
      },
    {
      "name": "MCDSSamp.xml",
      "fullPath": "/applications/Sample/Basic/MCDSSamp.xml",
      "type": "xml",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 4029,
      "permissions": {
        "delete": true
      },
    {
      "name": "Rank.csc",
      "fullPath": "/applications/Sample/Basic/Rank.csc",
      "type": "csc",
      "modifiedTime": 1574369590371,
      "sizeInBytes": 188,
      "permissions": {
        "delete": true
      },
    }
  ]
}
Back to Top