Chapter 19. Application Programing Interface (API)

Table of Contents
19.1. Acquiring Access Token
19.2. Access To PostgreSQL Tables
19.2.1. Create Dataset
19.2.2. Read Dataset
19.2.3. Update Dataset
19.2.4. Delete Dataset
19.2.5. Fine Grained Pre-check Function
19.3. Calling PostgreSQL Functions or Procedures

This chapter currently applies only to cloud version of PostERP.

Outside world can automatically exchange data set with PostERP by calling its representational state transfer RESTful API.

Calling RESTful API is in essence directly manipulating PostERP database similar to sending SQL commands for execution. All CRUD (Create, Read, Update, Delete) operations on database tables can be performed by API calls.

Note

This section assumes that PostERP runs in your host https://34.terarows.com.

Every API call must consists of an HTTP request in JSON format and be posted to https://34.terarows.com/fastcgi/api/.

Each response consists of HTTP response code. Response code 200 indicates successful API call. Other response codes with optional error messages indicate failed API calls.

When an API call requests for data set and succeeds, PostERP responds with a JSON array.

Privilege checks are performed on each API calls through this service.