Matrix REST Bindings

The Matrix REST bindings create and update rate tables.

Attention: MATRIXX Support recommends that you do not create or update rate tables using this API. You should create rate tables in My MATRIXX because it provides safeguards and validations when creating and updating rate tables that the My MATRIXX REST bindings do not.
When making POST and PUT calls, you can configure the following:
  • name
  • balance_units
  • basicbeat
  • beatid formula
  • beat formula
  • SKIP and error formulas
  • Attributes
  • Parameters
  • Data modify profiles
  • Metadata

Examples

POST /objects/Matrix/basic shows how to create a new rate table.
Table 1. POST /objects/Matrix/basic
URL
POST http://localhost:8080/matrixx/data/objects/Matrix/basic
Input
<?xml version="1.0" ?>
<Matrix name="Updated Free Service">
    <balance balance_units="none" class="756" id="90208"/>
    <basicbeat id="0" override="false"/>
    <formula beatid="0" intercept="0.0000" multiple="0.0000" slope="0.0000" units=""/>
    <NormalizerList>
        <Normalizer id="1090" name="Rate Tag Free/Charge Normalizer"/>
    </NormalizerList>
    <RowList>
        <Row>
            <normalizer_value id="1090" value_name="Free"/>
            <formula beat="1 byte" beatid="0" intercept="0.0000" multiple="0.0000" slope="0.0000" units="bytes"/>
        </Row>
        <Row>
            <normalizer_value id="1090" value_name="Other"/>
            <formula beat="1 byte" beatid="0" intercept="0.0000" multiple="0.0000" slope="0.0000" units="bytes"/>
        </Row>
        <Row>
            <normalizer_value id="1090" value_name="DNS"/>
            <formula beat="1 byte" beatid="0" intercept="0.0000" multiple="0.0000" slope="0.0000" units="bytes"/>
        </Row>
    </RowList>
</Matrix>
 
Response
<CreateResponse>
    <type>Matrix</type>
    <DomainId>1</DomainId>
    <Result>0</Result>
    <ResultText>Success</ResultText>
    <ObjectId>2624</ObjectId>
    <Revision>0</Revision>
