Skip to content

Commit 2b84af9

Browse files
Automated build docs: 2026-07-01 11:56:01
1 parent 0ca208d commit 2b84af9

3 files changed

Lines changed: 2244 additions & 0 deletions

File tree

defs/asana_oas.yaml

Lines changed: 367 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ tags:
127127
An *agent* object represents a software program that can perceive its environment,
128128
reason, plan, and take autonomous actions to achieve specific goals.
129129
Agents may be built by Asana, provided by apps, or defined by the system.
130+
- name: AI Studio usage API
131+
description: >-
132+
The AI Studio usage API provides programmatic, admin-only access to AI Studio
133+
usage data — credit consumption per run and current seat allocations — for
134+
organizations licensed for AI Studio. It is the programmatic equivalent of the
135+
AI Studio usage CSV export, intended for loading into a data warehouse or BI
136+
tool.
130137
- name: Allocations
131138
description: >-
132139
An allocation object represents how much of a resource (e.g. person, team) is
@@ -10426,6 +10433,244 @@ components:
1042610433
RbacRoleUpdateRequest:
1042710434
allOf:
1042810435
- $ref: '#/components/schemas/RbacRoleBase'
10436+
AiStudioRunCompact:
10437+
description: >-
10438+
A single AI Studio run (rule execution), representing the credits consumed
10439+
by one execution of an AI Studio rule.
10440+
type: object
10441+
properties:
10442+
gid:
10443+
description: >-
10444+
Globally unique identifier of the resource, as a string.
10445+
type: string
10446+
readOnly: true
10447+
example: '12345'
10448+
x-insert-after: false
10449+
resource_type:
10450+
description: The base type of this resource.
10451+
type: string
10452+
readOnly: true
10453+
example: ai_studio_run
10454+
x-insert-after: gid
10455+
AiStudioRunResponse:
10456+
allOf:
10457+
- $ref: '#/components/schemas/AiStudioRunCompact'
10458+
- type: object
10459+
description: >-
10460+
A single AI Studio run (rule execution). The `gid` is stable and serves
10461+
as
10462+
the de-duplication key for incremental loads.
10463+
properties:
10464+
rule:
10465+
type: object
10466+
readOnly: true
10467+
description: >-
10468+
The rule (automation) that ran, as a compact reference. The Rules
10469+
API is not
10470+
yet public, so this is not dereferenceable today, but the shape is
10471+
forward-compatible (consumers can key off `rule.gid`).
10472+
properties:
10473+
gid:
10474+
type: string
10475+
readOnly: true
10476+
example: '1208111111111111'
10477+
resource_type:
10478+
type: string
10479+
readOnly: true
10480+
example: rule
10481+
name:
10482+
type: string
10483+
readOnly: true
10484+
example: Auto-summarize incoming requests
10485+
rule_owner:
10486+
allOf:
10487+
- $ref: '#/components/schemas/UserCompact'
10488+
- type: object
10489+
readOnly: true
10490+
description: The user who owns the rule.
10491+
properties:
10492+
email:
10493+
type: string
10494+
readOnly: true
10495+
example: owner@example.com
10496+
triggered_by:
10497+
allOf:
10498+
- $ref: '#/components/schemas/UserCompact'
10499+
- type: object
10500+
readOnly: true
10501+
description: >-
10502+
The user the run executed as, and to whom the credits are attributed.
10503+
Usually the same as `rule_owner`, but can differ for chained or
10504+
AI-teammate-triggered runs.
10505+
properties:
10506+
email:
10507+
type: string
10508+
readOnly: true
10509+
example: runner@example.com
10510+
triggering_container:
10511+
type: object
10512+
readOnly: true
10513+
nullable: true
10514+
description: >-
10515+
The object the rule lives in (its container) — a project or portfolio
10516+
— as a
10517+
compact reference. `null` if the container is unavailable.
10518+
properties:
10519+
gid:
10520+
type: string
10521+
readOnly: true
10522+
example: '1206000000000001'
10523+
resource_type:
10524+
type: string
10525+
readOnly: true
10526+
enum:
10527+
- project
10528+
- portfolio
10529+
example: project
10530+
division:
10531+
type: object
10532+
readOnly: true
10533+
nullable: true
10534+
description: >-
10535+
The division the actor belonged to at the time of the run, as a compact
10536+
reference. `null` when division metering is not enabled for the domain.
10537+
Not
10538+
dereferenceable yet (no public Division API); `name` reflects the
10539+
division's
10540+
current state.
10541+
properties:
10542+
gid:
10543+
type: string
10544+
readOnly: true
10545+
example: '1205000000000003'
10546+
resource_type:
10547+
type: string
10548+
readOnly: true
10549+
example: division
10550+
name:
10551+
type: string
10552+
readOnly: true
10553+
example: Engineering
10554+
run_started_at:
10555+
type: string
10556+
format: date-time
10557+
readOnly: true
10558+
nullable: true
10559+
description: When the run was triggered.
10560+
example: '2026-05-01T14:03:12.000Z'
10561+
run_completed_at:
10562+
type: string
10563+
format: date-time
10564+
readOnly: true
10565+
nullable: true
10566+
description: >-
10567+
When the run finished. `null` for runs that did not complete (e.g.
10568+
cancelled). Runs
10569+
still in progress don't appear in this endpoint (a usage record exists
10570+
only once a
10571+
run is metered), so this is non-null for every success/failed run.
10572+
example: '2026-05-01T14:03:15.220Z'
10573+
status:
10574+
type: string
10575+
readOnly: true
10576+
description: The outcome of the run.
10577+
enum:
10578+
- success
10579+
- failed
10580+
- cancelled
10581+
model:
10582+
type: string
10583+
readOnly: true
10584+
description: The LLM model used for the run.
10585+
example: claude-sonnet-4-6
10586+
credits_used:
10587+
type: number
10588+
readOnly: true
10589+
description: The number of credits consumed by the run.
10590+
example: 12
10591+
credit_source:
10592+
type: string
10593+
readOnly: true
10594+
description: Whether the credits were drawn from a paid or free balance.
10595+
enum:
10596+
- paid
10597+
- free
10598+
AiStudioSeatCompact:
10599+
description: >-
10600+
A single AI Studio seat allocation, representing one user's access to AI
10601+
Studio in the workspace.
10602+
type: object
10603+
properties:
10604+
gid:
10605+
description: >-
10606+
Globally unique identifier of the resource, as a string.
10607+
type: string
10608+
readOnly: true
10609+
example: '12345'
10610+
x-insert-after: false
10611+
resource_type:
10612+
description: The base type of this resource.
10613+
type: string
10614+
readOnly: true
10615+
example: ai_studio_seat
10616+
x-insert-after: gid
10617+
AiStudioSeatResponse:
10618+
allOf:
10619+
- $ref: '#/components/schemas/AiStudioSeatCompact'
10620+
- type: object
10621+
description: A single AI Studio seat allocation (current snapshot).
10622+
properties:
10623+
user:
10624+
allOf:
10625+
- $ref: '#/components/schemas/UserCompact'
10626+
- type: object
10627+
readOnly: true
10628+
description: The user who holds the seat.
10629+
properties:
10630+
email:
10631+
type: string
10632+
readOnly: true
10633+
example: user@example.com
10634+
license:
10635+
type: string
10636+
readOnly: true
10637+
description: >-
10638+
The user's effective AI Studio license tier. `/seats` returns only
10639+
paid
10640+
seats, so the free tier is not included.
10641+
enum:
10642+
- ai_studio_plus
10643+
- ai_studio_pro
10644+
- ai_studio_max
10645+
state:
10646+
type: string
10647+
readOnly: true
10648+
description: The state of the seat.
10649+
enum:
10650+
- active
10651+
- revoked
10652+
- expired
10653+
assigned_at:
10654+
type: string
10655+
format: date-time
10656+
readOnly: true
10657+
description: When the seat was granted/assigned.
10658+
example: '2026-03-01T00:00:00.000Z'
10659+
revoked_at:
10660+
type: string
10661+
format: date-time
10662+
readOnly: true
10663+
nullable: true
10664+
description: When the seat was revoked or expired. `null` for active
10665+
seats.
10666+
assigned_by:
10667+
allOf:
10668+
- $ref: '#/components/schemas/UserCompact'
10669+
- type: object
10670+
readOnly: true
10671+
nullable: true
10672+
description: >-
10673+
The user who assigned the seat. `null` when assigned by the system.
1042910674
securitySchemes:
1043010675
personalAccessToken:
1043110676
type: http
@@ -11105,6 +11350,128 @@ paths:
1110511350
except ApiException as e:
1110611351
print("Exception when calling AgentsApi->get_agent: %s\n" % e)
1110711352
name: python-sdk-v5
11353+
/workspaces/{workspace_gid}/ai_studio/runs:
11354+
parameters:
11355+
- $ref: '#/components/parameters/workspace_path_gid'
11356+
- $ref: '#/components/parameters/ai_studio_start_at'
11357+
- $ref: '#/components/parameters/ai_studio_end_at'
11358+
- $ref: '#/components/parameters/ai_studio_division_gid'
11359+
- $ref: '#/components/parameters/limit'
11360+
- $ref: '#/components/parameters/offset'
11361+
get:
11362+
summary: Get AI Studio credit utilization
11363+
description: >-
11364+
Returns one row per AI Studio run (rule execution) for the workspace, in ascending
11365+
order (oldest first) so that incremental consumers can poll forward. Each
11366+
row
11367+
describes what ran, who it is attributed to, the model used, and the credits
11368+
consumed.
11369+
11370+
11371+
Credit data is available from January 8th, 2025 onward, and is queryable for
11372+
the full
11373+
history since then (there is no limit on how far back you can query). A `start_at`
11374+
earlier than January 8th, 2025 is silently clamped; it is not an error.
11375+
11376+
11377+
The list is always [paginated](/docs/pagination). When more results exist,
11378+
the
11379+
response includes a `next_page` with an `offset` that can be used to retrieve
11380+
the
11381+
next set of rows. The row `gid` is stable and can be used to de-duplicate
11382+
rows
11383+
across incremental loads.
11384+
11385+
11386+
This endpoint is restricted to [service accounts](https://help.asana.com/s/article/service-accounts)
11387+
in organizations licensed for AI Studio.
11388+
tags:
11389+
- AI Studio usage API
11390+
operationId: getAiStudioRuns
11391+
responses:
11392+
200:
11393+
description: Successfully retrieved AI Studio credit utilization rows.
11394+
content:
11395+
application/json:
11396+
schema:
11397+
type: object
11398+
properties:
11399+
data:
11400+
type: array
11401+
items:
11402+
$ref: '#/components/schemas/AiStudioRunResponse'
11403+
next_page:
11404+
$ref: '#/components/schemas/NextPage'
11405+
400:
11406+
$ref: '#/components/responses/BadRequest'
11407+
401:
11408+
$ref: '#/components/responses/Unauthorized'
11409+
403:
11410+
$ref: '#/components/responses/Forbidden'
11411+
404:
11412+
$ref: '#/components/responses/NotFound'
11413+
500:
11414+
$ref: '#/components/responses/InternalServerError'
11415+
security:
11416+
- personalAccessToken: []
11417+
- oauth2: []
11418+
/workspaces/{workspace_gid}/ai_studio/seats:
11419+
parameters:
11420+
- $ref: '#/components/parameters/workspace_path_gid'
11421+
- $ref: '#/components/parameters/ai_studio_seat_state'
11422+
- $ref: '#/components/parameters/ai_studio_division_gid'
11423+
- $ref: '#/components/parameters/limit'
11424+
- $ref: '#/components/parameters/offset'
11425+
get:
11426+
summary: Get AI Studio seats
11427+
description: >-
11428+
Returns a current snapshot of AI Studio seat allocations for the workspace
11429+
11430+
who has access, at what license tier, and the state of each seat. This is
11431+
a
11432+
point-in-time snapshot; customers build their own history tables on top of
11433+
periodic pulls.
11434+
11435+
11436+
The list is always [paginated](/docs/pagination). When more results exist,
11437+
the
11438+
response includes a `next_page` with an `offset` that can be used to retrieve
11439+
the
11440+
next set of rows.
11441+
11442+
11443+
This endpoint is restricted to [service accounts](https://help.asana.com/s/article/service-accounts)
11444+
in organizations licensed for AI Studio.
11445+
tags:
11446+
- AI Studio usage API
11447+
operationId: getAiStudioSeats
11448+
responses:
11449+
200:
11450+
description: Successfully retrieved AI Studio seats.
11451+
content:
11452+
application/json:
11453+
schema:
11454+
type: object
11455+
properties:
11456+
data:
11457+
type: array
11458+
items:
11459+
$ref: '#/components/schemas/AiStudioSeatResponse'
11460+
next_page:
11461+
$ref: '#/components/schemas/NextPage'
11462+
400:
11463+
$ref: '#/components/responses/BadRequest'
11464+
401:
11465+
$ref: '#/components/responses/Unauthorized'
11466+
403:
11467+
$ref: '#/components/responses/Forbidden'
11468+
404:
11469+
$ref: '#/components/responses/NotFound'
11470+
500:
11471+
$ref: '#/components/responses/InternalServerError'
11472+
security:
11473+
- personalAccessToken: []
11474+
- oauth2: []
1110811475
/allocations/{allocation_gid}:
1110911476
parameters:
1111011477
- $ref: '#/components/parameters/allocation_path_gid'

0 commit comments

Comments
 (0)