cancel
Showing results for 
Search instead for 
Did you mean: 

show only completed process

JC83
Confirmed Champ
Confirmed Champ

Hi,

I'm able to get a process list .. but only with current ones

http://serveur:8081/alfresco/api/-default-/public/workflow/versions/1/processes/?

I would like to get only the completed processes

It seems that the "where" argument allows to do it but I can't find how to use it

Could someone give me the correct syntax to have it .. something like : 

http://serveur:8081/alfresco/api/-default-/public/workflow/versions/1/processes/?where=completed:tru...

thanks !

1 ACCEPTED ANSWER

angelborroy
Community Manager Community Manager
Community Manager

This works for me:

curl -X GET \
"http://127.0.0.1:8080/alfresco/api/-default-/public/workflow/versions/1/processes?where=(status%3Dcompleted)" \
-H  "accept: application/json"
Hyland Developer Evangelist

View answer in original post

4 REPLIES 4

angelborroy
Community Manager Community Manager
Community Manager

I didn't test it, but I guess following would work:

where=status:completed

For sure, keyword is "status" and "completed" is the filter value you are looking for.

Hyland Developer Evangelist

ohh I would never have found ! thank you

Maybe with another format ?

/alfresco/api/-default-/public/workflow/versions/1/processes/?where=status:completed 

returns 

{
  "error": {
    "errorKey": "framework.exception.InvalidQuery",
    "statusCode": 400,
    "briefSummary": "00110823 Une requête WHERE non valide a été reçue: status:completed, Error at char position 0",
    "stackTrace": "Pour des raisons de sécurité, le traçage de la pile n'est plus affiché, mais la propriété est conservée dans les versions précédente.",
    "descriptionURL": "https://api-explorer.alfresco.com"
  }
}

angelborroy
Community Manager Community Manager
Community Manager

This works for me:

curl -X GET \
"http://127.0.0.1:8080/alfresco/api/-default-/public/workflow/versions/1/processes?where=(status%3Dcompleted)" \
-H  "accept: application/json"
Hyland Developer Evangelist

thanks a lot !

This works !!Smiley Happy