HTTP JSON Server

HTTP JSON Server plugin can be found in Servers tab on the left panel of Designer Section.

Configuration

In this article:

To configure the plugin set up:

  1. Enter any available TCP Port.
  2. Enter any ServiceName.
  3. You can specify the LogLevel.

Tip

Your endpoint links will be as follows: http(s)://Server Address:Port/ServiceName/Path/MethodName(?Parameters)

e.g. http://localhost:20050/TestServiceName/TestPathName/TestMethodName?param=1 in case with GET request

Note

You can also use SSL and attach the needed certificate.

Building structure

To start building plugin's structure:

  1. Click Add Path to add path.
    New tab will the given name will appear.
  2. Now you can add GET/POST method in this tab.

Note

GET/POST method's name can be empty.

POST method has Request and Response tabs.

GET method has Parameters instead of Request tab.

To add new request field enter its name and click Add Field.

There are several options of Request fields:

  1. String, String [] - represent string and string array accordingly.
  2. Int, Int [] - represent integer and integer array fields accordingly.
  3. Float, Float [] - represent float and float array fields accordingly.
  4. Object, Object [] are represented by JSON and JSON array structures accordingly
    Both Object and Object [] can have String, Int, Float and Object nested.

Response tab also has multiple options:

  1. Raw JSON
  2. Raw HTML
  3. Object has multiple fields types and can be nested:
    • String, String [] - represent string and string array accordingly.
    • Int, Int [] - represent integer and integer array fields accordingly.
    • Float, Float [] - represent float and float array fields accordingly.
    • Object, Object [] - represent Object and Object array accordingly. Basically that means that you can have multiple nested structures.

Example

Given that our Server has Port 20050 and ServiceName is sql, Path is People our link will look like: http://localhost:20050/sql/people?eye_color=...&age=5=....

Here is an example of JSON Response:

{
"People": [
{
"id": "c3958428-0d3d-491b-8143-f7bd72b4646b",
"name": "Diane",
"company": "INSURITY",
"email": "undefined.undefined@insurity.tv",
"phone": "+1 (820) 450-3084",
"address": "493 Apollo Street, Soham, Louisiana, 6548",
"age": 55
},
{
"id": "c5d8d31c-84dd-45c4-a867-77e2bb4ef647",
"name": "Kidd",
"company": "SNORUS",
"email": "undefined.undefined@snorus.tv",
"phone": "+1 (848) 586-2395",
"address": "478 Hendrickson Street, Juarez, Nebraska, 3447",
"age": 16
}
]
}