0 Replies Latest reply on Apr 6, 2018 11:22 AM by Chris Tyler

    REST API dcuments

    Chris Tyler Newbie



      can someone please clarify some questions using REST api about documents I'm not able to resolve?


      Wildfly: 10.1


      First i would like to upload documents.


      POST: http://localhost:8080/kie-server/services/rest/server/documents


      {"document-id": "a195ce5e-e023-498d-887a-588435dbd44a",

      "document-name" : "document.pdf",

      "document-link" : "a195ce5e-e023-498d-887a-588435dbd44a",

      "document-content" : "JVBERi0xLjMKMyAwIG9iago8Qu="}


      The document will upload but I get an error 500 (Internal Server Error).

      Furthermore I notice that the id number is different. Why? and how can I define one?



      I would like to upload a document as a process variable


      PUT: http://localhost:8080/kie-server/services/rest/server/containers/HR_1.0/tasks/2/states/completed


      {"DocumentImpl" :




         "size": "xxxx",

         "lastModified": "",



      This also ends up with an internal error because the documents will not be saved and my variable points to an empty spot and breaks my process. Same problem with the id number.


      The documentation is not very clear and also on http://localhost:8080/kie-server/docs I can't find any usefull information about documents. Can someone please give me a hint?


      Is it possible to define a process variable as a list of documents? I need to implement a process task gathering documents.