Export API
The Logilica platform enables you to query your data using a semantic data layer.
Using the API
The following example shows how to use the Export API to fetch the average lead time for tickets within a workspace.
The cURL GET command is below. Note, that the GET command includes the example API token lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb
and the example workspace myworkspace
.
The above query returns the following response.
The result of the query is provided in the data
field of the response. The query that was run is also returned, along with some other metadata including the last time the data was refreshed by the semantic layer.
Query Format
Queries to the semantic layer are constructed as JSON objects, and have the following fields:
Field | Type | Description |
---|---|---|
|
| A list of dimensions as found in the DataStudio Data Model |
|
| A list of measures as found in the DataStudio Data Model |
|
| A list of filter objects to apply to the query |
|
| A list of time dimensions to filter the query on |
|
| Key/value pairs of measures/dimensions and direction to sort ("asc" or "desc") |
Each of these fields are required, however they may be empty (e.g. an empty list or an object with no keys).
Below is an example query that fetches the number of Resolved ticket events for the team "Example Team" per Jira Issue Type for the month of October 2024. This shows the weekly ticket throughput for the team.
Filters
Filters are objects that specify how to filter the data with respect to the dimensions and measures available. They contain the following fields:
Field | Type | Description |
---|---|---|
|
| The dimension or measure to use in the filter, a list of these can be found in the DataStudio Data Model |
|
| The comparison operator to use in the filter. One of |
|
| Array of values for the filter. These must be of type string, with numbers being converted from strings by the semantic layer. |
Both the member
and operator
field are required, the value
field is only required for some operators.
Filter Operators
equals
- matches exactly on thevalues
in the arraycontains
- a case insensitive wild card match on thevalues
in the array (similar toLIKE %
)startsWith
- matches any string that starts with one of thevalues
in the values arrayendsWith
- matches any string that ends with one of thevalues
in the values arraygt
- matches numeric values greater than the value in thevalues
arraygte
- matches numeric values greater than or equal to the value in thevalues
arraylt
- matches numeric values less than the value in thevalues
arraylte
- matches numeric values less than or equal to the value in thevalues
arrayset
- checks if the value is not null. This operator does not use thevalues
array
A number of filter operators have a not
equivalent (e.g. notEquals
). These are the negations of the relevant operator. The not
operators available are: notEquals
, notContains
, notStartsWith
, notEndsWith
and notSet
.
Time Dimensions
Time dimensions are filters specifically on time intervals. These allow you to specify the time interval you wish to fetch in your dataset.
Field | Type | Description |
---|---|---|
|
| The time dimension to use. These can be found in the DataStudio Data Model and typically have the name |
|
| An array of two date strings, the first being the start time and the second being the end. For example, |
|
| The granularity to group the data by. Can be |
Both dimension
and dateRange
are required fields. Omitting granularity
is permitted and will mean that your data is ungrouped by time.
Last updated