Skip to main content

Database REST API

A customer account is required to read the description of all the REST services provided with the ActivePivot application.

When exposed, the Database REST API offers a way to discover and manipulate the database using Mongo-like requests, including the branches.

Disclaimer: Note that the REST API provides a way to edit the database but should not be considered as an optimized and efficient data source. To fill a datastore efficiently please read Datastore ETL section

Configuration

The Database REST API is part of the REST APIs included in ActiveViamRestServicesConfig that you can simply import in your application via the @Import Spring annotation.

Discovery

The discovery endpoint provides a full description of the database structure which includes:

  • tables, their fields and access permissions
  • joins between the tables
  • branches created on the database.

It also exposes information regarding specific aspect of the database. For instance, it is possible to get the description of a particular table.

Data

The data endpoint provides a way to update or retrieve database data. It is possible to make queries to:

  • see data
  • update data
  • delete data
  • retrieve the size of the tables in the database.

It is possible to choose the branch of the database to act on.

It is possible to add conditions to filter the data that are affected by the query. Most common conditions are supported: equal, greater than, lesser than, in, like, and, or and not.

If the database is a DirectQuery database like a BigQueryDatabase, the database will be on read-only mode and all queries to change the data will return an error. If the database is composite (some data are in memory and some data are in external storage), only the data in memory can be changed.

Branches

The database can have branches a bit like in git. Learn more here

The branches API offers a way to interact with the database branches to:

  • create a new branch
  • give it security permissions, i.e. to restrict its visibility
  • delete a branch
  • fast-forward a branch to another.