Skip to main content

kobana dashboards entities

Commands of kobana dashboards entities. Every global option (Global options) applies here.

CommandHTTPDescription
entities join previewPOST /v1/entities/join/previewPreview a relation
entities join createPOST /v1/entities/joinCreate join entity
entities join updatePUT /v1/entities/{id}/joinUpdate relation
entities logs getGET /v1/entities/{id}/logs/{log_id}Get sync call
entities logs listGET /v1/entities/{id}/logsSync log
entities records listGET /v1/entities/{id}/recordsQuery records
entities records createPOST /v1/entities/{id}/recordsSend records
entities records deleteDELETE /v1/entities/{id}/recordsClear records
entities records importPOST /v1/entities/{id}/records/importImport records from CSV
entities records getGET /v1/entities/{id}/records/{record_id}Get record
entities syncGET /v1/entities/{id}/syncSync state
entities sync createPOST /v1/entities/{id}/syncSync entity
entities tenant-syncs listGET /v1/entities/{id}/tenant_syncsTenant syncs
entities tenant-syncs createPOST /v1/entities/{id}/tenant_syncsSync one tenant
entities listGET /v1/entitiesList entities
entities createPOST /v1/entitiesCreate entity
entities previewPOST /v1/entities/previewPreview a source
entities getGET /v1/entities/{id}Get entity
entities updatePATCH /v1/entities/{id}Update entity
entities deleteDELETE /v1/entities/{id}Delete entity
entities aggregateGET /v1/entities/{id}/aggregateAggregate records
entities usageGET /v1/entities/{id}/usageEntity usage

entities join preview​

Preview a relation

kobana dashboards entities join preview [OPTIONS]

POST /v1/entities/join/preview

How two entities match on the given fields (counts) and the first combined rows, before the relation is saved. Reads stored records only.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
base_entity_idstring (uuid)yesBase entity: every one of its records enters the relation.
related_entity_idstring (uuid)yesRelated entity, matched with the base on the given fields.
base_fieldstringyesKey of the base entity field used to match.
related_fieldstringyesKey of the related entity field used to match.
typestringnoleft (default) keeps base records without a match; inner only the matching ones. Values: inner, left.
matchstringnoexact (default) compares the text; digits compares only the digits (a CPF with and without punctuation match). Values: exact, digits.

More fields and nested objects: kobana schema dashboards.entities.join.preview.

Responses

HTTPDescription
200Relation preview.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

entities join create​

Create join entity

kobana dashboards entities join create [OPTIONS]

POST /v1/entities/join

Registers an entity that relates two others (a join) with the fields picked from each, and queues its first sync.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
keystringyesMachine name the portal blocks use; unique in the workspace (up to 63 characters).
namestringyes
name_pluralstringyes
joinobjectyes
fieldsarray<object>yesThe fields brought from each side: { from: base|related, field_key, key?, name? }.
descriptionstringno
label_field_keystringnoLabel field; absent = the copy of the base entity's label, null = none.
owner_field_keystringnoOwner field; absent = the copy of the base entity's owner, null = none.

More fields and nested objects: kobana schema dashboards.entities.join.create.

Responses

HTTPDescription
201Entity created.
400Request body failed validation.
404Resource not found in the current organization.
409Conflict: key already used in the workspace, or the entity is read by a relation.
422Request body failed validation.

entities join update​

Update relation

kobana dashboards entities join update [ID] [OPTIONS]

PUT /v1/entities/{id}/join

Replaces the relation of a join entity and the fields it brings, then re-reads its records. 422 when the entity is not a join.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
keystringyesMachine name the portal blocks use; unique in the workspace (up to 63 characters).
namestringyes
name_pluralstringyes
joinobjectyes
fieldsarray<object>yesThe fields brought from each side: { from: base|related, field_key, key?, name? }.
descriptionstringno
label_field_keystringnoLabel field; absent = the copy of the base entity's label, null = none.
owner_field_keystringnoOwner field; absent = the copy of the base entity's owner, null = none.

More fields and nested objects: kobana schema dashboards.entities.join.update.

Responses

HTTPDescription
200Entity updated.
400Request body failed validation.
404Resource not found in the current organization.
409Conflict: key already used in the workspace, or the entity is read by a relation.
422Request body failed validation.