</CreateResponse> 
GET /objects/Matrix/basic/{id} shows how to retrieve a matrix filter from the in-memory pricing database.
Table 2. GET /objects/Matrix/basic/{id}
URL
GET http://localhost:8080/matrixx/data/objects/Matrix/basic/2624
Response
<Matrix description='call charge rate table' eventTypeId='3' default_data_modify_profile='1' exceed_credit_limit='true' external_id='test enter for save' name='Call Charge' scaleBasis='usage_quantity'>
    <balance balance_units='none' class='840' impact_balance_tag_id='4' /> 
    <!-- NOTE: balance can either specify “id” or “impact_balance_tag” -->
    <defaultbeat id='0' override='true' />
    <defaultratetag id='1' override='true' />
    <error error_id='1' />
    <NormalizerList>
        <Normalizer attribute='norm2' id='2' name='Time Model' />
        <Normalizer attribute='norm903' id='903' name='Voice Zoning Rev1' />
    </NormalizerList>
    <RowList>
        <Row>
            <normalizer_value id='2' value_index='0' value_name='Peak' />
            <normalizer_value id='903' value_index='0' value_name='zone1' />
            <skip />
            <MetadataList>
                <Metadata name='hair_color' type='' value='blonde' />
                <Metadata name='height' type='' value='5 ft 2' />
            </MetadataList>
        </Row>
        <Row>
            <normalizer_value id='2' value_index='1' value_name='Offpeak' />
            <normalizer_value id='903' value_index='0' value_name='zone1' />
            <skip />
            <MetadataList>
                <Metadata name='hair_color' type='' value='brunette' />
                <Metadata name='height' type='' value='5 ft 9' />
            </MetadataList>
        </Row>
        <Row>
            <normalizer_value id='2' value_index='3' value_name='Weekend' />
            <normalizer_value id='903' value_index='0' value_name='zone1' />
            <formula beat='1 Second' beatid='0' intercept='0.0' multiple='1.0' ratetag='3' slope='0.1' units='minutes' />
            <MetadataList>
                <Metadata name='hair_color' type='' value='redhead' />
                <Metadata name='height' type='' value='6 ft 0' />
            </MetadataList>
        </Row>
        <Row>
            <normalizer_value id='2' value_index='4' value_name='Evening' />
            <normalizer_value id='903' value_index='0' value_name='zone1' />
            <formula beat='1 Second' beatid='0' intercept='0.0' intercept_parameter_id='10' multiple='0.0' multiple_parameter_id='26' ratetag='1' slope='0.0' slope_parameter_id='13' units='minutes' />
            <AttributeList>
                <Attribute display='42' id='54' lock='false' value='42' />
                <Attribute code='2' display='foobar' id='4' lock='false' value='foobar' />
            </AttributeList>
            <MetadataList>
                <Metadata name='hair_color' type='' value='blonde' />
                <Metadata name='height' type='' value='5 ft 2' />
            </MetadataList>
        </Row>
        <Row>
            <normalizer_value id='2' value_index='0' value_name='Peak' />
            <normalizer_value id='903' value_index='1' value_name='zone2' />
            <formula beat='1 Second' beatid='0' intercept='0.0' multiple='1.0' ratetag='2' slope='0.42' units='minutes' />
            <MetadataList>
                <Metadata name='hair_color' type='' value='brunette' />
                <Metadata name='height' type='' value='5 ft 9' />
            </MetadataList>
        </Row>
        <Row>
            <normalizer_value id='2' value_index='1' value_name='Offpeak' />
            <normalizer_value id='903' value_index='1' value_name='zone2' />
            <formula beat='1 Second' beatid='0' intercept='0.0' multiple='1.0' ratetag='3' slope='0.39' units='minutes' />
            <MetadataList>
                <Metadata name='hair_color' type='' value='redhead' />
                <Metadata name='height' type='' value='6 ft 0' />
            </MetadataList>
        </Row>
        <Row>
            <normalizer_value id='2' value_index='3' value_name='Weekend' />
            <normalizer_value id='903' value_index='1' value_name='zone2' />
            <formula beat='1 Second' beatid='0' intercept='0.0' multiple='1.0' ratetag='1' slope='0.2' units='minutes' />
            <MetadataList>
                <Metadata name='hair_color' type='' value='blonde' />
                <Metadata name='height' type='' value='5 ft 2' />
            </MetadataList>
        </Row>
        <Row>
            <normalizer_value id='2' value_index='4' value_name='Evening' />
            <normalizer_value id='903' value_index='1' value_name='zone2' />
            <formula beat='1 Second' beatid='0' intercept='0.0' multiple='1.0' ratetag='2' slope='0.1' units='minutes' />
            <AttributeList>
                <Attribute display='111111' id='2' lock='false' value='111111' />
            </AttributeList>
            <MetadataList>
                <Metadata name='hair_color' type='' value='brunette' />
                <Metadata name='height' type='' value='5 ft 9' />
            </MetadataList>
        </Row>
        <Row>
            <normalizer_value id='2' value_index='2' value_name='Free lunch' />
            <normalizer_value id='903' value_index='0' value_name='zone1' />
            <formula beat='1 Second' beatid='0' intercept='0.0' intercept_parameter_id='10' multiple='1.0' ratetag='3' slope='0.0' units='minutes' />
            <AttributeList>
                <Attribute code='2' display='foobar' id='4' lock='false' value='foobar' />
                <Attribute code='0' display='this_value_is_ok' id='50' lock='false' value='this_value_is_ok' />
            </AttributeList>
            <MetadataList>
                <Metadata name='hair_color' type='' value='redhead' />
                <Metadata name='height' type='' value='6 ft 0' />
            </MetadataList>
        </Row>
        <Row>
            <normalizer_value id='2' value_index='2' value_name='Free lunch' />
            <normalizer_value id='903' value_index='1' value_name='zone2' />
            <formula beat='1 Second' beatid='0' intercept='0.0' multiple='1.0' ratetag='1' slope='0.42' units='minutes' />
            <MetadataList>
                <Metadata name='hair_color' type='' value='blonde' />
                <Metadata name='height' type='' value='5 ft 2' />
            </MetadataList>
        </Row>
            <Row data_modify_profile='2'>
                <normalizer_value id='2' value_index='3' value_name='Weekend' />
                <normalizer_value id='903' value_index='0' value_name='zone1' />
                <formula beat='1 Second' beatid='0' intercept='0.0' multiple='1.0' ratetag='3' slope='0.1' units='minutes' />
                <MetadataArray>
                    <Metadata name='hair_color' type='' value='redhead' />
                    <Metadata name='height' type='' value='6 ft 0' />
                </MetadataArray>
            </Row>
            <Row data_modify_profile='1'>
                <normalizer_value id='2' value_index='4' value_name='Evening' />
                <normalizer_value id='903' value_index='0' value_name='zone1' />
                <formula beat='1 Second' beatid='0' intercept='0.0' intercept_parameter_id='10' multiple='0.0' multiple_parameter_id='26' ratetag='1' slope='0.0' slope_parameter_id='13' units='minutes' />
                <AttributeList>
                    <Attribute display='42' id='54' lock='false' value='42' />
                    <Attribute code='2' display='foobar' id='4' lock='false' value='foobar' />
                </AttributeList>
                <MetadataArray>
                    <Metadata name='hair_color' type='' value='blonde' />
                    <Metadata name='height' type='' value='5 ft 2' />
                </MetadataArray>
            </row>
    </RowList>
    <AttributeList>
        <Attribute code='1' display='42' id='2' lock='false' value='42' />
    </AttributeList>
    <MetadataList>
        <Metadata name='hair_color' type='String' value='brown' />
        <Metadata name='height' type='String' value='6 ft 4in' />
    </MetadataList>
</Matrix> 
PUT /objects/Matrix/basic/{id} shows how to update an existing matrix filter.
Table 3. PUT /objects/Matrix/basic/{id}
URL
PUT http://localhost:8080/matrixx/data/objects/Matrix/basic/2624
Input
<?xml version="1.0" encoding="UTF-8"?>
<Matrix name="Free Service">
  <RowList>
    <row>
      <normalizer_value id="1090" value_index="0" value_name="Free"/>
      <formula intercept="0.0000" slope="0.0000" multiple="0.0000" units="bytes" beat="1 byte"/>
    </row>
    <row>
      <normalizer_value id="1090" value_index="1" value_name="Other"/>
      <formula intercept="0.0000" slope="0.0100" multiple="0.0000" units="bytes" beat="1 byte"/>
    </row>
  </RowList>
</Matrix> 
Response
<UpdateResponse>
    <type>Matrix</type>
    <Result>0</Result>
    <ResultText>Success</ResultText>
    <ObjectId>2624</ObjectId>
</UpdateResponse>