RESTfull API to Call a Report

(11SP14) I am trying to create a (html) client that will run a report on a custom itemtype. This is the Report that you create with a Query and a stylesheet. Is it possible to do this with the REST API? Would it be possible to get the Report as it shows up in Aras? Or would it only get the data, that will then have to be transformed and formatted again?  Here’s the report we get right now in Aras:

 

And here’s the report item, the query and the attached stylesheet return the above report.

Thanks.

Parents
  • I must also add that I have been able to connect with the given examples (Eli's Blogpost) and am able retrieve items/properties. I am not looking for help on how to connect, but how to get a given report applied to a given item.

    I want to be able to do this via an html client. Not sure how that works either. I am able to create a client with only one function on the server. Not sure how to add more functions to it. Or do I have to create a separate .js file for each function?

    aras.js file:

    authenticate().then(RESTRequest);

    function authenticate() {
    return $.ajax({
    url: "">amrndsvdap44.nidecds.com/.../token",
    type: 'POST',
    data: {
    'grant_type': 'password',
    'scope': 'Innovator',
    'client_id': 'IOMApp',
    'username': 'nmc5019',
    'password': '673781C8150EB32ADC892B364F6BD742',
    'database': 'InnNMCSolutionsMIDB-2'
    },

    error: function(xhr, status, error) {
    var err = eval("(" + xhr.responseText + ")");
    console.log(err.Message);
    },

    success: function(data) {}
    });
    }

    function RESTRequest(response) {
    $.ajax({
    url: "">amrndsvdap44.nidecds.com/.../NMC_Customer_Motor('3DEE3351A32B48C99C634AB62AF32959')",
    type: 'GET',
    headers: {
    "Authorization": 'Bearer ' + response.access_token
    },

    error: function(xhr, status, error) {
    var err = eval("(" + xhr.responseText + ")");
    console.log(err.Message);
    },

    success: function(data) {
    //Do Something with results
    $('.id').append(data.id);
    $('.customer_name').append(data.customer_name);
    $('.md_model_number').append(data.md_model_number);
    }
    });

    }

    HTML Client:

    <!DOCTYPE html>
    <html>
    <head>
    <title>Aras jQuery</title>
    <script src="">ajax.googleapis.com/.../script>
    <script src="aras.js"></script>
    </head>

    <body>
    <div>
    <p class="id">ID: </p>
    <p class="customer_name">Customer Name: </p>
    <p class="md_model_number">Model Number: </p>

    </div>
    </body>

    </html>

Reply
  • I must also add that I have been able to connect with the given examples (Eli's Blogpost) and am able retrieve items/properties. I am not looking for help on how to connect, but how to get a given report applied to a given item.

    I want to be able to do this via an html client. Not sure how that works either. I am able to create a client with only one function on the server. Not sure how to add more functions to it. Or do I have to create a separate .js file for each function?

    aras.js file:

    authenticate().then(RESTRequest);

    function authenticate() {
    return $.ajax({
    url: "">amrndsvdap44.nidecds.com/.../token",
    type: 'POST',
    data: {
    'grant_type': 'password',
    'scope': 'Innovator',
    'client_id': 'IOMApp',
    'username': 'nmc5019',
    'password': '673781C8150EB32ADC892B364F6BD742',
    'database': 'InnNMCSolutionsMIDB-2'
    },

    error: function(xhr, status, error) {
    var err = eval("(" + xhr.responseText + ")");
    console.log(err.Message);
    },

    success: function(data) {}
    });
    }

    function RESTRequest(response) {
    $.ajax({
    url: "">amrndsvdap44.nidecds.com/.../NMC_Customer_Motor('3DEE3351A32B48C99C634AB62AF32959')",
    type: 'GET',
    headers: {
    "Authorization": 'Bearer ' + response.access_token
    },

    error: function(xhr, status, error) {
    var err = eval("(" + xhr.responseText + ")");
    console.log(err.Message);
    },

    success: function(data) {
    //Do Something with results
    $('.id').append(data.id);
    $('.customer_name').append(data.customer_name);
    $('.md_model_number').append(data.md_model_number);
    }
    });

    }

    HTML Client:

    <!DOCTYPE html>
    <html>
    <head>
    <title>Aras jQuery</title>
    <script src="">ajax.googleapis.com/.../script>
    <script src="aras.js"></script>
    </head>

    <body>
    <div>
    <p class="id">ID: </p>
    <p class="customer_name">Customer Name: </p>
    <p class="md_model_number">Model Number: </p>

    </div>
    </body>

    </html>

Children
No Data