Language Examples


RESTful APIs, part of of Live API Creator, 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 illustrates the REST Lab. Use the REST Lab to test your API.

This page describes some of the key services provided by the REST APIs that result from your resource definitions.
For more information:

Key APIs

The following table includes some of the main APIs. You can test these in the REST Lab. For more information about the details for the REST parameters, see the API Screen API Docs (available in the left navigation menu).

 APIs Description
 URL REST is usually an HTTP based protocol.
 GET Retrieving Resources defined in the API Creator.
 POST Creating new resources
 PUT Updating existing resources
 DELETE Delete existing resources.
 MERGE_INSERT    Insert new row or Update if row exists by metadata key.
 Summary Information Important summary information returned from Post, Put and Delete, including information to refresh page data and verify rule processing.

For more information:

API Samples

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

Application Oriented

A key design goal is to simplify client design, particularly with respect to performance.

For more information, 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 (for example, 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://acme.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://acme.com/rest/abl/demo/v1/lineitem?filter=order_number%20%3D%201",
        "rel": "children",
        "role": "lineitemList",
        "type": "http://acme.com/rest/abl/demo/lineitem"
      },
      {
        "href": "http://acme.com/rest/abl/demo/v1/purchaseorder_audit?filter=order_number%20%3D%201",
        "rel": "children",
        "role": "purchaseorder_auditList",
        "type": "http://acme.com/rest/abl/demo/purchaseorder_audit"
      }
    ]
  },

The following admin resources are provided:
URL Description
http://localhost:8080/rest/default/demo/v1/@tables?projectId=1078&auth=vSrmIZxaAJA9StW2XTcy:1Returns a list of all the tables in a project (here, the eval LogicDemo project).
http://localhost:8080/rest/default/demo/v1/@resources?projectId=1078&auth=vSrmIZxaAJA9StW2XTcy:1  Returns a list of all the resources in an API project.
For more information about admin resources, see System REST endpoints.
Subpages (24): View All