Use of App Shielding REST API
Monday, April 4, 2022 at 08:30amHi,
We are trying to automate the app shielding process in our CI platform by using the REST API.
The API method https://cp.onespan.com/public_api/v1/rasp/bind_package takes a file as a parameter but on use it returns "(422) Unprocessable Entity."
Below the PowerShell code:
$headers = @{"X-API-KEY" = "$apikey"
"Content-Type" = "application/json"
}
$filepath = "app-release.aab"
$uri = "https://cp.onespan.com/public_api/v1/rasp/bind_package?file=app-release.aab"
$response = Invoke-RestMethod -Uri $uri -Method Post -Headers $headers
I've tried adding the file as an inputfile in the Invoke-RestMethod as such :
Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -InFile $filepath,
but it returns an error 500 from the server.
Has anyone an idea on what's expected to be set as the file and if it does indeed upload the binary?
Regards,
Samy
Reply to: Use of App Shielding REST API
Tuesday, April 5, 2022 at 09:00amHi Samy,
Please kindly raise your question to [email protected] and our support agents would reply back to you in a short time.
Duo