Better Active Server REST API Documentation

Posted by: dklingman on 9 May 2018, 6:55 pm EST

  • Posted 9 May 2018, 6:55 pm EST

    Are there any plans to improve the documentation for the REST API? I'm asking because I've yet to see things updated with, with information that I've provided as missing. The only way I've found these things was to use other tools to capture request being made to the server and evaluating the request and/or response information.

    One thing I'm wondering about is what is the ultimate difference between rendering a report and a snapshot, as there's no information on the difference would be. I'm assuming that a snapshot is just a limited amount of pages and a render would be the entire report not limiting the page count?

    Also, I know with AR12 you can do a run once schedule, but I'm not seeing how to do this with the REST API. Are there any examples or information on how to do this?
  • Replied 10 May 2018, 6:10 am EST

    Hello,
    >>Are there any plans to improve the documentation for the REST API?
    I will forward this to our concern team.

    >>what is the ultimate difference between rendering a report and a snapshot
    Snapshot is the new API which is implemented in AR11 which is used internally to save and load the report data instead of old caching DDF to increase the efficiency of server work. And you can use the "Rendering" API to render the report in any format for user. However, you use the "Snapshot" API for internal use only.

    >>I'm not seeing how to do this with the REST API.
    Please refer the following link:
    http://help.grapecity.com/activereports/webhelp/AR12ServerAPI/index.html#!/schedules/post_api_schedules_scheduleId_execute

    Thanks,
    Mohit
  • Replied 12 May 2018, 8:01 am EST

    Thank you for the response. However, I still don't understand how you can do a run once schedule? The link you had me go to indicates that I need a scheduleId to execute. How do I create a run once schedule?

    This is one of the areas I'm talking about with the documentation. It is very hard to understand how the API works with the limited amount of information. Most of the time the way I've managed to figure out how to use it has been to run things through AR server and/or report portal and capture requests and response with Fiddler to see what information is either missing or what value(s) are actually expected.

    For instance how to create a schedule template. The API documentation says to do a POST to /api/scheduletemplates/content, however, the documentation doesn't show any information on what the that "content" is. In order to find out things like this as I stated I need to use something like Fiddler and find where I can capture this information to so as to know what "content" is needed.

    However, I've yet to figure out how a run once schedule works. I really need to understand how to set up and run a one time schedule.

    This is also why I've been working on creating a nice wrapper for my development team, so they don't need to go through the same headaches I've been in order to use the API.
  • Replied 14 May 2018, 5:22 am EST

    Hello Derek,

    I’m very sorry that you’re having issues with our documentation. I will forward this issue to our concern team.

    About "Run Once" feature, it is the new feature that is used to run any saved scheduled task immediately. It is used when a user wants to execute immediately any ongoing schedule task for any reason.

    You can use the following API to use the "Run Once" feature through the API:
    POST /api/schedules/{scheduleId}/execute(http://help.grapecity.com/activereports/webhelp/AR12ServerAPI/index.html#!/schedules/post_api_schedules_scheduleId_execute)
    Where "scheduleId" is the ID of saved schedule task which you want to execute immediately. It is used all property of corresponding schedule task property to execute.

    Also, you can get the "ScheduleID" through the following API
    GET /api/reports/{id}/schedules (http://help.grapecity.com/activereports/webhelp/AR12ServerAPI/index.html#!/schedules/get_api_reports_id_schedules)
    Where "id" is the ID of the report on which scheduled task is added. Also, you can see the result of execution of schedule task in "History" tab or you can use the following API:
    GET /api/reports/{id}/schedules/history(http://help.grapecity.com/activereports/webhelp/AR12ServerAPI/index.html#!/schedules/get_api_reports_id_schedules_history)

    Please free the ask anything if you face any problem to use ARS API.

    Thanks,
    Mohit












  • Replied 14 May 2018, 7:50 am EST

    Mohitg,


    Thank you for the information. However, this isn't what I would have had in my mind as a run once schedule, but clears things up a bit more. My idea of a run once schedule is being able to say run at a certain date and time and that's it.

    For instance, right now with some of our SSRS reports, we can submit a request to run the report, but it runs at a time that has less load on the server, say at 2AM. Once the schedule finishes that schedule ends. Normally we do this by adding an end date. I've tried doing this very same thing, by creating a schedule in AR12 with an end date as well. However, the end date never stays. I save the schedule template with an end date, but when I capture the request there's no end date being set. This is directly through the AR server interface. So, I tried to set it myself and send the request and it still doesn't matter, it never saves the end date.

    I did submit a support ticket with lots of screenshots and information about this, Case ID 321741
  • Replied 14 May 2018, 8:51 am EST

    Hello Derek,


    Have you set the value of "Repeat Task Every" greater than 0 because when "Repeat task every" is set to 0, all fields except "Starting On" and "Result expires after" resets to the default value on creating the new template or saving changes in the existing template as recurrence should be created only when "Repeat task Every" > 0

    Hope it clarifies.

    Thanks,
    Mohit
  • Replied 14 May 2018, 12:35 pm EST

    Ok, I see where that works now. The next question is does AR clean up schedules that have an end on date or a schedule that's completed and does not repeat and the? Or is this something that would need to be done manually? Again this is something that does happen automatically in SSRS.

    Once a schedule is completed the report is no longer bound to the schedule and the schedule is deleted.

    From the sounds of it if I wanted to do something similar to how SSRS does it I'd need to create a random temporary schedule template that would have a start date of whatever day and at 2AM, with no repeat information. Then need some other service that would monitor for these temporary schedules and would delete the schedule from the report and then from the schedule templates?


    Again it would be nice if the run once schedule would work similar to how SSRS does. I've attached a screenshot of how you can create a once only schedule in SSRS.
  • Marked as Answer

    Replied 15 May 2018, 9:25 am EST

    Hello Derek,

    "Run Once" feature is similar to "Run Now" feature of SSRS. Please refer the attached image.
    However, you can create the "Run Once" schedule in ARS by creating schedule template with the only start time of your choice. If you set "Repeat Task Every" equal to 0 then it will execute only once at start time.

    Scheduling in ARS is a little bit different of SSRS. In SSRS, you have to create the "Schedule Template" for each report while in ARS, you can use the same schedule template for several reports. Hence, Schedule template can be used again with some little modification(Like End Date field). It is not good for some user if we delete schedule template automatically. In ARS, Schedule task is created for each report using schedule template. For more information, you can refer the following link:
    http://help.grapecity.com/activereports/webhelp/ARS12ServerDesigner/webframe.html#areSchedulingReports.html
    http://help.grapecity.com/activereports/webhelp/AR12Server/webframe.html#ManagingSchedules.html

    Also, I will discuss with the product managers to delete "Schedule task" automatically if its end date is passed

    Thanks,
    Mohit


  • Replied 15 May 2018, 9:38 am EST

    Hello Derek,

    "Schedule Template" feature is similar to "Schedule" feature in "Site Settings" of SSRS. Please refer the attached image

    Thanks,
  • Replied 15 May 2018, 9:40 am EST

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels