Moab logoMoab
Get started
Moab Docs

Metrics

Stored metric values — one row per (owner, key), newest write wins.

Base path /api/v1/metric-records on https://moabcrm.com. Authenticate with Authorization: Bearer $DASH_API_KEY and name the project with the Project-ID header. Writes are validated in declared mode; an operation this resource does not declare answers 405 operation_not_supported.

List metrics

GET /api/v1/metric-records

curl "https://moabcrm.com/api/v1/metric-records" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest"
Show me the metrics filtered by owner kind
data_query {
  "collection": "metrics"
}

Returns a paginated list of metric-record objects, newest first.

{
  "object": "list",
  "data": [
    {
      "object": "metric-record",
      "id": "obj_123",
      "owner_kind": "owner kind",
      "owner_id": "owner_123",
      "key": "key",
      "value": 1,
      "unit": "unit",
      "note": "note",
      "created_at": "2026-07-25T12:00:00.000Z",
      "updated_at": "2026-07-25T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Parameters

ParameterTypeKindDescription
owner_kindstringfilterproject, or the owning collection key (e.g. agents).
owner_idstringfilterProject id or owning object id.
keystringfilterMetric key from the agent's metric registry.
sortstringsortOne of key; prefix with - to reverse.
limitnumberpageRows to return, 1–100. Defaults to 20.
cursorstringpagenext_cursor from the previous page.

Retrieve a metric-record

GET /api/v1/metric-records/draft-001

curl "https://moabcrm.com/api/v1/metric-records/draft-001" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest"
Open the metric-record {id}
data_get {
  "collection": "metrics",
  "object_id": "draft-001"
}

Returns the metric-record object.

{
  "object": "metric-record",
  "id": "obj_123",
  "owner_kind": "owner kind",
  "owner_id": "owner_123",
  "key": "key",
  "value": 1,
  "unit": "unit",
  "note": "note",
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

ParameterTypeKindDescription
idstringpathThe metric-record's id or slug.

What comes back (read-only)

Every metric-record carries the envelope below. This resource declares no server-owned fields beyond it.

FieldTypeDescription
objectstringAlways metric-record.
idstringStable object id. Also accepted in place of slug on any path.
slugstringURL-safe name, unique within the collection.
created_atstringISO-8601 timestamp of the first write.
updated_atstringISO-8601 timestamp of the most recent write. The cursor sorts on this.

Errors

Failures use { error: { type, code, message, param } }. The full code table is generated at Error Codes.

On this page

Moab logoMoab

Ready to build? Connect an agent and go — no credit card needed to start.

Get startedSee our plans