OData Service
The OData service of Invantive Waypoint offers the data of a tenant in OData version 4 at https://waypoint.invantive.eu/odata/v1/<tenant>, where <tenant> is the code of the tenant that GET /api/v1/me names. A program signs in with a token of the tenant with the scope analytics.read, as Authorization: Bearer wpt_tok_.... The service is read-only; writes go through the Tenant API. Power BI, Excel and the driver Waypoint of Invantive UniversalSQL read it.
Entity Sets
The service has the following entity sets, with their properties in Pascal case:
EndUsersandAccounts: end users and companies with their attributes.Applications,Themes,Segments,ExperiencesandSteps: the content.UserStates,AccountStatesandStepStates: per end user, company and item, how far it got with each experience.EventHours: the events per hour, over three years.Events: the raw events of the last 90 days.SearchesandIdeas: the searches of the resource centre and the feedback board.AuditEvents: the audit trail.ApiTokens: the tokens, without their secrets.
$metadata describes them, with FilterRestrictions, SortRestrictions and CountRestrictions of Org.OData.Capabilities.V1 and ApplySupported of Org.OData.Aggregation.V1.
Query Options
The service filters, sorts, counts and groups in the database of Waypoint, never in memory:
$filter,$select,$orderby,$topand$skipas on the tenant API. A$topabove the page size is answered in pages of up to 1 000 rows with@odata.nextLink.$count=trueadds@odata.countto the first page./$countanswers the number alone astext/plain.$applywithfilter(...),groupby((...),aggregate(...))andaggregate(...), with the aggregates$count,sum,min,max,averageandcountdistinct. The filter may stand inside$applyor beside it as$filter.
Text is grouped exactly: Foo and foo are two groups. sum over a group whose values are all null answers null. min, max and average skip null. Null as a key is a group of its own. A group row holds only the grouping properties and the aliases.
Examples
Count the end users on the server, as count(*) of Invantive UniversalSQL:
GET /odata/v1/invantive/EndUsers/$count?$filter=contains(SegmentCodes,'s.trial') HTTP/1.1
Host: waypoint.invantive.eu
Authorization: Bearer wpt_tok_...
Accept: text/plain, application/json;q=0.5
Group the states of one experience by the last step, as group by of Invantive UniversalSQL:
GET /odata/v1/invantive/UserStates?$apply=filter(Experience eq 'first-import')/groupby((LastStep),aggregate($count as itgen0,TimesShown with sum as itgen1)) HTTP/1.1
Host: waypoint.invantive.eu
Authorization: Bearer wpt_tok_...
Limits and Refusals
A request may run for 30 seconds; after that it is stopped with itgenwpt253. Raw events are not offered for grouping; group EventHours instead (itgenwpt261). A request outside this grammar is refused with 400 and a message code, such as itgenwpt250 for an unknown property and itgenwpt252 for a transformation that is not supported. Invantive UniversalSQL then reads the rows and computes the answer itself. An unknown entity set answers 404 with itgenwpt260, a tenant that is not the one of the token 404 with itgenwpt269.