How to use curl command to create virtual service using Devtest?
All supported DevTest releases.
N/A
Below the sample curl command to create virtual service using RR pairs.
Make sure file 'get_cities_Valid.zip' exists in the folder where curl.exe is available.
Command to use:
curl -k -u "admin":"admin" -X POST "https://<Host_name>:1505/lisa-virtualize-invoke/api/v3/vses/VSE/services" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "config={\"virtualService\":{\"version\":\"2\",\"name\":\"api_testing_Siva\",\"description\":\"Invoke API V2\",\"status\":\"\"},\"transportProtocol\":{\"typeId\":\"HTTP\",\"basePath\":\"/\",\"useGateway\":true,\"hostHeaderPassThrough\":false},\"dataProtocol\":{\"forRequest\":true,\"typeId\":\"RESTDPH\"}}" -F "[email protected]_cities_Valid.zip;type=application/x-zip-compressed"