View as Markdown
Paigo icon

Paigo ACTION

Measure Usage

Records the amount of a specific usage type linked with a customer. See the documentation
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Paigo account once, then configure and run Measure Usage from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "paigo-measure-usage",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    paigo: { authProvisionId: "apn_xxxxxxx" },
    customerId: "Customer ID",
    dimensionId: "Dimension ID",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Measure Usage inputs
Property Type Description
customerId Customer ID string
The unique identifier for the customer
Required Dynamic
dimensionId Dimension ID string
The unique identifier for the dimension
Required Dynamic
usageAmount Usage Amount string
The amount of the usage on this record. Numerical values are represented as strings to avoid precision loss.
Required
timestamp Timestamp string
The timestamp of usage record in RFC3339 format with a 4-digit year. This is the time the usage occurred, or the end of the usage period. Defaults to the current time.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
paigo-measure-usage
Version
0.0.2
App
Paigo
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes