local_postman - DeboraEngelmann/helloworld_from_jason GitHub Wiki

Testing project locally with Postman

Open the project in the terminal

If you prefer, you can open another terminal and navigate to the project folder.

Run the command gradle build and right after, gradle run. This may take some time.

The MAS Console will be open. Copy the address where the JaCaMo Rest API it's running (if 0.0.0.0:8080 is showing, use the address http://localhost:8080/).

Open the Postman in create a request select type POST and paste the address of the JaCaMo Rest API in the address bar. In page Body select type raw and type file JSON, and paste the following code into the request body:

{
  "responseId": "d181b9c7-22ae-4bab-bab3-9dfa70310452-5fd6c646",
  "queryResult": {
    "queryText": "Diga oi ao agente Jason",
    "parameters": {
      
    },
    "allRequiredParamsPresent": true,
    "fulfillmentText": "Here will be called the Jason agent!",
    "fulfillmentMessages": [
      {
        "text": {
          "text": [
            "Here will be called the Jason agent!"
          ]
        }
      }
    ],
    "intent": {
      "name": "projects/integration-example-nymoic/agent/intents/ea529dec-e89f-48aa-bf43-527264379f06",
      "displayName": "Call Jason Agent"
    },
    "intentDetectionConfidence": 1,
    "diagnosticInfo": {
      "webhook_latency_ms": 405
    },
    "languageCode": "en"
  },
  "webhookStatus": {
    "message": "Webhook execution successful"
  }
}

This code is an example of a request made by Dialogflow. Let's check if our application can answer it.

Check the response received from the agent.