search cancel

How to use curl command to create virtual service using Devtest

book

Article ID: 188949

calendar_today

Updated On:

Products

CA Cloud Test Mobile CA Application Test

Issue/Introduction

How to use curl command to create virtual service using Devtest?

Environment

Release : 10.5

Component : CA Service Virtualization

Resolution

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"