Table of Contents
...
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...
File | Role | ||||
---|---|---|---|---|---|
halcust/serverJSON/generated-interfaces/JSON_InterfaceCallers.hal | This is is the main entry point for all API calls. Think of it as a router. Everything will go through this file and get re-routed to the appropriate API sub-routines.
| ||||
| |||||
halcust/serverJSON/generated-interfaces/JSON_ORVc.hal | This is the main Read API functionality. It contains code for all the indexing, filtering and include/exclude options you selected.
| ||||
halcust/serverJSON/generated-interfaces/JSON_ORVc_Tools.hal | This file is where the Read API customisation happens. This contains all the available HAL hooks that you can take advantage of to either include additional data or add custom filtering or other behavior to the API. The various possibilities are documented towards the end of the documentation. | ||||
halcust/serverJSON/generated-interfaces/JSON_Save_ORVc.hal | This is the main Write API functionality. It's responsible for populating the record with the field values that you pass via the API.
| ||||
halcust/serverJSON/generated-interfaces/JSON_Save_ORVc_Tools.hal | This file is where the Write API customisation happens. This contains all the available HAL hooks that you can take advantage of to either include record validations, additional calculations, changes to other linked records etc. The various possibilities are documented towards the end of the documentation. |
Read API
Entry point
The All Read API is accessed via the following single entry-point URL:
Code Block | ||
---|---|---|
| ||
https://your.server.address/Web_JSON_Composer.hal |
Batch requests
The API allows for multiple requests to be made simultaneously in one call. Depending on the application this can have advantages, mostly performance related. This is done by prefixing all API call parameters with a request number, starting with zero.
Info |
---|
This means that |
Look for examples below the parameter descriptions on how to piece this together.
Parameters
Parameter | Usage | ||||
---|---|---|---|---|---|
| This routes the API to the specific register's end-point. This is supplied in the following format:
So for example for the Orders register with code | ||||
company | The company number from which you wish to the data to be retrieved. | ||||
(optional) | Set this to Defaults to | ||||
(optional) | The number of records to return. Defaults to | ||||
(optional) | Used together with the count paramete to skip the first set of records when employing a paginated record retrieval approach (i.e. offset of 50 with count of 50 would mimic requesting a second page of 50 records). | ||||
since_seq (optional) | All data sets for registers that support sequencing/sequence numbers are returned along with the current database sequence number - a counter that is increased when a change is made in the respective register. If you record this number and then use it as the since_seq parameter in subsequent calls, you can retrieve only the records that have changed since the previous data request. | ||||
index (optional) | Select the index you wish your data to be sorted by or looked up by. Must be defined in the API Register Definition. Defaults to the main key specified on the API Register Definition. | ||||
(optional) | If you do not wish to lookup data by specific values of the fields in the specified Defaults to | ||||
sort_order (optional) | Set to Defaults to | ||||
(optional) | When looking up data by specific Defaults to | ||||
fieldlist (optional) | When looking up data by specific This is then accompanied with additional dynamic fieldname-named parameters. Example:
| ||||
(optional) | This parameter will return a blank record to be used as a template for populating a new record. | ||||
(optional) | Set this to Default value is | ||||
(optional) | Use this to list parameter names that you wish to see the values of dumped to the debug information log. |
Write API
Section | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
...