A REST request is sent from a client as an HTTP verb (GET, POST, PUT, or DELETE), followed by the URL of the resource. The syntax is similar to that of other types of JADE Web‑enabled applications.
Verb IIS server URL/jadehttp.dll/path[.xml|json|jsonn]?app_name[&extra_info] <‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑> <‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑> <‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑> first part second part third part
The following JADE REST service request retrieves information in JSON format for a customer with an identifier of 123.
GET http://localhost/jade/jadehttp.dll/customer/123.json?RestApp <‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑> <‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑> <‑‑‑‑‑> first part second part third part
The first part of the URL is the path to the jadehttp.dll file.
http://localhost/jade/jadehttp.dll
In this example, the IIS host is the local machine and jade is an alias defined in IIS for the physical directory that contains the jadehttp.dll file.
The second part of the URL contains the following.
Identifier of the resource, which in this example is customer.
The
Each additional URL path level is a parameter passed to the called method. Each string value is converted to the required method parameter type. An exception is raised if the data is invalid or there is a mismatch in the number of parameters.
A GET request for /customer/123 would result in a getCustomer(123) method call; that is, the getCustomer method would require the first parameter to be of the
A GET request for /customer/Clark Kent would result in a getCustomer("Clark Kent") method call; that is, the getCustomer method would require the first parameter to be of the
REST requests must be URL-encoded before the request is sent, so that /customer/Clark Kent would become /customer/Clark%20Kent.
A GET request for /customer/Clark Kent/Smallville would result in a getCustomer("Clark Kent", "Smallville") method call; that is, the getCustomer method would require the type of the first and second parameters to be
URL path levels separated by the slash character (/) are used to pass primitive parameters. An object parameter is passed as XML or JSON as the body of the data received. You can pass one object parameter only in a REST service request.
A
You can include the output format of the data at the end of the path information.
/customer/123.xml returns customer information in Microsoft XML format
/customer/123.json returns customer information in Microsoft JSON format
/customer/123.jsonn returns customer information in NewtonSoft JSON format
If the output format is not specified (/customer/123), data is returned in Microsoft JSON format.
The third part of the URL is the query string. It contains the name of the JADE REST services application. In the following example, the JADE REST services application is called RestApp.
GET http://localhost/jade/jadehttp.dll/customer/123.json?RestApp
For a GET request, you can append an ampersand character (&) followed by the XML or JSON for an object, if the REST services method has an object parameter in the signature.
For a POST, PUT, or DELETE request, you can supply the XML or JSON for an object in the request body, if the REST services method has an object parameter in the signature.
The type of the object is specified by the type of the parameter in the signature of the
See also "Parsing JSON Text".