|As shown here, select REST Lab in the Logic Designer to test retrieval and update logic without writing a program, including provisions for REST Parameters.
You can operate on these End Points:
- Base Tables - this gives you an instant way of retrieving and loading data, for example.
- View Tables
- Stored procedures
- Resources - you can also test explicitly defined Resources
REST Lab Screens
The sub-sections below outlines the various screens provided in the Rest Lab.
Select your Resource or Table, and click
Send Request as shown here. You will then see the result as shown in the following sections.
In rare cases, you may wish to override
the optimistic locking check for PUT requests. Do so with care.
After updates, you can explore the Transaction Summary (
Tx Summary) and the
Rule Summary to investigate the results of your requests' logic.
You can view the JSON response in the lower pane after you click Send Request.
You can then copy selected JSON and copy to the Request area, change it (such as the change to
qtyOrdered above), then click
Put to issue an update. (Select
Put using the drop down box on the green
As described in Summary Information
, you can also see the effects on related rows, and the logic execution flow.
The REST Lab is very useful in managing and testing your data. In the examples below, we use Base Tables. We could also use Resources, but Base Tables are available as soon as you create your project and connect to a database, so they are often the simplest.
The REST Lab enables you to rapidly test your API without writing programs, for example:
- Security: you can examine the Security-augmented SQL as shown here
- Updates - you can post/put data as shown in the sub-sections below
- Logic: you can issue updates and examine the Log as shown for Allocation. It is often easiest to:
- Select a Table (so you don't need to define a Resource)
- Perform a Get
- Copy a portion of the resultant JSON
- Return to the Request pane, paste the JSON, update it as desired, select Put, and Send Request. To debug your logic:
Reading Data - GET
You can retrieve data with filters or sorts using GET
, such as
REST retrieval requests commonly specify filtering and ordering for the top-most Resource. Since these are coded into the URL, proper escape sequences must be employed (we often use this tool
Here is a GET using a simple filter:
Here is a GET request for customers with name < 'Shari', ordered by name (descending):
Filters are sql WHERE clauses, so you can use familiar functions such as LIKE:
Other SQL rules apply as well, such as interchanging quotes for double-quotes, checking for null (e.g.,
filter=name+IS+NOT+NULL), and so forth.
Explore the other parameters for GET here (see API Information,
The Get option simplifies filter testing by providing automatic HTTP escapes:
Loading Data - POST
In addition to the example shown on the REST Lab, you can process batches of JSON. For example, this JSON:
"name": "New Cust 1",
"name": "New Cust 2",
can be loaded using POST as shown below:
As shown at the top of this page, the Samples section describes how to do an update.
Deleting Data - DELETE