AnsweredAssumed Answered

Virtual Service API Create a Builder Session from a MAR (Existing VS)

Question asked by howst04 Employee on Aug 16, 2018
Latest reply on Sep 6, 2018 by howst04

I'm trying to use the Virtual Service API to update existing VS using the following command 


curl -X POST -H "Content-Type: application/zip;" -F "file1=@C:\DevTestAutomation\automation_api.mar" http://admin:admin@localhost:1505/lisa-virtualize-invoke/api/v2/vses/bak1QFW7C1oAe-dvp6FzEhX9tvvD_2f-hi7t8gVQgL/vsBuilderSessions


which returns {"error":{"type":"IOException","message":"Invalid MAR file"}}


Has anyone got some experience using this command? Any pointers? Any remarks? Thoughts?



Docops for command


Create a Builder Session from a MAR (Existing VS)


POST /vses/{vseId}/vsBuilderSessions Content-Type: application/zip  <Body: MAR file you want to upload>


{     "_links": {         "self": {             "href": "http://localhost:1505/lisa-virtualize-invoke/api/v2/vses/j4xHDBZf8x3-9Hmsv25utXt2HZjEoNlliAx3LVkNoBDN4VxvYo-m/vsBuilderSessions/efrsjq_mqVTNwXYsmQ9vxE1dYTwWNy07FD8ioKuZmVNugsgWHAU"         }     },     "id": "efrsjq_mqVTNwXYsmQ9vxE1dYTwWNy07FD8ioKuZmVNugsgWHAU",     "modifyDate": "2016-12-20T14:34:21-06:00",     "defaultNonLeafTolerance": "WIDE",     "name": "test001",     "description": "Optional description",     "defaultLeafTolerance": "LOOSE",     "version": "2",     "createDate": "2016-12-20T14:34:21-06:00" }

The request should have a VS MAR file with content type set to application/zip. A successful response returns a JSON object that represents the newly created builder session object. Using the previous example, the {sessionId} is efrsjq_mqVTNwXYsmQ9vxE1dYTwWNy07FD8ioKuZmVNugsgWHAU.