robosystems-ai Usage API
📊 Usage - Monitor usage, metrics, and system performance
📊 Usage - Monitor usage, metrics, and system performance
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/robosystems-ai:robosystems-ai-usage-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: RoboSystems Usage API
description: 'The REST and GraphQL API for RoboSystems — an open-source, AI-native platform for accounting, financial reporting and investment management. It powers RoboLedger and RoboInvestor.
## Two surfaces
**Platform** — `/v1/…` — graphs, queries, schema, documents, search, memory, connections, billing and access. Reads are REST `GET`s; every write is a named operation at `/operations/{name}` returning an `OperationEnvelope`, accepting an `Idempotency-Key`, and streaming progress at `/v1/operations/{id}/stream`.
→ API reference
**Extensions** — `/extensions/…` — RoboLedger and RoboInvestor, scoped by `graph_id` in the URL. Reads are GraphQL at `POST /extensions/{graph_id}/graphql` and change nothing; writes are named operations at `/extensions/{domain}/{graph_id}/operations/{name}`; analytical views read the materialized graph.
→ Extensions reference · every GraphQL query
## Authenticating
`X-API-Key: rfs…` on REST, GraphQL and per-graph MCP. Browser sessions use JWTs from `POST /v1/auth/login`. The graph-agnostic MCP endpoint `/v1/mcp` takes OAuth 2.1 bearer tokens only.
## Connecting an AI client
Every graph is an MCP server at `POST /v1/graphs/{graph_id}/mcp`, and `POST /v1/mcp` serves OAuth clients that pick their graph at consent.
→ MCP guide
## Clients
`robosystems-client` for Python, `@robosystems/client` for TypeScript.
→ Guides · Technical docs'
version: 1.20.6
tags:
- name: Usage
description: 📊 Usage - Monitor usage, metrics, and system performance
paths:
/v1/graphs/{graph_id}/metrics:
get:
tags:
- Usage
summary: Get Graph Metrics
operationId: getGraphMetrics
security:
- APIKeyHeader: []
- BearerAuth: []
parameters:
- name: graph_id
in: path
required: true
schema:
type: string
title: Graph Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GraphMetricsResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Authentication required
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/graphs/{graph_id}/usage:
get:
tags:
- Usage
summary: Get Graph Usage
description: 'Time ranges: 24h, 7d, 30d, current_month, last_month. Toggle storage, credits, performance, and events sections via query params.'
operationId: getGraphUsage
security:
- APIKeyHeader: []
- BearerAuth: []
parameters:
- name: graph_id
in: path
required: true
schema:
type: string
title: Graph Id
- name: time_range
in: query
required: false
schema:
type: string
pattern: ^(24h|7d|30d|current_month|last_month)$
description: 'Time range: 24h, 7d, 30d, current_month, last_month'
default: 30d
title: Time Range
description: 'Time range: 24h, 7d, 30d, current_month, last_month'
- name: include_storage
in: query
required: false
schema:
type: boolean
description: Include storage usage summary
default: true
title: Include Storage
description: Include storage usage summary
- name: include_credits
in: query
required: false
schema:
type: boolean
description: Include credit consumption summary
default: true
title: Include Credits
description: Include credit consumption summary
- name: include_performance
in: query
required: false
schema:
type: boolean
description: Include performance insights (may be slower)
default: false
title: Include Performance
description: Include performance insights (may be slower)
- name: include_events
in: query
required: false
schema:
type: boolean
description: Include recent usage events
default: false
title: Include Events
description: Include recent usage events
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/GraphUsageResponse'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Rate limit exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Authentication required
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Access denied
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
CreditSummary:
properties:
graph_tier:
type: string
title: Graph Tier
description: Subscription tier
total_credits_consumed:
type: number
title: Total Credits Consumed
description: Total credits consumed
total_base_cost:
type: number
title: Total Base Cost
description: Total base cost before multipliers
operation_breakdown:
additionalProperties: true
type: object
title: Operation Breakdown
description: Credit usage by operation type
cached_operations:
type: integer
title: Cached Operations
description: Number of cached operations
billable_operations:
type: integer
title: Billable Operations
description: Number of billable operations
transaction_count:
type: integer
title: Transaction Count
description: Total transaction count
type: object
required:
- graph_tier
- total_credits_consumed
- total_base_cost
- operation_breakdown
- cached_operations
- billable_operations
- transaction_count
title: CreditSummary
description: Credit consumption summary.
GraphMetricsResponse:
properties:
graph_id:
type: string
title: Graph Id
description: Graph database identifier
graph_name:
anyOf:
- type: string
- type: 'null'
title: Graph Name
description: Display name for the graph
user_role:
anyOf:
- type: string
- type: 'null'
title: User Role
description: User's role in this graph
timestamp:
type: string
title: Timestamp
description: Metrics collection timestamp
total_nodes:
type: integer
title: Total Nodes
description: Total number of nodes
total_relationships:
type: integer
title: Total Relationships
description: Total number of relationships
node_counts:
additionalProperties:
type: integer
type: object
title: Node Counts
description: Node counts by label
relationship_counts:
additionalProperties:
type: integer
type: object
title: Relationship Counts
description: Relationship counts by type
storage:
additionalProperties: true
type: object
title: Storage
description: 'Measured on-disk storage: total_bytes/kb/mb/gb plus itemized `items` (graph, memory, subgraph, vectors, staging). Carries `error` instead if the instance could not be reached — the fields are absent rather than estimated.'
health_status:
additionalProperties: true
type: object
title: Health Status
description: Database health information
type: object
required:
- graph_id
- timestamp
- total_nodes
- total_relationships
- node_counts
- relationship_counts
- storage
- health_status
title: GraphMetricsResponse
description: Response model for graph metrics.
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
PerformanceInsights:
properties:
analysis_period_days:
type: integer
title: Analysis Period Days
description: Analysis period in days
total_operations:
type: integer
title: Total Operations
description: Total operations analyzed
operation_stats:
additionalProperties: true
type: object
title: Operation Stats
description: Performance stats by operation type
slow_queries:
items:
additionalProperties: true
type: object
type: array
title: Slow Queries
description: Top slow queries (over 5 seconds)
performance_score:
type: integer
title: Performance Score
description: Performance score (0-100)
type: object
required:
- analysis_period_days
- total_operations
- operation_stats
- slow_queries
- performance_score
title: PerformanceInsights
description: Performance analytics.
ErrorResponse:
properties:
detail:
type: string
title: Detail
description: Human-readable error message explaining what went wrong
examples:
- Insufficient credits for operation
code:
anyOf:
- type: string
- type: 'null'
title: Code
description: Machine-readable error code for programmatic handling
examples:
- INSUFFICIENT_CREDITS
request_id:
anyOf:
- type: string
- type: 'null'
title: Request Id
description: Unique request ID for tracking and debugging
examples:
- req_1234567890abcdef
timestamp:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Timestamp
description: Timestamp when the error occurred
examples:
- '2024-01-01T00:00:00Z'
type: object
required:
- detail
title: ErrorResponse
description: Error body returned by every endpoint.
example:
code: RESOURCE_NOT_FOUND
detail: Resource not found
request_id: req_1234567890abcdef
timestamp: '2024-01-01T00:00:00Z'
StorageSummary:
properties:
graph_tier:
type: string
title: Graph Tier
description: Subscription tier
avg_storage_gb:
type: number
title: Avg Storage Gb
description: Time-weighted average storage in GB over the period
max_storage_gb:
type: number
title: Max Storage Gb
description: Peak storage in GB
min_storage_gb:
type: number
title: Min Storage Gb
description: Minimum storage in GB
measurement_count:
type: integer
title: Measurement Count
description: Number of measurements taken
type: object
required:
- graph_tier
- avg_storage_gb
- max_storage_gb
- min_storage_gb
- measurement_count
title: StorageSummary
description: Storage usage summary.
GraphUsageResponse:
properties:
graph_id:
type: string
title: Graph Id
description: Graph database identifier
time_range:
type: string
title: Time Range
description: Time range for usage data
storage_summary:
anyOf:
- $ref: '#/components/schemas/StorageSummary'
- type: 'null'
description: Storage usage summary
credit_summary:
anyOf:
- $ref: '#/components/schemas/CreditSummary'
- type: 'null'
description: Credit consumption summary
performance_insights:
anyOf:
- $ref: '#/components/schemas/PerformanceInsights'
- type: 'null'
description: Performance analytics
recent_events:
items:
additionalProperties: true
type: object
type: array
title: Recent Events
description: Recent usage events
timestamp:
type: string
title: Timestamp
description: Usage collection timestamp
type: object
required:
- graph_id
- time_range
- timestamp
title: GraphUsageResponse
description: Response model for graph usage statistics.
securitySchemes:
APIKeyHeader:
type: apiKey
in: header
name: X-API-Key
description: API key for authentication
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: JWT bearer token