Create Filter
/essbase/rest/v1/applications/{applicationName}/databases/{databaseName}/filters
Creates a filter in the specified application and database, and returns the created filter.
Filters provide access restrictions on particular cells of the Essbase database (cube). System administrators can apply any filters to anyone, and are unaffected by filters. Power users can define and apply filters for applications they created. Application and Database Managers can define and apply filters within their applications or cubes.
Request
- application/json
- application/xml
-
applicationName(required): string
Application name.
-
databaseName(required): string
Database name.
Filter details.
Response
- application/json
- application/xml
200 Response
OK
Filter was created successfully. Returns filter details and links to get, edit, or delete the filter, and to get the filter rows.
400 Response
Bad Request
Failed to create filter. The application name or database name may be incorrect, or the filter may already exist.
415 Response
Not Acceptable
The media type isn't supported or wasn't specified.
500 Response
Internal Server Error.
Examples
The following example shows how to create an Essbase security filter.
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 POST "https://myserver.example.com:9001/essbase/rest/v1/applications/Efficient/databases/UserFilters/filters?links=none" -H "Accept: application/json" -H "Content-Type: application/json" --data "@./lookup_filter_def.json" -u %User%:%Password%
Example of Request Body
The input file, lookup_filter_def.json
, consists of the following JSON information.
{"name": "dslookupfilter",
"rows":
[
{
"access": "MetaRead",
"mbrSpec": "@datasourceLookup(\"EFFICIENT.UserDetails\",\"USERNAME\",$loginUser, \"COUNTRY\")"
},
{
"access": "MetaRead",
"mbrSpec": "@datasourceLookup(\"EFFICIENT.UserDetails\",\"USERNAME\",$loginUser, \"BUSINESSUNIT\")"
},
{
"access": "MetaRead",
"mbrSpec": "@datasourceLookup(\"EFFICIENT.UserDetails\",\"USERNAME\",$loginUser, \"COSTCENTER\")"
}
]
}
Example of Response Body
{
"name" : "dslookupfilter"
}