entities logs get​

Get sync call

kobana dashboards entities logs get [ID] [LOG_ID] [OPTIONS]

GET /v1/entities/{id}/logs/{log_id}

One call of the entity's sync, whole (secrets masked).

Path arguments: id, log_id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200The call.
404Resource not found in the current organization.

entities logs list​

Sync log

kobana dashboards entities logs list [ID] [OPTIONS]

GET /v1/entities/{id}/logs

The calls the entity's sync made to its connector, newest first: the connector's request log narrowed to the entity.

Path arguments: id

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
methodstringnoHTTP method of the call, such as GET.
successstringnoOnly successful (true) or failed (false) calls. Values: true, false.
searchstringnoPart of the endpoint called.
date_fromstringnoFirst day (YYYY-MM-DD).
date_tostringnoLast day, inclusive (YYYY-MM-DD).

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Sync calls.
404Resource not found in the current organization.

entities records list​

Query records

kobana dashboards entities records list [ID] [OPTIONS]

GET /v1/entities/{id}/records

The synced records of the entity, with field filters, sort and limit/offset paging (the same query the portal blocks run).

Path arguments: id

Query parameters

NameTypeRequiredDescription
limitintegernoRecords per call (default 50, max 200).
offsetinteger,nullnoHow many records to skip.
sortstringnoField keys with an optional direction, comma-separated (field:desc,other); asc by default.
filterstringnoJSON object of field conditions: {"field": value} or {"field": {"gte": 10}}. Operators: eq, ne, gt, gte, lt, lte, in, contains, is_null.
preview_asstringnoA portal user ID: only that user's records, as the portal shows them (on an on_access entity, syncs that tenant first).

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Entity records.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

entities records create​

Send records

kobana dashboards entities records create [ID] [OPTIONS]

POST /v1/entities/{id}/records

Sends records to an entity with no connection (source_kind: "push"): each is stored by its identifier β€” sent again, it is updated; unchanged, it is not rewritten. The relations and portal users that depend on the entity follow. 422 on an entity that reads a connection.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
recordsarray<object>yesThe records (up to 1000 per call), each an object with the properties the fields read (source_path). Each must carry the identifier.
modestringnoupsert (default) keeps the records not sent; replace removes the ones the call does not carry β€” the batch becomes the whole set. Values: upsert, replace.

More fields and nested objects: kobana schema dashboards.entities.records.create.

Responses

HTTPDescription
200How many records were created, updated, kept and removed, and the ones refused.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

entities records delete​

Clear records

kobana dashboards entities records delete [ID] [OPTIONS]

DELETE /v1/entities/{id}/records

Removes every synced record of the entity and resets its sync state, so the next sync reads the source from scratch.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Records removed.
404Resource not found in the current organization.

entities records import​

Import records from CSV

kobana dashboards entities records import [ID] [OPTIONS]

POST /v1/entities/{id}/records/import

