REST Resource Model

See Using Kaleido -> Kaleido Resource Model for an overview of the resources in Kaleido, and how they fit together.

Full details of the individual API resource paths and operations are available on api.kaleido.io.

This document outlines standards that apply across the Kaleido resource model.

Resource IDs

Every resource in Kaleido is allocated an ID with a standardized structure that ensures global uniqueness within a type of resource, such as: u0j6rld2ka

  • u0 - two character short code for the region where this metadata is stored
  • j6rld2ka - 8 random alpha-numeric characters, always starting with an alphabetic character

Resource Paths

The Kaleido Admin API provides a uniform REST resource model, with hierarchical paths.

A few examples:

  • Nodes collection within an environment (long form):
    /api/v1/consortia/:c_id/environments/:e_id/nodes
  • Node (long form):
    /api/v1/consortia/:c_id/environments/:e_id/nodes/:n_id
  • Node (short form):
    /api/v1/c/:c_id/e/:e_id/n/:n_id

Collection Queries

We provide a standardized query syntax for collections.

Field selection

Comma separated list of fields: ?fields=_id,name,description

Sorting

Comma separated list of fields, with - to invert the order: ?sort=name,-membership_id

Pagination

We use the Limit & Skip convention for pagination: ?limit=10&skip=50

Filtering

operation query string
equal ?foo=bar
equal ?foo=!bar
exists ?foo=
not exists ?foo=!
greater than ?foo=<10
less than ?foo=>10
greater than or equal to ?foo=<=10
less than or equal to ?foo=>=10
starts with ?foo=^bar
ends with ?foo=$bar
contains ?foo=~bar
in array ?foo[]=bar&foo[]=baz
not in array ?foo[]=!bar&foo[]=!baz