An Example POST Body Request for the API /task/packages Endpoint
To help you use the API /task/packages endpoint, here is an example POST body request. This example loads the ServiceNow plugin (sw_servicenow_2.1.1.swimbundle) with a POST to the API /task/packages endpoint:
$ curl -k --location --request POST 'https://xxx.xxx.xxx.xxx/api/task/packages' --header 'Connection: keep-alive' \
--header 'Authorization: Bearer XXX \
--header 'Content-Type: multipart/form-data' \
--form 'file=@/home/swimlane-host/sw_servicenow_2.1.1.swimbundle'
Which returns the response body:
{"$type":"Core.Models.Integrations.Actions.PackagedDescriptorViewModel, Core",
"pythonVersion":"2.7","id":"sw_servicenow","name":"sw_servicenow","description":"ServiceNow Ticket Management",
"author":"Swimlane","author_email":"[email protected]","version":"2.1.1","url":"http://swimlane.com",
"installRequires":[],"packages":["sw_servicenow"],"bundleHash":{"$type":"System.Byte[], System.Private.CoreLib","$value":""},
"fileId":"aCl_q2Y0l3QW_Y4Qw","isEmailBundle":false}
The βBearer XXXβ is the authentication token for a user defined in the Swimlane UI (e.g. admin). Before executing the curl command, sw_servicenow_2.1.1.swimbundle was downloaded into /home/swimlane-host.