1
0
-1

After no success testing API Builder on an AWS Marketplace Joget instance on Windows 2019 Server I added an AWS Marketplace Joget instance on Ubuntu 18.04. Immediately all of the "Try it out" calls worked under the Swagger UI tab, which had never worked on the WIndows 2019 Server Joget instance. This puzzles me.

However, I still cannot get the API calls I created to work in either Postman or internally using a JSON Tool. In both cases I still get "Bad Request" as shown below in the App Log (IP & Authorization obscured)

1679
INFO 24 Sep 2022 15:34:27 org.joget.apps.app.lib.JsonTool - POST : http://xxx.xxx.xxx.xxx:8080/jw/api/process/requesterProcess/copyProcess/109_ifcsnsandbox_requesterProcess
1680
INFO 24 Sep 2022 15:34:27 org.joget.apps.app.lib.JsonTool - Adding param api-id : API-843c4905-d63c-4a74-b860-d6fdefc4e853
1681
INFO 24 Sep 2022 15:34:27 org.joget.apps.app.lib.JsonTool - Adding param api-key : 249b9284b4de43c18e5d93e486939705
1682
INFO 24 Sep 2022 15:34:27 org.joget.apps.app.lib.JsonTool - Adding param Authorization : Basic YWRtaW46Sm9nZXXXXXXXXXXX
1683
INFO 24 Sep 2022 15:34:27 org.joget.apps.app.lib.JsonTool - http://xxx.xxx.xxxc.xxx:8080/jw/api/process/requesterProcess/copyProcess/109_ifcsnsandbox_requesterProcess returned with status : 400
1684
INFO 24 Sep 2022 15:34:27 org.joget.apps.app.lib.JsonTool - {"date":"Sat Sep 24 15:34:27 UTC 2022","code":"400","message":"Bad Request"}

Maybe this is part of my confusion:

I don't understand api-id used here which does not match with the ones I create, and the key is obscured but it works.



    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi,

      have you tried the API Builder Demo App? API Builder - Marketplace Knowledge Base - Joget | COMMUNITY

      There's some guidance on how to use API Builder.

      Things to watch out for:

      1. Manage API Key Userview Menu → ensure to create an API key
      2. Manage API Key Userview Menu → Authentication Method (important!)
      3. Manage API Key Userview Menu → whitelist
      4. If you're going to start a process → make sure in App Design > Processes > Process Start White List is set correctly. i.e starting a process as a normal user but process start white list only allows admin, you're gonna get errors
      5. API Builder → OAS3 Document → curl command: yeah I think this is just a sample. If you try changing api_key & api_id on curl, it'll work. 
      6. Using Postman → ones I constantly make mistakes is putting the api_key & api_id in Params tab instead of Headers
      7. Using Postman → Authorization tab choose the correct type


      note: this is tested on my local. not sure about AWS, 


        CommentAdd your comment...