Information about the API for the Business Intelligence module
Operating mode
Cloud Suite
|ON-PREMISES
Modules
Services & CRM
Budget & Phases
Purchases
Resource Planning
Business Intelligence
API (Application Programming Interface) for querying BI data from external applications. The call is made via <ServerURL>/api/bi
.
In the configuration file Vertec.ini, the parameter BI API is available for this:
[CloudServer] BI API=True
Standard is True
. This means that the BI API runs even if the parameter is not specified.
The BI API can only be used if you have licensed the Business Intelligence module.
The BI user rights are applied.
You can find a detailed sample application with Postman/Excel here.
BI API authentication occurs via API token. This must be passed as a Bearer
token in an Authorization
header:
import requests url = 'http://localhost:8081/api/bi/measures' api_token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.MGVhZmUzMzYtNmVhMi00MDdhLTgxNjQtZDYxZmI0NzU2MWZi._r16YlvWmZCMJ3qdDX3bK5_DJHwcczTYaWoKUYUNZuk' headers = {'Authorization': 'Bearer %s' % api_token} r = requests.get(url, headers=headers) measures = r.text
Note: In Vertec versions before 6.6, authentication was done via HTTP Basic Auth with user name and password. You can find the relevant information below.
Under /api/bi
, the following GET endpoints are available:
The BI data is processed via endpoint /getdata
queried. It accepts the following parameters via query string:
measures |
Mandatory. Comma-separated list of internal measure names (e.g. |
dimension |
Mandatory, case-insensitive. List of dimensions by which the result is grouped (e.g. As a pseudo-dimension, If there are different roles for the dimension, access can be made via a suffix [Index 0-4].
Example when querying the measure FeesExt (external fee): ![]() dimension0 = Projekt dimension1 = Projektbearbeiter_1 dimension2 = Projektbearbeiter_2 dimension3 = ProjektPhase dimension4 = Taetigkeit dimension5 = Month If several measures with different “dimension structures” are requested and the requested dimensions cannot be delivered across all measures, a relevant error message appears. If this happens, you have to bundle the measures with the same dimension structure into a query and discontinue several of these queries in order to extract all data. |
_variable and OCL expression |
Optional. As of Vertec 6.5.0.11, you can specify for each dimension parameter (dimension0=Projekt, dimension1=Projektbearbeiter etc.), alias parameters with an OCL expression as a value This adds a new field You can specify any number of alias parameters per dimension. If the parameter used matches a name that is already used (as a measure name, class name or its translations, or alias of another dimension), an error is reported. |
startDate |
Optional. Start date in ISO 8601 format (2020-01-01) |
endDate |
Optional. End date in ISO 8601 format (2020-12-31) |
selectExpression |
Optional. OCL expression for selection. |
useDescriptions |
Optional, True or False. Default: False. Determines whether the column labels are delivered in plain text and translated, or as internal technical designations that are language independent. |
f |
Optional. Determines the format in which the result is output:
You can specify the parameter as an accept header, instead of a query string. If both are present, the query string is used. |
currency |
The currency indicated here must match the designation field on the currency. If an empty currency is passed with this parameter (or the parameter is not specified), it is interpreted as the key currency. For all other currencies, the values are read in the specified currency, if possible. |
The endpoint returns results in the following format:
Header (column names) |
Name of the requested measure (internal name). If the parameter is |
Data row |
|
api/bi/getdata?measures=fte&dimension0=Projektbearbeiter&useDescriptions=true&dimension1=month&startDate=2023-01-01&endDate=2023-03-31
Return:
"Bearbeiter","Bearbeiter_Id","Monat","Vollzeitstellen" "Christoph Keller",676,"2023-01-01",0.8 "Christoph Keller",676,"2023-02-01",0.8 "Christoph Keller",676,"2023-03-01",0.8 "Judith Feller",682,"2023-01-01",1 "Judith Feller",682,"2023-02-01",1 ...
The GET endpoint /measures
returns all available measures.
The optional f
parameter can be specified (see above).
The return includes the following fields:
The return values appear translated in the language that the user has set in the Vertec Web App.
With Vertec version 6.6, API tokens were introduced to increase the login security of Web API accesses. Therefore, HTTP basic authentication with user name and password is no longer supported as of Vertec version 6.7.
XML Session Timeout = 5
(the BI API and the XML server share the session timeout setting).If both the API token and user name/password are specified in a request, only the API token is considered. If it is invalid, a login attempt with user name/password is not made automatically.