Docs‎ > ‎

REST APIs



RESTful APIs - part of Live API - provide the "crud" services for your resources:
  • GET (read), including filters and sort

  • POST (insert, one or multiple rows)

  • PUT (update, one or multiple rows)

  • DELETE

The diagram at right shows that you can use the REST Lab to test your API, without having to write a one-off test program.

The page below described some of the key services provided by the REST APIs that result from your Resource definitions.



Key APIs

This table introduces some of the main APIs.  You can test these - without writing a program - in the REST Lab (shown at right).  You can find details about REST parameters here, under the package com.kahuna.server.rest.

 URL  REST is usually an HTTP based protocol.  This page describes how your projects' URLs are constructed
 Retrieval  Retrieving Resources defined in the Logic Designer
 Post  Creating new resources
 Put  Updating existing resources
 Delete  Delete existing resources
 Summary Information  Important summary information returned from Post, Put and Delete, including information to refresh page data and verify rule processing
 Error Handling  

 

API Samples

In addition to the REST Lab, you can review programs:

Several general principles are noted below.


Application Oriented

A key design goal has been to simplify client design, particularly with respect to performance.  See optimistic locking, refresh, and heterogeneous updates.

Parameters vs. Headers

Request elements typically associated with headers can be supplied as parameters, to facilitate testing via browsers.  For example, you can specify the api key as the auth parameter.

Sub Resource Reference and Operation

Resources can consist of Sub Resources, typically for related data (the Lineitems contained in an Order, or the Product information for a LineItem).  The API is designed so you can operate on Sub Resources (e.g, update them), which you reference with a dot notation in your URL such as Customer.Orders.Lineitem.

Discoverability

A key goal of REST is to make your API discoverable by software.  GET requests on base table resources return link objects:

  {
    "@metadata": {
      "href": "http://houston.d.espressologic.com/rest/abl/demo/v1/purchaseorder/1",
      "checksum": "A:d1e88016526ce84e"
    },
    "order_number": 1,
    "amount_total": 35,
    "paid": false,
    "item_count": 2,
    "notes": "This is a small order",
    "customer_name": "Alpha and Sons",
    "salesrep_id": 1,
    "links": [
      {
        "href": "http://houston.d.espressologic.com/rest/abl/demo/v1/lineitem?filter=order_number%20%3D%201",
        "rel": "children",
        "role": "lineitemList",
        "type": "http://houston.d.espressologic.com/rest/abl/demo/lineitem"
      },
      {
        "href": "http://houston.d.espressologic.com/rest/abl/demo/v1/purchaseorder_audit?filter=order_number%20%3D%201",
        "rel": "children",
        "role": "purchaseorder_auditList",
        "type": "http://houston.d.espressologic.com/rest/abl/demo/purchaseorder_audit"
      }
    ]
  },


The following Admin Resources are provided:

 URL  Description
https://eval.espressologic.com/rest/abl/admin/v2/@tables?projectId=1078&auth=vSrmIZxaAJA9StW2XTcy:1 Returns a list of all the tables in a project (here, the eval LogicDemo project)
https://eval.espressologic.com/rest/abl/admin/v2/resources?projectId=1078&auth=vSrmIZxaAJA9StW2XTcy:1   Returns a list of all the Resources in a project

Note: the auth id above is not your usual projects' authorization.  It is the admin apiKey, provided in your signup email.

URL Parameters

Please see this page for important URL parameters.

Subpages (25): View All