Skip to main content
Version: 10.2.4

Packages API

If no binary files are transferred, the request body should be passed in the JSON format:

{
"campaignUuid" : "8f6bd9c9-468f-4c30-9e21-2e942b47d8a5",
"workforceUuid" : "0a0315d0-c917-11e5-81c5-22000bb0e696",
"fileSeparator" : ",",
"mainData" : "colA,colB\r\nvalA1,valB1\r\nvalA2,valB2"
}

Request headers:

  • Authorization: Basic
  • Accept: application/json
  • Content-Type: application/json

Package import conflict resolution types:

  • CREATE_WITH_NEW_NAME

  • REPLACE_EXISTING

  • SKIP_IMPORT

note

Authorization is required.

MethodURLDescriptionParametersExample
GET/runs/{uuid}/packagesRetrieve the list of existing packages for the specified run
curl -i -v     -H "Accept: application/json" -H "Content-Type: application/json" --user user:password     -X GET https://instance_url/mturk-web/soap/api/runs/621fcab5-9fca-4273-9ae3-3fafdd518f18/packages
POST/runs/{uuid}/packagesCreate a new package for the specified runCreatePackageDto
{"name":"rest-package-name","description":"rest-package-description","dataStoreNames":["test"],"targetVersion":"7.4.1"}
GET/packages/{uuid}/fileDownload a package by the specified UUID
curl -i -v     -H "Accept: application/json"     -H "Content-Type: application/json" --user user:password -o package.zip     -X GET https://instance_url/mturk-web/soap/api/packages/539905d4-82bf-4ae5-b9ba-428beef49506/file
DELETE/packages/{uuid}Delete a package by the specified UUID
GET/runs/{uuid}/data-storesRetrieve a list of used Data Stores in the specified run
POST/packages/importImport a provided packagepackageFile,
Optional: conflictResolutions (PackageConflictsDto)
curl -H "Content-Type: multipart/form-data"     -F "conflictResolutions=@conflicts.json; type=application/json"     -F "packageFile=@BP+with+DS+20-6-2016.zip; type=application/octet-stream"     -X PUT https://instance_url/mturk-web/soap/api/packages/import -i -v --user user:passwordconflicts.json: {    "dataStoreConflictResolutions":[{"name":"customers_datastore","type":"SKIP_IMPORT"}],    "includedConfigsResolutions":[
{"name":"common-functions","type":"REPLACE_EXISTING"}, {"name":"rpa-functions","type":"CREATE_WITH_NEW_NAME","newName":"rpa-functions-v2"} ]}