Check Expression from Attribute List

/api/repositories/{repository}/checkexpressionfromattributelist
Parameter Type Purpose
repository string The name of the repository to access

Post

POST /api/repositories/(string: repository)/checkexpressionfromattributelist
POST /api/repositories/jupiter/checkexpressionfromattributelist HTTP/1.1
Content-Type: application/json

{
    "attributeList": [
        {
            "columnisedName": "Account_id",
            "humanisedName": "Account ID"
        },
        {
            "columnisedName": "Customer_id",
            "humanisedName": "Customer ID"
        }
    ],
    "expression": "DIVIDEINT('Account ID', 4) > 0"
}

The message body is a JSON string containing two key-value pairs: the first, attributeList is an array of the columns; the second, expression is the humanised expression to check.

The attributeList does not have to list every available attribute for a particular entity, but it must have an entry for each attribute that is referenced in the expression.

Response Code Reason
200 Success
500 Server error

A successful response contains the expression transformed into XML.

The request above would result in the following response:

HTTP/1.1 200 OK
Content-type: text/xml

<?xml version="1.0" ?>
<expr>
    <text>DIVIDEINT('Account ID',4) &gt; 0</text>
    <gt>
        <call name="::com::avellino::metabase::builtins::divideint" type="number">
            <var>Account_id</var>
            <int>4</int>
        </call>
        <int>0</int>
    </gt>
</expr>