I'm trying to deploy an Apex Class using Postman and the /metadata/deployRequest API. I get a 201 response, but when I check the deployment status, I see the error "No package.xml found".
Here's the complete body of my request including the base 64 zip. When I save the zip as a file and upload it using Workbench, it deploys.
----------------------------BOUNDARY
Content-Disposition: form-data; name="json"
Content-Type: application/json
{
"deployOptions" : {
"allowMissingFiles" : false,
"autoUpdatePackage" : false,
"checkOnly" : false,
"ignoreWarnings" : false,
"performRetrieve" : false,
"purgeOnDelete" : false,
"rollbackOnError" : false,
"runTests" : null,
"singlePackage" : true,
"testLevel" : "RunAllTestsInOrg"
}
}
----------------------------BOUNDARY
Content-Disposition: form-data; name="file"; filename="deploy.zip"
Content-Type: application/zip
UEsDBAoAAAAAANlihVbc+9DtwgAAAMIAAAALAAAAcGFja2FnZS54bWw8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJVVEYtOCI/PjxQYWNrYWdlIHhtbG5zPSJodHRwOi8vc29hcC5zZm9yY2UuY29tLzIwMDYvMDQvbWV0YWRhdGEiPjx0eXBlcz48bWVtYmVycz5IZWxsb1dvcmxkPC9tZW1iZXJzPjxuYW1lPkFwZXhDbGFzczwvbmFtZT48L3R5cGVzPjx2ZXJzaW9uPjU2LjA8L3ZlcnNpb24+PC9QYWNrYWdlPlBLAwQKAAAAAADZYoVWg7ZBRjoAAAA6AAAAFgAAAGNsYXNzZXMvSGVsbG9Xb3JsZC5jbHNwdWJsaWMgY2xhc3MgSGVsbG9Xb3JsZHtwdWJsaWMgc3RhdGljIHZvaWQgaGVsbG9Xb3JsZCgpe319UEsDBAoAAAAAANlihVZnWwVkoQAAAKEAAAAfAAAAY2xhc3Nlcy9IZWxsb1dvcmxkLmNscy1tZXRhLnhtbDw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9IlVURi04Ij8+PEFwZXhDbGFzcyB4bWxucz0iaHR0cDovL3NvYXAuc2ZvcmNlLmNvbS8yMDA2LzA0L21ldGFkYXRhIj48YXBpVmVyc2lvbj41Ni4wP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