Usage

What you spent on one project

Changed on

The same reading as getUsage, scoped to one project and authorized against it — you must be able to read the project as well as hold usage:read.

Usage is recorded against the bare project id, so this covers every branch of the project rather than only the one you name.

get/api/v2/projects/{projectId}/usage

Request

  • Base URL
    https://davinci-app.com
  • Auth
    HTTP bearer

Query parameters

fromstring date-time

Only count events at or after this time. Omit for all of recorded history.

tostring date-time

Only count events at or before this time.

groupBy'model' | 'project' | 'session' | 'day'

Break the totals down. Omit to receive totals only — totals is always present and always covers the whole scope, whether or not you group.

Response

Usage totals for the project.

scope'account' | 'project' | 'session' required

What the numbers cover, determined by the path you called.

projectIdstring

Present on the project and session reads. Always the bare id.

sessionIdstring uuid

Present on the session read.

asOfstring date-time nullable required

When the newest counted event was recorded, or null when the scope holds none. This is the honest bound on freshness: the engine reports usage on an interval, so a run's last few seconds may not be included. Null means "nothing here", not "nothing yet" — a scope with no usage looks the same either way, and inventing a timestamp would hide that.

groupBy'model' | 'project' | 'session' | 'day'

Echoed back when you asked for a breakdown.

Changes

    • breaking

      removed the required property ////// from the response with the status

    • breaking

      removed the required property / from the response with the status

    • info

      added the required property ////// to the response with the status

    • info

      added the required property / to the response with the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status

    • info

      the response property const value false was added for the status