Service Virtualization

Expand all | Collapse all

Service Virtualization API v3

Jump to Best Answer
  • 1.  Service Virtualization API v3

    Posted 01-21-2020 11:49 PM
    Hi,

    Is the Service Virtualization API v3 POST /vses/{vseName}/services/{virtualServiceName} capable to update or add new response of existing virtual service?

    We have a use case where the request contains one element named Id and there are two different responses for two different Ids.
    How to update/add the new response from the API?
     
     Thanks,

    ------------------------------
    Suman Kumar
    Wells Fargo
    +91 7098026025
    ------------------------------


  • 2.  RE: Service Virtualization API v3
    Best Answer

    Posted 02-05-2020 09:43 AM
    Please read this documentation link, section Update a Virtual Service:

    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/continuous-testing/devtest-solutions/10-5/using/using-the-apis/service-virtualization-api-v3.html

    This explains what you can do with updating a VS through the API.

    ------------------------------
    Technical Support Engineer III
    Broadcom, Inc
    ------------------------------



  • 3.  RE: Service Virtualization API v3

    Posted 02-14-2020 05:42 PM
    @Giridharan Jagadeesan - Please assist here. ​​

    ------------------------------
    Head of Product Management: Service Virtualization
    CA Technologies - A Broadcom Company
    ------------------------------



  • 4.  RE: Service Virtualization API v3

    Posted 02-19-2020 01:28 AM
    Hi Suman,

    The Update API is supported with RR pairs only currently. Say, you have RRpair1 with nameid=1 as request and 200 OK as response. And you have created a virtual service VS1 using this RRpair1. Then, say, you have RRpair2 with nameid=2 and response as 201 OK. Using this Update API, you can merge these transactions (RRpair2) to VS1. Now, VS1 will have one element "nameid" with two different Ids and based on the request, you will receive appropriate responses.

    Hope this helps.



  • 5.  RE: Service Virtualization API v3

    Posted 02-26-2020 01:55 AM
    Hi Giridharan,

    Let's take a case where RRpair 1 with nameid=1 and response 200.
    Then we need to update the response with response 404 without any change in the request.

    How can we achieve that?


  • 6.  RE: Service Virtualization API v3

    Posted 02-26-2020 02:23 AM
    Hi Suman,

    In this case, you need to set overwrite flag to 'true' in the config field before executing the Update api {"transportProtocol":{"overwriteTxns":true}}.

    Create using RRpair1 with nameid=1 and response 200
    Update using RRpair1 with nameid=1 and response 404 with overwrite flag 'true'

    Then when you replay the virtual service, for the same request, the response will be 404 and you'll not get the old response. Pls try and let me know.

    Cheers,
    Giri



  • 7.  RE: Service Virtualization API v3

    Posted 02-26-2020 03:19 AM
    Thanks Giridharan for the quick response.

    I will try and let you know at my earliest convenience.

    Can you share list of flags which are missing in the documentation site?


  • 8.  RE: Service Virtualization API v3

    Posted 02-26-2020 03:42 AM
    Thanks Suman.

    That's the only flag in the Update api. Sorry for the inconvenience in the documentation site, will get that fixed.

    Cheers,
    Giri


  • 9.  RE: Service Virtualization API v3

    Posted 02-27-2020 05:11 AM
    Hi Giridharan,

    It's not working. Can you share the complete config json object?


  • 10.  RE: Service Virtualization API v3

    Posted 02-27-2020 05:29 AM
    Hi Suman,

    This is it -  {"transportProtocol":{"overwriteTxns":true}}

    I request you to raise a ticket for tracking purpose, so that we can have a webex to answer all your questions.

    Cheers,
    Giri


  • 11.  RE: Service Virtualization API v3

    Posted 02-26-2020 04:33 AM
    We also have the same use case, but still looking for solution.