Imports a CSV into an entity with no connection: one record per row, each column a field reads converted to its type (numbers, dates, booleans). Rows without the identifier are refused and listed by row number (row 1 is the header).

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
contentstringnoThe CSV text: header row with the column names (the fields' source_path), , or ; as delimiter, up to 20,000 rows. Send this or content_base64.
content_base64stringnoThe CSV file in base64 (UTF-8).
modestringnoupsert (default) keeps the records not sent; replace removes the ones the call does not carry β€” the batch becomes the whole set. Values: upsert, replace.

More fields and nested objects: kobana schema dashboards.entities.records.import.

Responses

HTTPDescription
200How many records were created, updated, kept and removed, and the ones refused.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

entities records get​

Get record

kobana dashboards entities records get [ID] [RECORD_ID] [OPTIONS]

GET /v1/entities/{id}/records/{record_id}

One synced record β€” values by field and the record as the source sent it β€” with its entity.

Path arguments: id, record_id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200The record and its entity.
404Resource not found in the current organization.

entities sync​

Sync state

kobana dashboards entities sync [ID] [OPTIONS] [COMMAND]

GET /v1/entities/{id}/sync

Where the entity's sync stands: status, last error, last syncs, record count and stats.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Sync state.
404Resource not found in the current organization.

entities sync create​

Sync entity

kobana dashboards entities sync create [ID] [OPTIONS]

POST /v1/entities/{id}/sync

Queues a sync of the entity and answers 202 with its ID; follow it at GET /entities/{id}/sync. An on_access entity has no entity-wide sync (422): use POST /entities/{id}/tenant_syncs.

Path arguments: id

Query parameters

NameTypeRequiredDescription
fullstringnotrue (or 1) re-reads everything and drops what the source no longer has; without it the sync is incremental where the source allows. Values: true, 1.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
202Sync queued.
404Resource not found in the current organization.
422Request body failed validation.

entities tenant-syncs list​

Tenant syncs

kobana dashboards entities tenant-syncs list [ID] [OPTIONS]

GET /v1/entities/{id}/tenant_syncs

On an on_access entity: where each tenant's sync stands, most recently accessed first.

Path arguments: id

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
statusstringnoStatus of the tenant's sync. Values: queued, running, completed, error.
searchstringnoPart of the tenant ID.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Tenant syncs.
400Request body failed validation.
404Resource not found in the current organization.

entities tenant-syncs create​

Sync one tenant

kobana dashboards entities tenant-syncs create [ID] [OPTIONS]

POST /v1/entities/{id}/tenant_syncs

Queues one tenant's sync of an on_access entity now. 404 when no portal user carries that tenant ID; 422 when the entity is not on_access.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
tenant_idstringyesTenant ID (owner ID) to sync. In the body because it may hold any character.
fullbooleannoWhen true, re-reads every record of the tenant.

More fields and nested objects: kobana schema dashboards.entities.tenant-syncs.create.

Responses

HTTPDescription
202Sync queued.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

entities list​

List entities

kobana dashboards entities list [OPTIONS]

GET /v1/entities

Every entity of the workspace, with fields, source and sync state, ordered by name. Not paginated.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Entities of the workspace.
404Resource not found in the current organization.

entities create​

Create entity

kobana dashboards entities create [OPTIONS]

POST /v1/entities

Registers an entity from a read operation (or SQL query) of the data source with the chosen fields, and queues its first full sync.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
keystringyesMachine name the portal blocks use; unique in the workspace (up to 63 characters).
namestringyes
name_pluralstringyes
fieldsarray<object>yesThe fields the entity keeps, in order. On update, the whole list (matched by key).
integration_idstring (uuid)noData source (connector) to read from. Omitted with source_kind: "push".
operation_idstring (uuid)noRead operation (endpoint, tool or table) of the source. Send this field or sql, not both.
sqlstringnoSQL query on a SQL database source. Send this field or operation_id.
paramsobjectnoParameters the operation is called with (default {}).
paginationobjectno
sync_filtersarray<object>noWhat the sync sends to narrow the records (up to 20). Ignored on a SQL query.
source_kindstringnopush: an entity with no connection β€” no integration_id, operation_id or sql. Each field's source_path defaults to the field key (the property each record sent carries) and identifier_field_key is required: a record sent again updates the stored one by it. Values: push.
descriptionstringno
identifier_field_keystringno
label_field_keystringno
owner_field_keystringnoField holding the owner ID, matched against the portal user's tenant_id. Without it the entity cannot be shown in the portal.
owner_matchstringnoHow the owner field is compared with the tenant_id: as text (external_id) or as a CPF/CNPJ (document_number, digits only). Values: external_id, document_number.
sync_modestringnoWhen the sync runs; absent: scheduled on create, kept on update. Values: scheduled, manual, on_access.
freshness_secondsintegernoon_access: how many seconds a tenant's synced records count as fresh.
records_pathstringnoPath to the record list inside the response, when not detected.
samplearray<object>noThe preview records, kept to re-infer fields later.

More fields and nested objects: kobana schema dashboards.entities.create.

Responses

HTTPDescription
201Entity created.
400Request body failed validation.
404Resource not found in the current organization.
409Conflict: key already used in the workspace, or the entity is read by a relation.
422Request body failed validation.

entities preview​

Preview a source

kobana dashboards entities preview [OPTIONS]

POST /v1/entities/preview

Calls the chosen read operation (or runs the SQL query) and returns the sample with the entity inferred from it. Nothing is stored; the call is kept in the connector's request log.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
integration_idstring (uuid)yesData source (connector) to read from. Omitted with source_kind: "push".
operation_idstring (uuid)noRead operation (endpoint, tool or table) of the source. Send this field or sql, not both.
sqlstringnoSQL query on a SQL database source. Send this field or operation_id.
paramsobjectnoParameters the operation is called with (default {}).
paginationobjectno
sync_filtersarray<object>noWhat the sync sends to narrow the records (up to 20). Ignored on a SQL query.
limitintegernoSample size (default 10, max 50).

More fields and nested objects: kobana schema dashboards.entities.preview.

Responses

HTTPDescription
200Sample and inferred entity.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

entities get​

Get entity

kobana dashboards entities get [ID] [OPTIONS]

GET /v1/entities/{id}

One entity with its fields, source, sync mode, owner field and sync state.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200The entity.
404Resource not found in the current organization.

entities update​

Update entity

kobana dashboards entities update [ID] [OPTIONS]

PATCH /v1/entities/{id}

Name, key, special fields, the sync's pagination, filters and mode, and the field list (matched by key). When the mapping changes, the records are re-read.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Request body

NameTypeRequiredDescription
keystringyesMachine name the portal blocks use; unique in the workspace (up to 63 characters).
namestringyes
name_pluralstringyes
fieldsarray<object>yesThe fields the entity keeps, in order. On update, the whole list (matched by key).
descriptionstringno
identifier_field_keystringno
label_field_keystringno
owner_field_keystringnoField holding the owner ID, matched against the portal user's tenant_id. Without it the entity cannot be shown in the portal.
owner_matchstringnoHow the owner field is compared with the tenant_id: as text (external_id) or as a CPF/CNPJ (document_number, digits only). Values: external_id, document_number.
sync_modestringnoWhen the sync runs; absent: scheduled on create, kept on update. Values: scheduled, manual, on_access.
freshness_secondsintegernoon_access: how many seconds a tenant's synced records count as fresh.
paginationobjectno
sync_filtersarray<object>noSync filters (up to 20); absent keeps the current ones.

More fields and nested objects: kobana schema dashboards.entities.update.

Responses

HTTPDescription
200Entity updated.
400Request body failed validation.
404Resource not found in the current organization.
409Conflict: key already used in the workspace, or the entity is read by a relation.
422Request body failed validation.

entities delete​

Delete entity

kobana dashboards entities delete [ID] [OPTIONS]

DELETE /v1/entities/{id}

Soft-deletes the entity and its fields. Refused (409) while a join entity reads it.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Entity deleted.
404Resource not found in the current organization.
409Conflict: key already used in the workspace, or the entity is read by a relation.

entities aggregate​

Aggregate records

kobana dashboards entities aggregate [ID] [OPTIONS]

GET /v1/entities/{id}/aggregate

Count, sum, average, min or max over the synced records, optionally grouped by a field β€” what KPI and chart blocks show.

Path arguments: id

Query parameters

NameTypeRequiredDescription
opstringnoAggregate: count (default), sum, avg, min or max. Values: count, sum, avg, min, max.
fieldstringnoKey of the aggregated field (required except for count; numeric for sum/avg).
group_bystringnoKey of the field to group by.
filterstringnoJSON object of field conditions: {"field": value} or {"field": {"gte": 10}}. Operators: eq, ne, gt, gte, lt, lte, in, contains, is_null.
preview_asstringnoA portal user ID: only that user's records, as the portal shows them (on an on_access entity, syncs that tenant first).

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Aggregate result.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

entities usage​

Entity usage

kobana dashboards entities usage [ID] [OPTIONS]

GET /v1/entities/{id}/usage

The portal pages (draft and published) whose blocks read the entity β€” what breaks if it is removed or its key changes.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on: the id or the public_id shown under Workspaces on the dashboard. Inside the token's organization, data lives in workspaces. It may be omitted while the organization has a single workspace; with two or more, leaving it out returns 400 workspace_required. A workspace outside the organization returns 403 unknown_workspace. With a person token, only the workspaces that person has access to are reachable (organization owners reach all of them); any other returns 403 workspace_access_denied.

Responses

HTTPDescription
200Pages using the entity.
404Resource not found in the current organization.