Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Usage event

Report Usage Increment

post

Report usage as raw events or state updates.

Args: usage: Report of the usage of a feature. auth_context: The authentication context. organization_manager: The organization manager workspace_manager: The workspace manager

Raises: IllegalOperationError: If the user is not internal.

Authorizations
OAuth2clientCredentialsRequired
Token URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Body

Model for reporting raw usage of a feature.

In case of consumables the UsageReport allows the Pricing Backend to increment the usage per time-frame by 1.

organization_idstring · uuidRequired

The organization that this usage can be attributed to.

featurestring · enumRequired

The feature whose usage is being reported.

Possible values:
totalintegerRequired

The total amount of entities of this type.

Responses
200

Successful Response

application/json
anyOptional
post/usage-event
POST /usage-event HTTP/1.1
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 135

{
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "feature": "user",
  "total": 1,
  "metadata": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

No content

ZenML Scarf

Last updated

Was this helpful?