Query endpoints¶
These three endpoints run queries against pipeline data. They do not modify any stored resources.
Pipeline counts¶
Runs a pipeline definition over a date range and returns the count for each step. Value set references are resolved for the requesting organization at query time.
Endpoint
| POST | https://api.giosg.com/api/objectives/v1/orgs/<organization_id>/pipeline/counts |
|---|---|
Payload
| Attribute | Type | Description |
|---|---|---|
pipeline_id |
uuid | ID of the pipeline definition to run. Required. |
start |
string | Start of date range (ISO-8601 datetime). Required. |
end |
string | End of date range (ISO-8601 datetime). Required. Must be after start. |
include_pageview_counts |
boolean | If true, also returns visitor counts from the pageview table. Default false. |
base_filters |
array | Global pre-filters applied to all steps. Default []. Each item: { "field": string, "values": [string, ...], "apply_to_pageview": bool }. Supported fields: geo_city, geo_country, room_ids. See Filters. |
filters |
array | Active dimension filters. Default []. Each item: { "dimension_name": string, "values": [string, ...], "apply_to_pageview": bool }. See Filters. |
Minimal example — just a date range:
1 2 3 4 5 | |
Example with filters — base_filters pre-filter all steps by a raw event field; filters reference a named dimension declared on the pipeline definition (e.g. interaction)
1 2 3 4 5 6 7 8 9 10 11 12 | |
Response
| Attribute | Type | Description |
|---|---|---|
pipeline_id |
string | UUID of the pipeline definition. |
pipeline_name |
string | Name of the pipeline definition. |
organization_id |
string | Organization UUID. |
start_date |
string | Start of range used (ISO-8601). e.g. "2024-01-01T00:00:00". |
end_date |
string | End of range used (ISO-8601). |
steps |
array | List of step result objects (see below). |
pageview_counts |
object | Present only when include_pageview_counts: true (see below). |
Each element in steps:
| Attribute | Type | Description |
|---|---|---|
step_name |
string | Name of the step. |
count |
number | Distinct count of the step's count_field matching the step's filters in the period. |
pageview_counts object:
| Attribute | Type | Description |
|---|---|---|
visitor_count |
number | Total distinct visitors from the pageview table in the date range. |
by_source |
array | List of { "source": string, "visitor_count": number } broken down by the source field. |
source_field |
string | The pageview column used as the source dimension (from pageview_source_field on the definition; defaults to referrer_medium). |
Example response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
Pipeline step detail¶
Returns the count for a single step plus the results of any metrics defined on that step. Use this to get a deeper breakdown of one step. What you get here would depend on the step's definition and any metrics defined on it.
Endpoint
| POST | https://api.giosg.com/api/objectives/v1/orgs/<organization_id>/pipeline/step-detail |
|---|---|
Payload
| Attribute | Type | Description |
|---|---|---|
pipeline_id |
uuid | ID of the pipeline definition. Required. |
step_index |
integer | Zero-based index of the step to inspect (≥ 0). Required. |
start |
string | Start of date range (ISO-8601 datetime). Required. |
end |
string | End of date range (ISO-8601 datetime). Required. Must be after start. |
base_filters |
array | Global pre-filters. Same shape as in Pipeline counts. |
filters |
array | Active dimension filters. Same shape as in Pipeline counts. |
Example:
1 2 3 4 5 6 7 8 9 | |
Response
| Attribute | Type | Description |
|---|---|---|
pipeline_id |
string | UUID of the pipeline definition. |
pipeline_name |
string | Name of the pipeline definition. |
step_index |
number | Zero-based index of the step returned. |
step |
object | Full step definition (name, count_field, events, metrics). |
organization_id |
string | Organization UUID. |
start_date |
string | Start of range used (ISO-8601). |
end_date |
string | End of range used (ISO-8601). |
data |
object | Result data (see below). |
data object:
| Attribute | Type | Description |
|---|---|---|
count |
number | Distinct count for the step's count_field matching the step's event filters. |
| metric_name | array | For each metric on the step: a list of row objects. Column names depend on group_by fields and aggregations. |
Example response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
If the step has no metrics, data only contains count. When mapping_functions are configured on a metric, raw ID values in the grouped column are translated to human-readable names before the response is returned.
Returns 400 if step_index is out of range; 404 if the pipeline definition is not found.
List event dimensions¶
Returns distinct (vendor, category, action) combinations from generic events in a date range. Use this to discover valid filter values when building pipeline steps.
Endpoint
| POST | https://api.giosg.com/api/objectives/v1/orgs/<organization_id>/pipeline/events |
|---|---|
Payload
| Attribute | Type | Description |
|---|---|---|
start |
string | Start of date range (ISO-8601 datetime). Required. |
end |
string | End of date range (ISO-8601 datetime). Required. Must be after start. |
include_blacklisted_categories |
boolean | If true, includes internal/system event categories. Default false. |
Example:
1 2 3 4 | |
Response
| Attribute | Type | Description |
|---|---|---|
organization_id |
string | Organization UUID. |
start_date |
string | Start of range used (ISO-8601). |
end_date |
string | End of range used (ISO-8601). |
include_blacklisted_categories |
boolean | Whether internal categories were included. |
count |
number | Number of distinct (vendor, category, action) combinations. |
events |
array | List of objects with vendor, category, action. |