Programmatic API

Yavin leverages elide for its semantic layer and also its programmatic API. Elide supports two API standards:

  1. JSON-API - JSON-API is a REST API standard that makes it simple to construct queries in the browser URL or with curl.
  2. GraphQL - GraphQL is a more feature rich API that must be embedded in a POST body.

Both API formats support the following features:

  1. Rich filter support for measures and dimensions including complex predicates, logical conjunction (and), and logical disjunction (or).
  2. Sorting by both measures and dimensions.
  3. Pagination of results - including fetching the total size of the unpaginated result.
  4. Schema introspection tools (Swagger for JSON-API and Graphiql for GraphQL).
  5. Synchronous and Asynchronous query support.

API Documentation #

API Documentation is broken out by topic:

  1. Analytic Queries - Example analytic queries can be found here.
  2. Metadata Queries - All of Yavin’s semantic model can be accessed programmatically. Details can be found here.
  3. JSON-API Documentation - The JSON-API standard is a good place to start to understand the specification. Elide has further documentation here.
  4. GraphQL Documentation - The GraphQL Specification provides an overview of querying with GraphQL. Elide exposes opinionated GraphQL APIs documented here.
  5. Asynchronous Queries - Queries that take longer than a minute should ideally be run asynchronously leveraging Elide’s asynchronous API support.

Schema Introspection #

The Yavin service includes a landing page (found at /api/index.html) where you can browse the API documentation and run queries using either Swagger (JSON-API) or Graphiql (GraphQL).

Swagger #

Graphiql #