Comment on page
Features of Orangepill RESTful API.
idempotency-keyrequest header field can be used to carry idempotency key in order to make non-idempotent HTTP methods such as
Client can make the same request repeatedly because of network error, timeout etc.. but the same operation will not be executed twice. If Client repeats the same request by sending the same Idempotency Key value in request headers, and the request will be responded with the same response as the original request.
Name of the request header is
Usage of Idempotency is optional.
x-api-keyrequest header field must be used to identify Realm.
Authorizationrequest header with
Each created entity is flagged with
owner: authenticated_user.idthus enabling automatic scope filtering and ownership.
User can have different roles in a realm.
User is limited in it's scope to access data.
When calling API you can apply following scopes on entities.
Entities are never physically deleted, hence soft delete mechanism is applied. When
DELETEmethod is invoked on REST API interface, Orangepill middleware will flag the entity as
deleted: true, and timestamped as
deleted_at: Date.now(). Entities marked as deleted are filtered out from scopes
own. To view deleted entities either disable scopes by adding
?scope=falseto URL query or choose
?scope=deletedif exists for specific endpoint.
Orangepill API is completely RESTful thus being interface for buidling frontend and backend apps.
Find entitites by query.
List entities with pagination. It returns also the total number of rows.
Get the number of entities by query.
Get an entity by ID.