nokori Hubs Logo

Hubs

Hubs is a paradigm shift in how we think about organizing and accessing various databases and backend data sources.

Applications tend to organize their codebases and data access methods around each database or data source that are utilized within an application. However, applications frequently source data from various databases/data sources for a single related data object (like user profiles and website activity of that user).

Hubs allow developers to organize data access methods, flows, queries, etc. based on project, service, object, or pipeline while mix-and-matching the underlying data sources without the developer overhead that exists in large code bases attempting to do the same thing.

The power of this innovation is most obvious when setting up and organizing queries within the nokori UI.

Universal Access

A core value proposition of Hubs is the ability to access data from any data source from anywhere. This means, for example, frontend framework developers can query databases directly from the browser without building an API first.

Where this is useful:

  • Any frontend framework that can make HTTP requests

  • A raspberry pi that is collecting data from a sensor

  • A mobile app that needs to access data from a database or update a database with a user's current location

  • A serverless/edge function that needs to access data from a database

  • An Express API that utilizes multiple databases and/or database types

Centralization of Queries

As companies and projects grow, it is common for developers to create multiple projects or applications that query a lot of the same data.

By centralizing queries within Hubs, query or database schema updates no long require manual updates to identical queries in multiple code bases (which is error prone). Queries can be updated centrally and deployed, with every app or edge device getting the update immediately.

Hubs API Quicknav

⚡ Queries ⚡

API endpoints to create, manage, and supercharge your queries

Read more

Sources

Understand how to work with paginated responses.

Read more

Errors

Read about the different types of errors returned by the API.

Read more

Webhooks

Learn how to programmatically configure webhooks for your app.

Read more


POST/v1/hubs

Create A Hub

This endpoint allows you to create a hub.

Request Body Parameters

  • Name
    label
    Type
    string
    required
    Description

    The name of your hub

Request

POST
/v1/hubs
curl -G https://api.nokori.com/v1/hubs \
  -H 'x-nokori-api-key: {{apiKey}}' \
  -H 'Content-Type: application/json'
  -d '{ "label" : "Cosmic Soda Shop" }'

Response

{
  "hubId": "lola.hub.hsnwg921TBQbNKeNMjS",
  "label": "Cosmic Soda Shop",
  "archived": 0,
  "createdAt": "2023-02-14T21:00:52.000Z",
  "updatedAt": null
}

GET/v1/hubs

List all hubs

This endpoint allows you to list all of your hubs.

Query Parameters

  • Name
    offset
    Type
    string
    optional
    Description

    Pagination offset. Default: 0

  • Name
    limit
    Type
    string
    optional
    Description

    Results per page. Default: 10. Limit 20.

Request

GET
/v1/hubs
curl -G https://api.nokori.com/v1/hubs/ \
  -H 'x-nokori-api-key: {{apiKey}}'

Response

[
  {
    "hubId": "lola.hub.hsnwg921TBQbNKeNMjS",
    "label": "Cosmic Soda Shop",
    "archived": 0,
    "createdAt": "2023-02-14T21:20:46.000Z",
    "updatedAt": null
  }
]

PUT/v1/hubs/:hubId

Update a Hub

This endpoint allows you to update your hub.

Query Parameters

  • Name
    hubId
    Type
    string
    required
    Description

    The ID of the hub you want to update

Request Body Parameters

  • Name
    label
    Type
    string
    required
    Description

    The name you want to update your hub with

Request

PUT
/v1/hubs/:hubId
curl https://api.nokori.com/v1/hubs/:hubId \
  -X PUT
  -H 'x-nokori-api-key: {{apiKey}}' \
  -H 'Content-Type: application/json'
  -d '{ "label" : "Cosmic Soda Shop 2.0" }'

Response

200 OK
{}