V4 Retrieving Table Structures
The V4 calls to retrieve the definition of one/all profile or custom tables can be used to discover the databases of a license and familiarize oneself with their structure.
As such, they are most likely manual calls made at the beginning of a project.
Indeed, the V4 API only allows to retrieve the definition of tables, but not to create new tables: the creation of profile and custom tables can already only be done through V5 operations, whose JSON format differs slightly.
Profile tables
Retrieving all profile tables
The V4 call to 'Get all profile tables' could be used to retrieve a list of profile tables.
> GET /v4/entity/{entity}/table
Its response was only a list of the names of the corresponding profile tables, without their definition.
This call can be replaced by the V5 operation to 'Get a list of profile tables'
> GET /profile-table-structure/v5/entities/{entity}/profile-tables
The response body is much more comprehensive, as it includes the whole definition of all corresponding tables.
The ?fields=name
query parameter can be used to only retrieve the "name" of the tables, like in the V4 call.
Retrieving one profile table
When the name of a profile table is known, it was possible to retrieve its definition with the V4 call to 'Get a profile table'.
> GET /v4/entity/{entity}/table/{profileTable}
This can be replaced by the V5 operation to 'Get a profile table':
> GET /profile-table-structure/v5/entities/{entity}/profile-tables/{profileTableId}
The payload differ slightly, with the most notable difference being that the "name" parameters are the technical names of all fields, while display names are defined separately in the "displayOptions" object.
Custom tables
Retrieving all custom tables
The list of custom tables could be retrieved with the V4 call to 'Get a list of custom tables'
> GET /v4/entity/{entity}/customTable
Its payload included the whole definition of the corresponding tables.
It can be replaced by the V5 operation to 'Get a list of custom tables'
> GET /v5/entities/{entity}/custom-tables
Like for profile tables the JSON payload differs slightly, with the display names being defined separately in the "displayOptions" object.
In addition:
- the "capabilities" parameter is no longer displayed, as the capabilities of a table are based on their "type".
- the "primaryKey" and "businessKey" of the V4 payload are replaced by the "primaryKeyAttribute" parameter.
Retrieving one custom table
The definition of one specific custom table could be retrieved with the 'Get a table' V4 operation:
> GET /v4/entity/{entity}/customTable/{customTable}
It can be replaced by the 'Get a custom table' V5 operation:
> GET /custom-table-structure/v5/entities/{entity}/custom-tables/{customTableId}
The same remarks on format as documented in the above tip apply.
Timing
The V4 operations will continue working until December 2024.
Afterwards, only the V5 operations will remain available.