0 Replies Latest reply on Sep 30, 2014 4:02 PM by sharmon RSS
    sharmon Creator

    Using the Axeda v2 REST Services to Create an Expression Rule

    I was recently asked how to use the Axeda v2 REST services to create an expression rule. I thought this was a good opportunity to show how to use the REST services in general, so I created a short "explainer" video.


    If you're creating and managing expression rules, it's preferable to do it using Artisan. You can source-control your expression rules along with the rest of your domain objects, and deploying rules from one environment (say, sandbox) into another (say, QA or production), is just a matter of editing some Artisan properties files and redeploying. You could also write a Groovy-based custom object, and use the v2 API from there.


    However - your use case may call for the use of Axeda's v2 REST services, so here's how to use them:



    This is the body of the PUT request I sent in the video:


    <?xml version="1.0" encoding="UTF-8"?>
    <ExpressionRule xmlns="http://www.axeda.com/services/v2">
      <description>This is a test expression rule</description>
      <!-- <model systemId="82"/> -->
      <asset systemId="446"/>
      <asset systemId="447"/>
      <asset systemId="448"/>


    Here are some of the URLs from the video:


    The reference I use is the Axeda v2 API-Servies DeveloperReference Guide_6.8, which is available in the documentation section of the Support Portal.