Skip to content

Blueprint Entities API

Endpoints for CRUD operations on blueprint entity data. Each blueprint defines a data model, and entities are the records within that model.

SDK equivalent: sdk.blueprints.entitiesOf(blueprintKey)

List Entities

Retrieve a list of entities for a specific blueprint.

GET /api/blueprints/{blueprintKey}/entities

Path Parameters

ParameterTypeDescription
blueprintKeystringThe blueprint identifier

Query Parameters

ParameterTypeDescription
$limitnumberMaximum number of results
$skipnumberNumber of results to skip
$sortstringSort field (prefix with - for descending)
$flatbooleanReturn flat entity structure
$populatebooleanPopulate related references
$qstringSearch string for metadata search
$qPropsstringComma-separated metadata keys to search within
$outerPopulatestringPopulate related entities from other blueprints (format: setKey:blueprintName:scope)
{field}anyFilter by exact field value
{field}[$lt]anyFilter: less than
{field}[$gt]anyFilter: greater than
{field}[$lte]anyFilter: less than or equal
{field}[$gte]anyFilter: greater than or equal

Response

json
[
  {
    "_id": "entity-id",
    "name": "Product A",
    "price": 99.99,
    "category": "electronics",
    "created": "2025-01-01T00:00:00.000Z",
    "updated": "2025-01-15T00:00:00.000Z"
  }
]

Example: Filtered Query

GET /api/blueprints/product/entities?$limit=10&$sort=-created&category=electronics&price[$lt]=100
GET /api/blueprints/product/entities?$q=Premium&$qProps=name,description&$limit=20

Example: Outer Population

GET /api/blueprints/product/entities?$outerPopulate=relatedOrders:orders:workspace

SDK: sdk.blueprints.entitiesOf(blueprintKey).getList(query)


Get Entity

Retrieve a specific entity by its identifier.

GET /api/blueprints/{blueprintKey}/entities/{identifier}

Path Parameters

ParameterTypeDescription
blueprintKeystringThe blueprint identifier
identifierstringThe entity ID

Response

Returns the entity object.

SDK: sdk.blueprints.entitiesOf(blueprintKey).getEntity(identifier)


Create Entity

Create a new entity within a blueprint.

POST /api/blueprints/{blueprintKey}/entities

Path Parameters

ParameterTypeDescription
blueprintKeystringThe blueprint identifier

Request Body

json
{
  "name": "New Product",
  "price": 99.99,
  "category": "electronics"
}

The request body should contain the entity fields as defined by the blueprint schema.

Response

Returns the created entity object with generated _id, created, and updated timestamps.

SDK: sdk.blueprints.entitiesOf(blueprintKey).create(entity)


Update Entity

Update an existing entity.

PUT /api/blueprints/{blueprintKey}/entities/{identifier}

Path Parameters

ParameterTypeDescription
blueprintKeystringThe blueprint identifier
identifierstringThe entity ID

Request Body

json
{
  "price": 89.99,
  "inStock": true
}

Only the fields to be updated need to be included.

Response

Returns the updated entity object.

SDK: sdk.blueprints.entitiesOf(blueprintKey).update(identifier, changes)


Delete Entity

Remove an entity from a blueprint.

DELETE /api/blueprints/{blueprintKey}/entities/{identifier}

Path Parameters

ParameterTypeDescription
blueprintKeystringThe blueprint identifier
identifierstringThe entity ID

Response

Returns 200 OK on success.

SDK: sdk.blueprints.entitiesOf(blueprintKey).remove(identifier)

Build SaaS Products Without Limits.