For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
  • API Reference
      • GETUsage Summary
      • GETUsage By Language
      • GETUsage Activity
  • Python SDK
    • Install
    • Usage
    • Errors
  • CLI
    • Overview
LogoLogo
API Referenceusage

Usage Activity

GET
/api/v1/usage/activity
GET
/api/v1/usage/activity
$curl https://api.onepin.ai/api/v1/usage/activity \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "data": [
3 {
4 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5 "timestamp": "2024-04-20T14:22:00Z",
6 "action": "workflow_run",
7 "kind": "workflow_execution",
8 "resource": {
9 "type": "workflow",
10 "id": "wf_1234567890",
11 "name": "Monthly Report Generation"
12 },
13 "user": {
14 "id": "9b2d7f3e-4c1a-4f8a-9d3e-1a2b3c4d5e6f",
15 "name": "Alice Johnson"
16 },
17 "metadata": {
18 "duration_seconds": 125,
19 "status": "success"
20 },
21 "ip": "192.168.1.101"
22 }
23 ],
24 "meta": {
25 "request_id": "req_7f8e9d6c-1234-5678-9abc-def012345678",
26 "timestamp": "2024-04-20T14:22:01Z"
27 },
28 "pagination": {
29 "limit": 20,
30 "next": "cursor_eyJpZCI6IjNmYTg1ZjY0NTcxNzQ1NjJiM2ZjMmM5NjNmNjZhZmE2In0",
31 "prev": null
32 }
33}
Return the workspace usage activity feed with stable action filters and cursor pagination.
Was this page helpful?
Previous

List Plans

Next
Built with

Authentication

AuthorizationBearer
Clerk JWT token
OR
AuthorizationBearer

Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.

Headers

X-Workspace-Idstring or nullOptional

Query parameters

rangeenumOptionalDefaults to 30d

Rolling local calendar-day range.

Allowed values:
typeenum or nullOptional
Filter by usage activity type.
user_idstring or nullOptionalformat: "uuid"
Filter by actor user id.
limitintegerOptional1-100Defaults to 20
cursorstring or nullOptional
Opaque pagination cursor.
timezonestringOptionalDefaults to UTC
IANA timezone for local day bucketing.

Response

Successful Response
datalist of objects
metaobject
paginationobject

Errors

422
Unprocessable Entity Error