Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Section


Column
width30%

Burti API allows you to implement additional layers and logic to control who and how can access the API as a whole or separately for its' endpoints. As Ask us for more details on how to do it, as this is an advanced topic and will require HAL programming.

This is done using the field "Custom boolean auth.function" on each relevant interface definition record, found in the "Burti - JSON API" module.

The function can be as simple as a username/password check that is passed along additionally with the request or as complex as calculating and validating against a passed hash of the request by a pre-determined algorithm.


Column
width70%


...

Section


Column
width30%

Retrieving the database structure of a register

To generate the various end-points Burti API relies on the database structure that Standard ERP exposes via the Export/import Format report in its' Technics module.

When the report is run without specifying a register code, it will dump the database definitions of all the registers in the database. These are for example Invoices, Sales Orders, Deliveries and such.

You will need to look up the register(-s) that you wish to expose via the API in this report and then separately export these to a text file.

Example

In this example we show how to retrieve the database structure of the Orders register to use for creating its' API end-point.

Step 1: Enter the keyword "Orders" in the search field of the report

Step 2: Cycling through the search results pin-point the correct register and take note of its' code (ORVc).

Step 3: Reopen to the Report Specification window using the cogwheel menu available in the upper-left hand corner of the window.

Step 4: Enter the register code (ORVc in this example) in the field labeled "Vc (View Code)", set Media to File and press Run to save the definition in a file.


Column
width70%


...

Section


Column
width50%

Read API

Functions are available in the register's Read interface's Tools file as previously mentioned.

FunctionUsage

AddInfoGeneral 

Allows to add any additional information in the response JSON. This will appear as the contents of the response block's addinfo JSON property

Options 

Allows to set specific options for this request block (e.g. things like JSON formatting options)

AddInfoRec 

Allows to add any additional information in the response JSON of specific records. This will appear as sibling data to the record's fields. If you wish to separate, you need to explicitly make a wrapping property.

AddInfoRow 

Allows to add any additional information in the response JSON of specific records rows. This will appear as sibling data to the row's fields. If you wish to separate, you need to explicitly make a wrapping property.

LoopTest 

Allows to add additional test conditions for record loops, that are more complex that checking agains a single value of a field

LoginTest 

Allows to add authentication logic that's specific to a register's API

NewExtra 

Allows to add extra information when retrieving a blank record template with the new parameter.



Column
width50%

Write API

Functions are available in the register's Write interface's Tools file as previously mentioned.

FunctionUsage

SaveCheck 

 

Allows to add RecordCheck-like validations or even a full RecordCheck call

DeleteCheck 

 

Allows to add custom logic for validation record deletion

SaveWarnings 

 

Add custom warnings that do not fail the storing of record, but simply provide some warning-level feedback

SaveExtra 

 

Allows to perform additional actions when storing records

DownloadFileTest 

 

Allows to implement custom logic when determining whether attachment download is allowed for a record

UploadFileTest 

 

Allows to implement custom logic when determining whether attachment upload is allowed for a record

RemoveFileTest 

 

Allows to implement custom logic when determining whether attachment removal is allowed for a record

PasteValue 

Can add actions that should be run after setting a value for each or separate fields. This is similar to AfterEditField Window Actions



...