Get Global Datasource

get

/datasources/{datasourceName}

Returns details about the specified global 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 a specific global Datasource.

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

The following example gets details about a global Datasource named Orcl_DS.

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

Example of Response Body - Oracle Database

The following example shows the contents of the response body in JSON format when the Datasource is for Oracle Database.


{
  "name" : "Orcl_DS",
  "description" : "Datasource to Oracle Database",
  "connection" : "oraConn",
  "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" : [ ]
}

Example of Response Body - Essbase

The following example shows the contents of the response body in JSON format when the Datasource is for another Essbase cube.

{
  "name" : "EssbaseDS",
  "connection" : "essconn",
  "type" : "ESSBASE",
  "columns" : {
    "Column" : [ {
      "name" : "Measures",
      "type" : "STRING",
      "index" : 1,
      "system" : false
    }, {
      "name" : "Oregon",
      "type" : "STRING",
      "index" : 2,
      "system" : false
    }, {
      "name" : "Florida",
      "type" : "STRING",
      "index" : 3,
      "system" : false
    }, {
      "name" : "Utah",
      "type" : "STRING",
      "index" : 4,
      "system" : false
    } ]
  },
  "query" : "select {Sales} on rows, {Oregon, Florida, Utah} on columns",
  "application" : "Sample",
  "cube" : "Basic",
  "queryParameters" : [ ],
  "links" : [ ]
}

Example of Response Body - Excel Workbook

The following example shows the contents of the response body in JSON format when the Datasource is for an Excel file.

{
  "name" : "excelDS",
  "description" : "Datasource to Excel file",
  "connection" : "excel_conn",
  "type" : "EXCELFILE",
  "sheet" : "SpendHistory",
  "headerRow" : 1,
  "startRow" : 1,
  "columns" : {
    "Column" : [ {
      "name" : "Year",
      "type" : "STRING",
      "index" : 1,
      "system" : false
    }, {
      "name" : "Quarter",
      "type" : "STRING",
      "index" : 2,
      "system" : false
    }, {
      "name" : "Month",
      "type" : "STRING",
      "index" : 3,
      "system" : false
    }, {
      "name" : "Purchase Organization",
      "type" : "STRING",
      "index" : 4,
      "system" : false
    }, {
      "name" : "Category",
      "type" : "STRING",
      "index" : 5,
      "system" : false
    }, {
      "name" : "Product Name",
      "type" : "STRING",
      "index" : 6,
      "system" : false
    }, {
      "name" : "Org Name",
      "type" : "STRING",
      "index" : 7,
      "system" : false
    }, {
      "name" : "Suppliers",
      "type" : "STRING",
      "index" : 8,
      "system" : false
    }, {
      "name" : "Spend",
      "type" : "STRING",
      "index" : 9,
      "system" : false
    }, {
      "name" : "Addressable Spend",
      "type" : "STRING",
      "index" : 10,
      "system" : false
    }, {
      "name" : "Non-Addressable Spend",
      "type" : "STRING",
      "index" : 11,
      "system" : false
    }, {
      "name" : "Invoiced Quantity",
      "type" : "STRING",
      "index" : 12,
      "system" : false
    }, {
      "name" : "Invoiced Amount",
      "type" : "STRING",
      "index" : 13,
      "system" : false
    } ]
  },
  "queryParameters" : [ ],
  "links" : [ ]
}

Example of Response Body - Text File

The following example shows the contents of the response body in JSON format when the Datasource is for a delimited text file.

{
  "name" : "delimitedfile_DS",
  "description" : "Datasource to text file using custom delimiter",
  "connection" : "delimitedfile_conn",
  "type" : "DELIMITEDFILE",
  "delimiter" : "Custom",
  "customDelimiter" : "#",
  "headerRow" : 1,
  "startRow" : 1,
  "columns" : {
    "Column" : [ {
      "name" : "Product",
      "type" : "STRING",
      "index" : 0,
      "system" : false
    }, {
      "name" : "Scenario",
      "type" : "STRING",
      "index" : 1,
      "system" : false
    }, {
      "name" : "Measures",
      "type" : "STRING",
      "index" : 2,
      "system" : false
    }, {
      "name" : "Mar",
      "type" : "STRING",
      "index" : 3,
      "system" : false
    }, {
      "name" : "Apr",
      "type" : "STRING",
      "index" : 4,
      "system" : false
    } ]
  },
  "queryParameters" : [ ],
  "links" : [ ]
}
Back to Top