Verify Rule
/utils/rules/verifyRule
Verifies a rule file, either regular or index-based.
Request
-
application:
Application name.
-
database:
Database name.
Response
200 Response
OK
Rule file verified successfully.
400 Response
Bad Request
Rule verification failed. Response contains a list of verification errors.
500 Response
Internal Server Error.
Examples
The following example shows how to verify an Essbase data load or dimension build rule file definition.
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 Commands
The following script verifies a data load rule definition for Sample Basic.
call properties.bat
curl -X POST -i "https://myserver.example.com:9001/essbase/rest/v1/utils/rules/verifyRule?application=Sample&database=Basic" -H "Accept:application/json" -H "Content-Type:application/json" --data "@./sqlrul02.json" -u %User%:%Password%Sample JSON Payload
The cURL example above delivers the following JSON payload in sqlrul02.json. The payload consists of a working definition for a SQL-based load rule not created yet.
{
"dimensions" : [ ],
"fields" : [ {
"name" : "Product",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
}
}, {
"name" : "Market",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
}
}, {
"name" : "Year",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
}
}, {
"name" : "Scenario",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
}
}, {
"name" : "SALES",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
},
"dataloadOptions" : {
"data" : true
}
} ],
"dataSource" : {
"sqlProperties" : {
"server" : "REST;URL=LOCAL;DS=Orcl_DS",
"select" : " * FROM Orcl_DS"
}
}
}Response
The REST API returns no JSON response, but a 200 response in the header indicates success.
HTTP/1.1 200 OK