-
Notifications
You must be signed in to change notification settings - Fork 5
Static
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.
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`
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:
c. Once logged into the terminal , check for the currently running services using the “supervisorctl” command as shown below:
d. In order to Post request using Postman check for the following two services to be in RUNNING Mode.
- httplistener : Running on Port Number : 9234 – Should be in RUNNING State
- 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
a. Under Create New Tab, click on Create a Request in order to create a basic Request:
b. Enter the following Details in Save Request Window:
- Request Name
- Request Description : Optional
- Select Collection : Postman-Echo
- Click on” Save to Postman Echo” button Save Request :
a. In order to POST JSON Data, Select POST option beside the mentioned URL Name: http://192.168.0.104:9234/json/receive
b. Under Body Tab, Select on “raw” radio button and select JSON(application/json) as shown below:
c. After selecting JSON(application/json), following details should be visible under Header Tab.
Refer the below screenshot to view the JSON data to be posted in the valid format.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”}
]
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:
Step 5: Login into DNIF Console using https://go.dnif.it/
a. DNIF Console should be visible as follows :
Posted Data should appear on the DNIF Console by using the following query under Search Tab :
_fetch * from event limit 100
Entire Dataset: