Get Rules
/utils/rules
Gets rule file from file catalog path.
Request
-
path:
Catalog path.
Response
200 Response
OK
Successfully returned rule file. Response type can be either JSON, XML, or JSON stream, depending on the Accept header. If Accept='application/json' or Accept='application/xml', the rules are returned in the response body. If Accept='application/octet-stream', the rules are returned as a JSON stream.
400 Response
Bad Request
Failed to import rule file. The catalog path information may be incorrect.
500 Response
Internal Server Error.
Examples
The following examples show how to get or export a 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 - Get a Data Load Rule
The following script requests details, in JSON format, about a data load rule for Sample Basic.
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/utils/rules?path=/applications/Sample/Basic/Data.rul" -H Accept:application/json -u %User%:%Password%Sample JSON Response
The REST API returns the following details about Data.rul.
{
"dimensions" : [ {
"createAttributeMembers" : true,
"name" : "Year"
}, {
"createAttributeMembers" : true,
"name" : "Product"
}, {
"createAttributeMembers" : true,
"name" : "Market"
}, {
"createAttributeMembers" : true,
"name" : "Scenario"
} ],
"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
}
}, {
"name" : "COGS",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
},
"dataloadOptions" : {
"data" : true
}
}, {
"name" : "Marketing",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
},
"dataloadOptions" : {
"data" : true
}
}, {
"name" : "Payroll",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
},
"dataloadOptions" : {
"data" : true
}
}, {
"name" : "Misc",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
},
"dataloadOptions" : {
"data" : true
}
}, {
"name" : "Opening Inventory",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
},
"dataloadOptions" : {
"data" : true
}
}, {
"name" : "Additions",
"trim" : true,
"dimensionBuildOptions" : {
"refer" : 0,
"dimension" : "",
"attributeDimension" : ""
},
"dataloadOptions" : {
"data" : true
}
} ],
"dataSource" : {
"fileProperties" : {
"delimiter" : ","
}
},
"dataLoadOptions" : {
"signFlipDimension" : "None",
"signFlipUDA" : "None"
}
}Script with cURL Commands - Get a Dimension Build Rule
The following script requests details, in JSON format, about a dimension build rule for Sample Basic.
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/utils/rules?path=/applications/Sample/Basic/Dim_Product.rul" -H "Accept:application/json" -u %User%:%Password%Sample JSON Response
The REST API returns the following details about Dim_Product.rul.
{
"dimensions" : [ {
"allowassociationChanges" : true,
"allowFormulaChanges" : true,
"allowPropertyChanges" : true,
"allowUDAChanges" : true,
"addMemberOption" : "PARENT_CHILD",
"name" : "Product",
"added" : true
} ],
"fields" : [ {
"name" : "PARENT",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "PARENT",
"dimension" : "Product",
"attributeDimension" : ""
}
}, {
"name" : "CHILD",
"trim" : true,
"dimensionBuildOptions" : {
"parent" : 0,
"generationType" : "CHILD",
"refer" : 0,
"dimension" : "Product",
"attributeDimension" : ""
}
}, {
"name" : "STORAGE",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "PROPERTY",
"refer" : 1,
"dimension" : "Product",
"attributeDimension" : ""
}
}, {
"name" : "CONSOLIDATION",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "PROPERTY",
"refer" : 1,
"dimension" : "Product",
"attributeDimension" : ""
}
}, {
"name" : "Default",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "ALIAS",
"refer" : 1,
"dimension" : "Default",
"attributeDimension" : "",
"alias" : "Default",
"generation" : -1
}
}, {
"name" : "ChineseNames",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "ALIAS",
"refer" : 1,
"dimension" : "ChineseNames",
"attributeDimension" : "",
"alias" : "ChineseNames",
"generation" : -1
}
}, {
"name" : "JapaneseNames",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "ALIAS",
"refer" : 1,
"dimension" : "JapaneseNames",
"attributeDimension" : "",
"alias" : "JapaneseNames",
"generation" : -1
}
}, {
"name" : "RussianNames",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "ALIAS",
"refer" : 1,
"dimension" : "RussianNames",
"attributeDimension" : "",
"alias" : "RussianNames",
"generation" : -1
}
}, {
"name" : "GermanNames",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "ALIAS",
"refer" : 1,
"dimension" : "GermanNames",
"attributeDimension" : "",
"alias" : "GermanNames",
"generation" : -1
}
}, {
"name" : "Caffeinated",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "ATTRIBUTE_MEMBER",
"refer" : 1,
"dimension" : "Product",
"attributeDimension" : "Caffeinated"
}
}, {
"name" : "Ounces",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "ATTRIBUTE_MEMBER",
"refer" : 1,
"dimension" : "Product",
"attributeDimension" : "Ounces"
}
}, {
"name" : "Pkg Type",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "ATTRIBUTE_MEMBER",
"refer" : 1,
"dimension" : "Product",
"attributeDimension" : "Pkg Type"
}
}, {
"name" : "Intro Date",
"trim" : true,
"dimensionBuildOptions" : {
"generationType" : "ATTRIBUTE_MEMBER",
"refer" : 1,
"dimension" : "Product",
"attributeDimension" : "Intro Date"
}
} ],
"dataSource" : {
"fileProperties" : {
"delimiter" : ","
}
},
"editorOptions" : {
"viewMode" : "DIMBUILD"
},
"studio" : true
}
Script with cURL Commands - Export a Rule
The following script exports a dimension build rule from Sample Basic to a JSON file.
call properties.bat
curl -X GET "https://myserver.example.com:9001/essbase/rest/v1/utils/rules?path=/applications/Sample/Basic/addaschildofparent.rul" -H "accept:application/json" -o "addaschildofparent.json"