IBM Security Verify

 View Only
  • 1.  POST REST calls on SVA examples

    Posted Fri May 05, 2023 06:48 AM

    [Reposting this request to the correct group]

     

    I often make REST calls to SVA appliances to obtain information. These calls are made using only curl and standard bash scripting (no programming involved). I now wanted to do a DNS lookup using my REST code calls, and to my disappointment this failed.

     

    The call seems straightforward enough, according to the documentation it is simply a call to 'https://{appliance_hostname}/isam/net/lookup' but after digging into it a bit deeper, I see that this is a POST, and all my existing calls are only GETs.

     

    I thought that I had bookmarked examples of ISAM REST calls, but when I looked for it, I only found examples using Python code. Hence my question:

     

    Can anybody please provide me with some examples on how to make SVA REST POST calls only using curl and bash scripting (without using programming)?

     

    All feedback appreciated.

     

    Jacques Heydenrych

    WPS Health Solutions


    CONFIDENTIALITY NOTICE: This e-mail, including any attachments, may contain confidential, privileged and/or proprietary information which is solely for the use of the intended recipient(s). Any review, use, disclosure, or retention by others is strictly prohibited. If you are not an intended recipient, please contact the sender and delete this e-mail, any attachments, and all copies.


  • 2.  RE: POST REST calls on SVA examples

    IBM Champion
    Posted Fri May 05, 2023 08:27 AM

    Hi Jacques

    Without responding directly to your request (locating sample curl collections), here (https://github.com/IBM-Security/ibmsecurity) you can find how the IBM-Security open source project performs in Python all RESTful API calls for managing ISVA appliances (and more, such as ISDS appliances and ISVG appliances lately).


    More particularly, in this python source code (https://github.com/IBM-Security/ibmsecurity/blob/master/ibmsecurity/isam/base/network/dns.py) you can see in the set() method how the RESTful API call is built. You could be surprised (Aha moment) that this method uses an HTTP PUT method and not an HTTP POST method.

    Hope if helps.

    Sylvain



    ------------------------------
    Sylvain Gilbert
    ------------------------------



  • 3.  RE: POST REST calls on SVA examples

    Posted Mon May 08, 2023 10:13 AM

    Hi Jacques,

    The 2 bash scripts attached can be used to make POST calls using bash and curl.  rest_cmd_nopwd.sh is the base and can be used to make any calls using curl and bash, then promote_to_master.sh is an example of a POST call, which you can change to use any method you need.

    I hope this is useful to you. 



    ------------------------------
    Enio Padilla
    ------------------------------

    Attachment(s)

    sh
    rest_cmd_nopwd.sh   374 B 1 version
    sh
    promote_to_master.sh   765 B 1 version


  • 4.  RE: POST REST calls on SVA examples

    Posted Tue May 09, 2023 02:50 AM

    Hi Jacques,

    The same documentation on the REST api that comes with the appliance, is available here:

    https://ibm-security.github.io/apidocs/verifyaccess/10.0.5.0/ISVA-mgmt-rest-api/index.html

    It includes curl examples for GET/PUT/POST/... towards the ISVA REST API.




    ------------------------------
    Tom Bosmans
    ------------------------------