Service Virtualization

  • 1.  use invoke API REST to start/stop a VS

    Posted Feb 16, 2016 04:59 AM

    Hello,

     

    I'm trying to start a VS by using this action

     

    http://my_host:my_port//api/Dcm/VSEs/my_VSE/my_VS/actions/start

     

    , but I have a problem of access as you can see :

    Thanks for helping,

     

    Souhail



  • 2.  Re: use invoke API REST to start/stop a VS

    Posted Feb 17, 2016 12:39 PM

    see my sample scripts in the answer here

     

    how can I execute deploymar via curl

     

    add/remove/start and stop service



  • 3.  Re: use invoke API REST to start/stop a VS

    Broadcom Employee
    Posted Feb 18, 2016 01:35 AM

    Hi Souhail,

     

          Please use REST client plugin on your browser like Postman REST client plugin for Chrome browser and pass mar file as an input to it during deployMar to deploy the mar file.

     

    Please go through below link for more details about how to add mar file as an input parameter to REST URI

     

    https://communities.ca.com/message/114022292#114022292

     

    Postman REST client plugin can be downloaded from

    https://chrome.google.com/webstore/search/postman%20rest%20client?hl=en

     

    Thanks

    Srikanth



  • 4.  Re: use invoke API REST to start/stop a VS

    Posted Feb 18, 2016 04:21 AM

    Hi,

     

    Thank you for your help, I’m working with Postman, and everything seems right.

    I have a question, how can I use a script (in Groovy or JavaScript for example) to automatize starting/stopping a VS or listing a list of VSE ?

     

    I’m using a script in Groovy where I can generate an XML file for a specific URL, but when I’m using as an url = http://ncelisaserver.etv.nce.amadeus.net:1505/api/Dcm/VSEs/VSE-PNR/ to post for example the list of VSE, I have a 401 ERROR for authorising access..? while in a simple browser like Chrome or Postman I have the result I want…

    I tried with headers.'Authorization' = "Basic ${"login:password".bytes.encodeBase64().toString()}"the but I can’t keep my session for all request because I have a content = null …

     

     

    Thanks for helping

     

    Souhail BOUZAFOUR

    R&D/AQG/QLM/QAM/QME

    Amadeus sas

    485 route du Pin Montard

    06902 Sophia Antipolis

    France

    T: +33 4 9715 8970<tel:%2B33%204%2097%2004%202977>

    souhail.bouzafour@amadeus.com<mailto:souhail.bouzafour@amadeus.com>

    www.amadeus.com<http://www.amadeus.com/>