Page 1 of 1

Delete Input Document file

Posted: Mon Jul 18, 2016 3:44 am
by jagannew
HI ,
i am Delete file from frontend using Process maker RestAPI. but i got the following error mesage

{"error":{"code":400,"message":"Bad Request: **ID_CASES_INPUT_DOCUMENT_DOES_NOT_EXIST**"}}


this is my CODE:

var app_doc_uid=XXXXXXXXXXXXXXXXX;
var del_index=1;
var caseId=XXXXXXXXXXXXXXX;

var requestYmc = $http({
method: 'POST',
url: $scope.serverUrl + $scope.workspace + '/oauth2/token',
data: $scope.credentials
});
requestYmc.success(function (html) {


$scope.AccessToken = html.access_token;
var requestZmc = $http({
method: 'DELETE',
url: $scope.serverUrl + 'api/1.0/'+$scope.workspace+'/cases/'+caseId+'/'+del_index+'/input-document/'+app_doc_uid,
headers: { 'Authorization': 'Bearer ' + html.access_token }
});
requestZmc.success(function (html) {

console.log(html);



});
});

Re: Delete Input Document file

Posted: Wed May 06, 2020 3:19 pm
by RicardoMG
Hello!

If you are calling this endpoint, you need to change your code from:
Code: Select all
 method: 'GET',
to:
Code: Select all
 method: 'DELETE',

Best regards, Ricardo.