Skip to content

Data Model (sperimentale)

Data Model REST APIs

CCH Tagetik exposes the hierarchies (levels and flat) of the data model's dimensions by using RESTful APIs implemented with the OData v4 (Open Data Protocol) standard.

Two additional REST OpenAPIs are available for the Entity and Account settings, with which the relevant configurations can be consulted and changed.

STATUS SWAGGER
ACTIVE <api root>/datamodel/swagger-ui/index.html
FORMAT ROOT ENDPOINT
REST / OpenAPI OData (Gerarchie flat) <api root>/datamodel/v0

Authorisation

To access the datamodel APIs the following functions must be enabled:

  • 0000205- Setup & Admin - Data model - Dimensions - Settings - General
  • 0004077 - Analytical workspace: OData services (For the APIs relating to flat tables).

Analytical dimensions

Flat hierarchies

The URL relating to the root of the service of the Analytical Dimensions' hierarchies is:

<api-root>/datamodel/v0/analyticaldimension/database_id/analytical_dimension_id/hierarchies/hierarchy_code/

Entity

Flat hierarchies

The URL for the service root of the RESTful APIs OData hierarchies is:

<api-root>/datamodel/v0/entity/database_id/hierarchies/hierarchy_code/

Settings

The URL for the Entity settings service root of the RESTful OpenAPIs is:

<api-root>/datamodel/v0/entity/database_id/config/

With this URL, the GET and PATCH methods for the Entity dimension settings can be invoked.

Account

Hierarchies

The URL for the Account hierarchies service root of the OData RESTful APIs is:

<api-root>/datamodel/v0/account/database_id/hierarchies/hierarchy_code/

Settings

The URL for the RESTful OpenAPI Account hierarchies service root of is:

<api-root>/datamodel/v0/account/database_id/config/

With this URL, the GET and PATCH methods can be invoked for the Account dimension settings.

Custom dimensions

Hierarchies

The URL relating to the root of the service of the Custom Dimensions' hierarchies is:

<api-root>/datamodel/v0/customdimension/database_id/custom_dimension_number/hierarchies/hierarchy_code/

Levels

Adding Levels to the URL, exposes, through the levelsNumber property, the maximum number of levels of a hierarchy.

For example, with the URL:

<api-root>/datamodel/v0/analyticaldimension/TGK_APP/CUSTOMER/hierarchies/001/Levels

returns levelsNumber=2.

Flat

Adding Flat to the URL exposes the hierarchy in Flat format. The properties composing the result trace are:

  • analytical dimension name/Entity/Accunt/Custom dimension n: shows the element's code
  • analytical dimension name/Entity/Accunt/Custom dimension nDescription: shows the description of the element
  • hierarchy: shows the code of the hierarchy
  • hierarchyDescription: shows the description of the hierarchy
  • level1/nome_livello_1: shows the code of the hierarchy's first level (node relating to the root).
  • level1/nome_livello_1Description**: shows the description of the hierarchy's first level (node relating to the root).
  • leveln/nome_livello_n: shows the code of the n level of the hierarchy.
  • leveln/nome_livello_nDescription: shows the description of the n level of the hierarchy.

The last level (level n+1) shows the code of the lowest level element and its description.

The names of the properties relating to the levels and their descriptions (including level n+1) can be customized by defining from the application the names of the levels of a hierarchy.

For example, by using the hierarchy's levels as names:

  • 1: Root
  • 2: Node
  • 3: Leaf

the URL

<api-root>/datamodel/v0/analyticaldimension/TGK_APP/CUSTOMER/hierarchies/001/Flat

returns:

Customer Customer Description hierarchy hierarchy Description Root Root Description Node Node Descript. Leaf Leaf Descript.
0001 ABC Electronics 01 Customer Segments 01 Customer Segments 02_EL Electric and Electronics 00001 ABC Electronics
0002 Elettro LTD 01 Customer Segments 01 Customer Segments 00002 Elettro LTD
0013 AIR Aviation 01 Customer Segments 01 Customer Segments 02_AV Aviation 00013 AIR Aviation

Note

For the OData API, by adding $metadata to the URLs of the service roots, metadata can be displayed.