DX NetOps

 View Only
  • 1.  Reports with Odata variables

    Posted Jun 18, 2021 10:08 AM
    Anyone have customized any reports with Odata and japer in PM ,facing some issues in adding start time and end time in those reports. There is any specific variables for this or p_custom_time is variable. The sample query in Broadcom docs for start time is linux apoch time so how to declare with date format 

    /odata/api/devices?$apply=groupby(cpumfs/ID, aggregate(cpumfs(im_Utilization with average as Value)))&starttime=1457794664&endtime=1460386664&resolution=RATE&$select=Name&$filter=((tolower(groups/Name) eq tolower('Boston')))


  • 2.  RE: Reports with Odata variables

    Broadcom Employee
    Posted Jun 18, 2021 10:43 AM
    Try using starttime=2021-06-16T09:45&endtime=2021-06-17T09:45
    /odata/api/devices?$apply=groupby(cpumfs/ID, aggregate(cpumfs(im_Utilization with average as Value)))&$format=json&starttime=2021-06-16T09:45&endtime=2021-06-17T09:45&resolution=RATE&$select=Name&$filter=((tolower(groups/Name) eq tolower('Boston')))

    ------------------------------
    Sr Support Engineer
    Broadcom
    ------------------------------



  • 3.  RE: Reports with Odata variables

    Posted Jun 18, 2021 11:12 AM
    Yes for static time frame we can manually run the report with the above odata query ,but we need to create a input box and need to select the date from there,so in this case how to call the date.


  • 4.  RE: Reports with Odata variables

    Broadcom Employee
    Posted Jun 18, 2021 12:43 PM
    See Article ID: 97790 - How to specify a Yesterday Time Range in OpenAPI queries

    https://knowledge.broadcom.com/external/article?articleId=97790

    ------------------------------
    Sr Support Engineer
    Broadcom
    ------------------------------