Skip to content

API Documentation

The i-refactory Rest API is documented with Swagger. In order to view the Rest API specification a server can be started with which the Rest API interface specification can be viewed (https://:3001/).

API call syntax

Spaces (underscores) are not used in api call queries! The first word is lower-case, the first letter of the next words (without spaces!) start with an upper-case, see example code in the selectstatement: “attributeType.atomicType.dataTypeExpr”.

joinStatement

This is only required when a result is mandatory (a null value as result will result in 0 records as output. Left joins are automatically made and therefore, do not need to be filled in (see selectStatement below). A join has the following syntax:

  • first table: “table”
  • second table: “table.table”
  • third table and so forth.:”table.table.table” and so forth

An ‘is source of’ or ‘is target of’ relation works differently, an ‘is target of’ relation has the following syntax: “table.target$table”. For example: “entityMapping.target$Entity”.

selectStatement

The desired columns can be selected in the selectStatement, when a join is needed to get a desired column, the following syntax must be used: “table.column”. When multiple join are needed, the following syntax must be used: “table.table.column” and so forth. Columns from the table, described in the main function, do not require a tablename, just the column name will do (attribute in the example code).
When the value is unknown, it won’t be shown in the output. “comput edAttribute.id” isn’t shown in the example code because this attribute (see where clause) is no computed column and therefore, the ‘id’ column is NULL.

whereStatement

We only use one value in de example code (no brackets), brackets are used in case of multiple values:

whereStatement = JSON.
stringify([
{
"column": "interfaceCode",
"operator": "=",
"value": [ "ACME_CRUD",
"ACME_UAM" ]
}