DX NetOps

 View Only

  • 1.  Issue with data extection vis query builder (ODATA) API in CAPM.

    Posted Aug 30, 2024 04:23 AM
    Edited by Rohit Vashishth Aug 30, 2024 05:55 AM

    Issue with data extection vis query builder (ODATA) API in CAPM.

    We are trying to extract data from CAPM using query builder (OData). While expression returns the required data when executed within the query builder.  However, we encounter an issue when we try to retrieve the data via odata URL(API) in the browser as shown in the attached screenshot. After clicking on subscibe nothing happens.  

    When we try to run it using curl, it again gives error, I have attached response of odata URL(API) from both brwoser and curl

    Any idea why it is behaving this way?

    RohitV

    BrowserError

    CurlError



  • 2.  RE: Issue with data extection vis query builder (ODATA) API in CAPM.

    Broadcom Employee
    Posted Aug 30, 2024 10:27 AM

    Browsers are tricky.

    You actually need to take the URL and replace any SPACE with %20.

    What is happening is curl is only using upto the first space when sending the GET call.  See the GET line.

    You may need to convert any / after the ? with %2F also, as / is a path separator.




  • 3.  RE: Issue with data extection vis query builder (ODATA) API in CAPM.

    Posted Sep 02, 2024 02:31 AM

    Hi Jeffrey,

    Thank you, it works. However, there is one more issue: it seems like the filter doesn't work when running via "curl". For example, when I run the query against a any group via the browser, it returns the correct data. However, when I run the same URL with "curl", it returns data for all devices in PM.




  • 4.  RE: Issue with data extection vis query builder (ODATA) API in CAPM.

    Posted Sep 02, 2024 03:37 AM
    Edited by Catalin Farcasanu Sep 02, 2024 03:43 AM

    What version of PM are your running? There were some fixes related to OpenAPI queries that were not returning correct results. Check the Fixed Issues list on techdocs.broadcom.com. 

    That or check if all the special characters in the URL are encoded correctly. 

    ------------------------------
    Cătălin Fărcășanu
    Senior Consultant
    SolvIT Networks
    ------------------------------



  • 5.  RE: Issue with data extection vis query builder (ODATA) API in CAPM.

    Posted Sep 02, 2024 03:49 AM
    Edited by Rohit Vashishth Sep 03, 2024 01:59 AM

    Hi Catalin,

    the PM Version is 20.2.5

    however, i managed to fix the issue.  i was keeping the url under "url" when i replaced it with 'url'  it retruns data against the group.

    Many thanks!




  • 6.  RE: Issue with data extection vis query builder (ODATA) API in CAPM.

    Posted Sep 02, 2024 05:17 AM

    I had similar issues that resulted in fixes published to the product. I remember one specifically with filtering of returned results that were not working correctly. Glad to see you have it working. On the next problem, you might wanna check the Fixed Issues lists to see if you find your problem there. 



    ------------------------------
    Cătălin Fărcășanu
    Senior Consultant
    SolvIT Networks
    ------------------------------