Deel: List token activity
Deel logs.listTokenActivity: arguments, response, policy and SDK examples.
← Logs operations · Get started
Operation deel.logs_listtokenactivity_v2026_10_29
Provider route: GET /logs/tokens. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/deel with npm, or alter-sdk-deel with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { DeelIntegration } from "@alter-ai/deel";
async function execute(input: Parameters<DeelIntegration["logs"]["listTokenActivity"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new DeelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.logs.listTokenActivity(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_deel import DeelIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = DeelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.logs.list_token_activity(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.from | string | Optional | Format: date-time |
query.to | string | Optional | Format: date-time |
query.search | string | Optional | |
query.cursor | string | Optional | |
query.limit | integer | Optional | Default: 50 Maximum: 100 Minimum: 1 |
headers | object | Required within parent | Additional keys: not allowed |
headers.X-Beta | string | Required within parent | Default: true One of: true |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand List token activity — 200 response body |
Referenced models: List token activity — 200 response body
Schemas
Section titled “Schemas”List token activity — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | The page of results, newest first |
data[] | Model | Each item | Expand List token activity — 200 response body — data item |
page | Model | Required within parent | Expand List request logs — 200 response body — page Keyset pagination envelope for the page just returned |
Referenced models: List request logs — 200 response body — page, List token activity — 200 response body — data item
List request logs — 200 response body — page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Keyset pagination envelope for the page just returned |
cursor | JSON | Required within parent | |
cursor (anyOf 1) | string | Alternative | Cursor for the next page, or null on the last page |
cursor (anyOf 2) | null | Alternative | Cursor for the next page, or null on the last page |
has_next_page | boolean | Required within parent | Whether a further page is available |
List token activity — 200 response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One token's activity over the window |
calls | JSON | Required within parent | |
calls (anyOf 1) | integer | Alternative | Requests made with the token in the window |
calls (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
daily | array | Required within parent | Per-day series over the window, oldest first |
daily[] | Model | Each item | Expand List token activity — 200 response body — data item daily item |
errors | JSON | Required within parent | |
errors (anyOf 1) | integer | Alternative | Requests that ended in a 4xx or 5xx status |
errors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
last_ip | JSON | Required within parent | |
last_ip (anyOf 1) | string | Alternative | Client IP of that latest request |
last_ip (anyOf 2) | null | Alternative | Client IP of that latest request |
last_used_at | string | Required within parent | Latest request made with the token (UTC) Format: date-time |
token | Model | Required within parent | Expand List token activity — 200 response body — data item token The token |
Referenced models: List token activity — 200 response body — data item daily item, List token activity — 200 response body — data item token
List token activity — 200 response body — data item daily item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | One day of the token's activity |
calls | JSON | Required within parent | |
calls (anyOf 1) | integer | Alternative | Requests that day |
calls (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
day | string | Required within parent | UTC day Format: date |
errors | JSON | Required within parent | |
errors (anyOf 1) | integer | Alternative | Requests that day ending in a 4xx or 5xx status |
errors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
List token activity — 200 response body — data item token
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The token |
id | string | Required within parent | Token id shown in the Developer Center Format: uuid |
label | JSON | Required within parent | |
label (anyOf 1) | string | Alternative | Token label or OAuth2 client name at its latest use |
label (anyOf 2) | null | Alternative | Token label or OAuth2 client name at its latest use |
type | string | Required within parent | Personal access token or OAuth2 access token Known values: pat, oauth2 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.logs_listtokenactivity_v2026_10_29. Catalog operation: logs_listtokenactivity_v2026_10_29. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["api-logs:read"]
Pinned headers: {"X-Version": "2026-10-29"}