Create table

Note: LOCKED.
This API is extremely reliable and will not be broken unless absolutely necessary.

Method

POST

Path

/qrs/[type]/table?filter={filter}&skip={skip}&take={take}&sortColumn={sortColumn}&orderAscending={orderAscending}

Description

Add a new table definition.

Optionally, include an empty GUID in the API call. Optionally, filter the columns in the table.

Tables are used to list specific properties for entities.

The Name property must not include spaces.

Use [columnType] in the following way:

  • When [columnType] is set to Property, the Definition property must contain the property name.
  • When [columnType] is set to Function, the Definition property must contain the function that produces the column values. Initially, the supported functions only include count([type1], [type2],…).
  • When [columnType] is set to List, the Definition property must contain the list item type and the list property must be specified as a list of columns.

Body

TableDefinition:

{ "id": "00000000-0000-0000-0000-000000000000", "type": "...", "columns": [ { "name": "...", "columnType": Property/Function/List, "definition": "[property name]/[function name]/[list item type]", "list": [ { <columns> } ] }, ... ] }

Return value

ITable:

{ "id": "00000000-0000-0000-0000-000000000000", "type": "...", "columnNames": [ "name1", "name2", ... ], "rows": [ { [ "item1.1", "item1.2", ... ] }, { [ "item2.1", "item2.2", ... ] }, ... ] }

Optional parameters

Example: Create simple table for engine services

This example shows how to create a table definition for engine services. The table is considered to be simple, since it only contains a single “property”.

Example: Create complex table for engine services

This example shows how to create a table definition for engine services. The table is considered to be complex, since there are two “property” columns (Function and List, respectively) for each row.