Get Application Datasource

get

/applications/{applicationName}/datasources/{datasourceName}

Returns details about the specified application-level datasource.

Request

Path Parameters
Back to Top

Response

200 Response

OK

Datasource details returned successfully.

400 Response

Bad Request

Failed to get Datasource details.

Back to Top

Examples

The following examples show how to get details about specific application-level Datasources. A Datasource can be associated with an external database, a file in the catalog, or another Essbase cube.

These examples use 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.

Script with cURL Command - Oracle Database

The following example gets details about a Datasource for Oracle Database, defined on application Sample.

call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/datasources/OracleDB_DS?links=none" -H Accept:application/json -u %User%:%Password%

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
  "name" : "OracleDB_DS",
  "description" : "Datasource for ORCL current month only",
  "connection" : "SAMPLE.OracleDB",
  "type" : "DB",
  "columns" : {
    "Column" : [ {
      "name" : "DIMENSION_PRODUCT",
      "type" : "STRING",
      "index" : 1,
      "system" : false
    }, {
      "name" : "DIMENSION_MARKET",
      "type" : "STRING",
      "index" : 2,
      "system" : false
    }, {
      "name" : "DIMENSION_YEAR",
      "type" : "STRING",
      "index" : 3,
      "system" : false
    }, {
      "name" : "DIMENSION_SCENARIO",
      "type" : "STRING",
      "index" : 4,
      "system" : false
    }, {
      "name" : "SALES",
      "type" : "DOUBLE",
      "index" : 5,
      "system" : false
    }, {
      "name" : "COGS",
      "type" : "DOUBLE",
      "index" : 6,
      "system" : false
    }, {
      "name" : "MARKETING",
      "type" : "DOUBLE",
      "index" : 7,
      "system" : false
    }, {
      "name" : "PAYROLL",
      "type" : "DOUBLE",
      "index" : 8,
      "system" : false
    }, {
      "name" : "MISC",
      "type" : "DOUBLE",
      "index" : 9,
      "system" : false
    }, {
      "name" : "INITIAL_INVENTORY",
      "type" : "DOUBLE",
      "index" : 10,
      "system" : false
    }, {
      "name" : "ADDITIONS",
      "type" : "DOUBLE",
      "index" : 11,
      "system" : false
    } ]
  },
  "query" : "select * from SB_DATA where dimension_year=?",
  "queryParameters" : [ {
    "index" : 1,
    "name" : "Param1",
    "required" : false,
    "useSubVariable" : true,
    "subVariableName" : "CurrMonth",
    "type" : "STRING"
  } ],
  "links" : [ ]
}

Script with cURL Command - Essbase

The following example gets details about a Datasource that is pointing to another Essbase cube.

call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/datasources/Essbase2_DS?links=none" -H Accept:application/json -u %User%:%Password%

Example of Response Body - Essbase

The following example shows the contents of the response body in JSON format.

{
  "name" : "Essbase2_DS",
  "description" : "Essbase instance 2",
  "connection" : "SAMPLE.Essbase2",
  "type" : "ESSBASE",
  "columns" : {
    "Column" : [ {
      "name" : "Product",
      "type" : "STRING",
      "index" : 1,
      "system" : false
    }, {
      "name" : "Market",
      "type" : "STRING",
      "index" : 2,
      "system" : false
    } ]
  },
  "query" : "SELECT\n  {Market}\nON COLUMNS,\n  {Product}\nON ROWS\nFROM Sample.Basic",
  "application" : "Sample",
  "cube" : "Basic",
  "queryParameters" : [ ],
  "links" : [ ]
}

Script with cURL Command - File

The following example gets details about a Datasource that is associated with a file in the catalog.

call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/applications/Sample/datasources/UserDetails_DS?links=none" -H Accept:application/json -u %User%:%Password%

Example of Response Body - File

The following example shows the contents of the response body in JSON format.

{
  "name" : "UserDetails_DS",
  "description" : "User details repository",
  "connection" : "SAMPLE.UserDetails",
  "type" : "DELIMITEDFILE",
  "delimiter" : "Comma",
  "headerRow" : 1,
  "startRow" : 1,
  "columns" : {
    "Column" : [ {
      "name" : "USERNAME",
      "type" : "STRING",
      "index" : 0,
      "system" : false
    }, {
      "name" : "COUNTRY",
      "type" : "STRING",
      "index" : 1,
      "system" : false
    }, {
      "name" : "COSTCENTER",
      "type" : "STRING",
      "index" : 2,
      "system" : false
    }, {
      "name" : "CURRENCY",
      "type" : "STRING",
      "index" : 3,
      "system" : false
    }, {
      "name" : "MANAGERNAME",
      "type" : "STRING",
      "index" : 4,
      "system" : false
    }, {
      "name" : "COMPANYNAME",
      "type" : "STRING",
      "index" : 5,
      "system" : false
    }, {
      "name" : "BUSINESSUNIT",
      "type" : "STRING",
      "index" : 6,
      "system" : false
    }, {
      "name" : "OFFICE",
      "type" : "STRING",
      "index" : 7,
      "system" : false
    } ]
  },
  "queryParameters" : [ ],
  "links" : [ ]
}
Back to Top