Get Global Datasources
/essbase/rest/v1/datasources
Returns a list of global-level Datasources, including details such as name, description, connection, and type.
Request
-
limit: integer(int32)
Maximum number of Datasources to return. Default is 50.
Default Value:50
-
offset: integer(int32)
Number of Datasources to omit from the start of the result set.
Default Value:0
Response
- application/json
- application/xml
200 Response
OK
List of Datasources returned successfully.
object
-
application(required):
string
Applicable if the type of Datasource is ESSBASE. The Essbase application name.
-
columns(required):
object ColumnsType
-
connection(required):
string
Connection used for this Datasource.
-
cube(required):
string
Applicable if the type of Datasource is ESSBASE. The Essbase database name.
-
customDelimiter:
string
Custom delimiter of the data records, if the value provided for delimiter is
Custom
. -
delimeter:
string
Delimiter of the data records, if Datasource type is
DELIMITEDFILE
. Delimiter can beComma
for CSV format orTab
for tab-separated format. To use a custom delimiter, use valueCustom
, and provide the delimiter as a value to customDelimiter. -
description(required):
string
Optional description of this Datasource.
-
endRow:
integer(int64)
For a Datasource that is an Excel or text file, the ending row number.
-
headerRow:
integer(int64)
For a Datasource that is an Excel or text file, the header row number. 0 if there is no header.
-
headers:
array headers
-
ignoreErrorRecords:
boolean
-
links:
array links
-
name:
string
Datasource name. Must begin with a letter. Can contain only letters, underscore character, and digits.
-
query(required):
string
Query associated with the Datasource. For example, a SQL query for an external database, or an MDX query for another Essbase cube. The query selects which data you want to make available in this Datasource.
-
queryParameters:
array queryParameters
Parameter implementation details, if the Datasource query is parameterized. For example, if the query includes a
?
placeholder for passing a parameter, as in the following query:select * from profit_data where year=?
, then you need define the implementation details. -
sheet(required):
string
For a Datasource that is an Excel file, the worksheet name.
-
skipHiddenRows:
boolean
-
startRow(required):
integer(int64)
Optional (default is 1 if not given). For a Datasource that is an Excel or text file, the starting data row number, excluding headerRow if one exists. For example, if headerRow is specified as 1 and startRow is specified as 10, the actual starting data row will be 11.
-
type(required):
string
Allowed Values:
[ "TEMPLATE", "EXCELFILE", "DB", "DELIMITEDFILE", "FIXEDWIDTHFILE", "BI", "ESSBASE", "JDBC", "SPARK", "MS_SQL", "MYSQL", "DB2", "ORACLE", "FILE" ]
-
widths(required):
array widths
array
Parameter implementation details, if the Datasource query is parameterized. For example, if the query includes a ?
placeholder for passing a parameter, as in the following query: select * from profit_data where year=?
, then you need define the implementation details.
object
-
format:
string
-
index:
integer(int32)
-
name:
string
-
nullable:
boolean
-
system:
boolean
-
type:
string
Allowed Values:
[ "STRING", "DOUBLE", "DATE", "TIMESTAMP", "LONG" ]
object
-
defaultValue:
string
A fixed, default parameter value that the Datasource should use as a fallback in case the parameter has an invalid context at runtime. Example: Jan. Required only if the Datasource query is parameterized (it includes a
?
placeholder for passing a parameter) AND the placeholder is not intended to reference a substitution variable nor a user-defined function developed in the external source. -
index:
integer(int32)
Ordinal index of the Datasource query parameter. For example, 1 for the first parameter, 2 for the second parameter, etc.
-
name:
string
Optional name for the Datasource query parameter, meaningful for your use case. For example, instead of Param1 you can use param_G_month to indicate that the parameter uses a global variable for the current month, or you can rename it to param_appName_month to indicate that the parameter uses an application-level variable for the current month.
-
required:
boolean
true if the Datasource query parameter is required, or false otherwise.
-
subVariableName:
string
If useSubVariable is true, the name of an Essbase substitution variable.
-
type:
string
Allowed Values:
[ "STRING", "DOUBLE", "DATE", "TIMESTAMP", "LONG" ]
Datatype of the Datasource query parameter.
-
useSubVariable:
boolean
true if the Datasource query parameter references an Essbase substitution variable, or false otherwise.
400 Response
Bad Request
Failed to get Datasources.
Examples
The following example shows how to get a list of global Datasources defined on the Essbase server.
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
.
Script with cURL Command
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/datasources?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.
{
"items" : [ {
"name" : "delimitedfile_DS",
"description" : "Datasource to text file using custom delimiter",
"connection" : "delimitedfile_conn",
"type" : "DELIMITEDFILE",
"queryParameters" : [ ],
"links" : [ ]
}, {
"name" : "excelDS",
"description" : "Datasource to Excel file",
"connection" : "excel_conn",
"type" : "EXCELFILE",
"queryParameters" : [ ],
"links" : [ ]
}, {
"name" : "Orcl_DS",
"description" : "Datasource to Oracle Database",
"connection" : "oraConn",
"type" : "DB",
"queryParameters" : [ ],
"links" : [ ]
}, {
"name" : "EssbaseDS",
"description" : "Datasource to Essbase 2",
"connection" : "essconn",
"type" : "ESSBASE",
"queryParameters" : [ ],
"links" : [ ]
} ],
"offset" : 0,
"limit" : 50,
"count" : 4,
"totalResults" : 4,
"hasMore" : false
}