Skip to content
anandam1992 edited this page May 21, 2018 · 1 revision

Process of feeding Dynamic data into DNIF A10 Container Using Postman Application

About Postman :

Postman is a application for interacting with HTTP APIs. It presents you with a friendly GUI for constructing requests and reading responses.

HTTP VERBS generally used in POSTMAN

GET : Read a specific resource (by an identifier) or a collection of resources.

HEAD : Works same as GET, just returns the header.

PUT : Update a specific resource (by an identifier) or a collection of resources. Can also be used to create a specific resource if the resource identifier is known before-hand.

DELETE : Remove/delete a specific resource by an identifier.

POST : Create a new resource. Also a catch-all verb for operations that don't fit into the other categories.

Steps carried out to feed data into DNIF Console using Postman Application:

Step 1 : Access the DNIF Container via SSH on a custom SSH Port i.e. 826

a. Login into the DNIF Container using the Host Machine and ssh using the root user to the mapped SSH Port using the following command.

    `$ssh root@localhost -p 826`

Connect to SSH Video

b. Enter the required password credentials as mentioned in https://dnif.it/docs/guides/tutorials/access-dnif-container-via-ssh.html in order to access the DNIF Container. Following bash prompt should be visible in the terminal:

image

c. Once logged into the terminal , check for the currently running services using the “supervisorctl” command as shown below:

image

d. In order to Post request using Postman check for the following two services to be in RUNNING Mode.

  1. httplistener : Running on Port Number : 9234 – Should be in RUNNING State
  2. httpslistener: Running on Port Number : 9236—Should be in RUNNING State

e. In order to start the required services as shown in the screenshot below, use the following commands: supervisorctl > start httplistener supervisorctl > start httpslistener

image

Step 2: Download the Postman API Development Environment from the given link below:

https://www.getpostman.com/

image

Step 3: Once downloaded, open the Postman Desktop application:

a. Under Create New Tab, click on Create a Request in order to create a basic Request:

image

b. Enter the following Details in Save Request Window:

  1. Request Name

image

  1. Request Description : Optional
  2. Select Collection : Postman-Echo
  3. Click on” Save to Postman Echo” button Save Request :

image

Step 4: Following Window is visible to the user:

image

a. In order to POST JSON Data, Select POST option beside the mentioned URL Name: http://192.168.0.104:9234/json/receive image

b. Under Body Tab, Select on “raw” radio button and select JSON(application/json) as shown below:

image

c. After selecting JSON(application/json), following details should be visible under Header Tab.

image

d. Under the Body Tab , include the JSON data to be posted to the DNIF Console in the following format (key : value – dictionary format) : [ {“field1”: “data1”} , {“field2:”data2”}, . . . {“field n”:”data n”} ]

Refer the below screenshot to view the JSON data to be posted in the valid format.

image

e. Click on Send Button

The Request should be Posted and under Header Tab : Status of the Response should be “added” for the posted JSON data as shown below:

image

Step 5: Login into DNIF Console using https://go.dnif.it/

image

a. DNIF Console should be visible as follows :

image

Posted Data should appear on the DNIF Console by using the following query under Search Tab : _fetch * from event limit 100

image

Entire Dataset:

image

Clone this wiki locally