@opusdns/api 1.79.0 → 1.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/openapi.yaml CHANGED
@@ -15,15 +15,24 @@ components:
15
15
  - rfc3339
16
16
  type: string
17
17
  schemas:
18
- AiUsageGranularity:
19
- enum:
20
- - day
21
- - week
22
- - month
23
- title: AiUsageGranularity
24
- type: string
25
- AiUsageModelBreakdown:
26
- description: 'Public per-model AI token usage. Deliberately excludes billing-gateway''s
18
+ AiInferenceUsageBucket:
19
+ properties:
20
+ groups:
21
+ items:
22
+ $ref: '#/components/schemas/AiInferenceUsageGroup'
23
+ title: Groups
24
+ type: array
25
+ period_start:
26
+ format: date
27
+ title: Period Start
28
+ type: string
29
+ required:
30
+ - period_start
31
+ - groups
32
+ title: AiInferenceUsageBucket
33
+ type: object
34
+ AiInferenceUsageGroup:
35
+ description: 'Public per-model AI inference usage. Deliberately excludes billing-gateway''s
27
36
 
28
37
  internal COGS fields (cost_amount, per-million rates, has_rate).'
29
38
  properties:
@@ -52,13 +61,13 @@ components:
52
61
  - cache_read_tokens
53
62
  - cache_write_tokens
54
63
  - request_count
55
- title: AiUsageModelBreakdown
64
+ title: AiInferenceUsageGroup
56
65
  type: object
57
- AiUsageSeriesResponse:
66
+ AiInferenceUsageSeriesResponse:
58
67
  properties:
59
68
  buckets:
60
69
  items:
61
- $ref: '#/components/schemas/AiUsageTimeBucket'
70
+ $ref: '#/components/schemas/AiInferenceUsageBucket'
62
71
  title: Buckets
63
72
  type: array
64
73
  end_date:
@@ -66,7 +75,12 @@ components:
66
75
  title: End Date
67
76
  type: string
68
77
  granularity:
69
- $ref: '#/components/schemas/AiUsageGranularity'
78
+ $ref: '#/components/schemas/UsageGranularity'
79
+ product:
80
+ const: ai_inference
81
+ default: ai_inference
82
+ title: Product
83
+ type: string
70
84
  start_date:
71
85
  format: date
72
86
  title: Start Date
@@ -76,19 +90,24 @@ components:
76
90
  - start_date
77
91
  - end_date
78
92
  - buckets
79
- title: AiUsageSeriesResponse
93
+ title: AiInferenceUsageSeriesResponse
80
94
  type: object
81
- AiUsageSummaryResponse:
95
+ AiInferenceUsageSummaryResponse:
82
96
  properties:
83
- by_model:
84
- items:
85
- $ref: '#/components/schemas/AiUsageModelBreakdown'
86
- title: By Model
87
- type: array
88
97
  end_date:
89
98
  format: date
90
99
  title: End Date
91
100
  type: string
101
+ groups:
102
+ items:
103
+ $ref: '#/components/schemas/AiInferenceUsageGroup'
104
+ title: Groups
105
+ type: array
106
+ product:
107
+ const: ai_inference
108
+ default: ai_inference
109
+ title: Product
110
+ type: string
92
111
  start_date:
93
112
  format: date
94
113
  title: Start Date
@@ -96,24 +115,8 @@ components:
96
115
  required:
97
116
  - start_date
98
117
  - end_date
99
- - by_model
100
- title: AiUsageSummaryResponse
101
- type: object
102
- AiUsageTimeBucket:
103
- properties:
104
- by_model:
105
- items:
106
- $ref: '#/components/schemas/AiUsageModelBreakdown'
107
- title: By Model
108
- type: array
109
- period_start:
110
- format: date
111
- title: Period Start
112
- type: string
113
- required:
114
- - period_start
115
- - by_model
116
- title: AiUsageTimeBucket
118
+ - groups
119
+ title: AiInferenceUsageSummaryResponse
117
120
  type: object
118
121
  AllocationMethodType:
119
122
  enum:
@@ -13215,6 +13218,18 @@ components:
13215
13218
  - authinfo_required
13216
13219
  title: TransferPoliciesBase
13217
13220
  type: object
13221
+ UsageGranularity:
13222
+ enum:
13223
+ - day
13224
+ - week
13225
+ - month
13226
+ title: UsageGranularity
13227
+ type: string
13228
+ UsageProduct:
13229
+ enum:
13230
+ - ai_inference
13231
+ title: UsageProduct
13232
+ type: string
13218
13233
  User:
13219
13234
  properties:
13220
13235
  created_on:
@@ -14386,11 +14401,20 @@ components:
14386
14401
  format: date-time
14387
14402
  title: Created On
14388
14403
  type: string
14389
- failure_reason:
14404
+ failure_code:
14405
+ anyOf:
14406
+ - $ref: '#/components/schemas/WhitelabelOnboardingFailureCode'
14407
+ - type: 'null'
14408
+ failure_detail:
14390
14409
  anyOf:
14391
14410
  - type: string
14392
14411
  - type: 'null'
14393
- title: Failure Reason
14412
+ title: Failure Detail
14413
+ failure_type:
14414
+ anyOf:
14415
+ - $ref: '#/components/schemas/WhitelabelOnboardingFailureType'
14416
+ - type: 'null'
14417
+ readOnly: true
14394
14418
  hostname:
14395
14419
  maxLength: 255
14396
14420
  minLength: 1
@@ -14438,11 +14462,34 @@ components:
14438
14462
  - auth_hostname
14439
14463
  - verification_domain
14440
14464
  - keycloak_client_id
14441
- - failure_reason
14442
14465
  - created_on
14443
14466
  - updated_on
14467
+ - failure_type
14444
14468
  title: WhitelabelBrandingResponse
14445
14469
  type: object
14470
+ WhitelabelOnboardingFailureCode:
14471
+ description: 'Stable, frontend-facing reason a terminal onboarding failure happened.
14472
+ The free-text
14473
+
14474
+ detail that accompanies it is for support/debugging, never for customer display.'
14475
+ enum:
14476
+ - zone_not_owned
14477
+ - delegation_missing
14478
+ - delegation_mismatch
14479
+ - dns_record_rejected
14480
+ - auth_client_rejected
14481
+ - branding_rejected
14482
+ - retries_exhausted
14483
+ title: WhitelabelOnboardingFailureCode
14484
+ type: string
14485
+ WhitelabelOnboardingFailureType:
14486
+ enum:
14487
+ - dns
14488
+ - auth
14489
+ - branding
14490
+ - system
14491
+ title: WhitelabelOnboardingFailureType
14492
+ type: string
14446
14493
  WhitelabelOnboardingStatus:
14447
14494
  enum:
14448
14495
  - pending_domain_verification
@@ -14778,7 +14825,7 @@ info:
14778
14825
  \n\n"
14779
14826
  summary: OpusDNS - your gateway to a seamless domain management experience.
14780
14827
  title: OpusDNS API
14781
- version: 2026-07-24-121118
14828
+ version: 2026-07-27-074918
14782
14829
  x-logo:
14783
14830
  altText: OpusDNS API Reference
14784
14831
  url: https://d24lr4zqs1tgqh.cloudfront.net/c9505a20-5ae1-406c-b060-d392569caebf.jpg
@@ -27459,164 +27506,6 @@ paths:
27459
27506
  summary: Create an organization
27460
27507
  tags:
27461
27508
  - organization
27462
- /v1/organizations/ai-usage:
27463
- get:
27464
- description: Retrieves the current organization's AI token usage as a time series,
27465
- bucketed by the requested granularity and broken down per model. Reports token
27466
- counts and request volumes only.
27467
- operationId: get_ai_usage_series_v1_organizations_ai_usage_get
27468
- parameters:
27469
- - in: query
27470
- name: start_date
27471
- required: true
27472
- schema:
27473
- format: date
27474
- title: Start Date
27475
- type: string
27476
- - in: query
27477
- name: end_date
27478
- required: true
27479
- schema:
27480
- format: date
27481
- title: End Date
27482
- type: string
27483
- - in: query
27484
- name: model
27485
- required: false
27486
- schema:
27487
- anyOf:
27488
- - type: string
27489
- - type: 'null'
27490
- title: Model
27491
- - in: query
27492
- name: granularity
27493
- required: false
27494
- schema:
27495
- $ref: '#/components/schemas/AiUsageGranularity'
27496
- default: day
27497
- - $ref: '#/components/parameters/DatetimeFormatHeader'
27498
- responses:
27499
- '200':
27500
- content:
27501
- application/json:
27502
- schema:
27503
- $ref: '#/components/schemas/AiUsageSeriesResponse'
27504
- description: Successful Response
27505
- '401':
27506
- content:
27507
- application/problem+json:
27508
- example:
27509
- code: ERROR_AUTHENTICATION
27510
- detail: Additional error context.
27511
- status: 401
27512
- title: Authentication Error
27513
- type: authentication
27514
- schema:
27515
- $ref: '#/components/schemas/Problem'
27516
- description: Unauthorized
27517
- '403':
27518
- content:
27519
- application/problem+json:
27520
- example:
27521
- code: ERROR_PERMISSION_DENIED
27522
- detail: Insufficient permissions to perform this action
27523
- status: 403
27524
- title: Permission Denied
27525
- type: permission-denied
27526
- schema:
27527
- $ref: '#/components/schemas/Problem'
27528
- description: Forbidden
27529
- '422':
27530
- content:
27531
- application/problem+json:
27532
- schema:
27533
- $ref: '#/components/schemas/HTTPValidationError'
27534
- description: Validation Error
27535
- security:
27536
- - OAuth2PasswordBearer: []
27537
- - APIKeyHeader: []
27538
- summary: AI usage over time
27539
- tags:
27540
- - organization
27541
- - ai_usage
27542
- x-required-permissions:
27543
- - organization:read
27544
- /v1/organizations/ai-usage/summary:
27545
- get:
27546
- description: Retrieves the current organization's total AI token usage over
27547
- a date range, broken down per model. Reports token counts and request volumes
27548
- only.
27549
- operationId: get_ai_usage_summary_v1_organizations_ai_usage_summary_get
27550
- parameters:
27551
- - in: query
27552
- name: start_date
27553
- required: true
27554
- schema:
27555
- format: date
27556
- title: Start Date
27557
- type: string
27558
- - in: query
27559
- name: end_date
27560
- required: true
27561
- schema:
27562
- format: date
27563
- title: End Date
27564
- type: string
27565
- - in: query
27566
- name: model
27567
- required: false
27568
- schema:
27569
- anyOf:
27570
- - type: string
27571
- - type: 'null'
27572
- title: Model
27573
- - $ref: '#/components/parameters/DatetimeFormatHeader'
27574
- responses:
27575
- '200':
27576
- content:
27577
- application/json:
27578
- schema:
27579
- $ref: '#/components/schemas/AiUsageSummaryResponse'
27580
- description: Successful Response
27581
- '401':
27582
- content:
27583
- application/problem+json:
27584
- example:
27585
- code: ERROR_AUTHENTICATION
27586
- detail: Additional error context.
27587
- status: 401
27588
- title: Authentication Error
27589
- type: authentication
27590
- schema:
27591
- $ref: '#/components/schemas/Problem'
27592
- description: Unauthorized
27593
- '403':
27594
- content:
27595
- application/problem+json:
27596
- example:
27597
- code: ERROR_PERMISSION_DENIED
27598
- detail: Insufficient permissions to perform this action
27599
- status: 403
27600
- title: Permission Denied
27601
- type: permission-denied
27602
- schema:
27603
- $ref: '#/components/schemas/Problem'
27604
- description: Forbidden
27605
- '422':
27606
- content:
27607
- application/problem+json:
27608
- schema:
27609
- $ref: '#/components/schemas/HTTPValidationError'
27610
- description: Validation Error
27611
- security:
27612
- - OAuth2PasswordBearer: []
27613
- - APIKeyHeader: []
27614
- summary: AI usage summary
27615
- tags:
27616
- - organization
27617
- - ai_usage
27618
- x-required-permissions:
27619
- - organization:read
27620
27509
  /v1/organizations/attributes:
27621
27510
  get:
27622
27511
  description: Retrieves a list of organization attributes for the current organization
@@ -29254,6 +29143,189 @@ paths:
29254
29143
  - organization
29255
29144
  x-required-permissions:
29256
29145
  - organization:read
29146
+ /v1/organizations/{organization_id}/usage/{product}:
29147
+ get:
29148
+ description: Retrieves the organization's usage of a metered product as a time
29149
+ series, bucketed by the requested granularity and grouped per sub-metric.
29150
+ Reports usage quantities only.
29151
+ operationId: get_usage_series_v1_organizations__organization_id__usage__product__get
29152
+ parameters:
29153
+ - in: path
29154
+ name: organization_id
29155
+ required: true
29156
+ schema:
29157
+ examples:
29158
+ - organization_01h45ytscbebyvny4gc8cr8ma2
29159
+ format: typeid
29160
+ pattern: ^organization_[0-7][0-9a-hjkmnpq-tv-z]{25}$
29161
+ title: Organization Id
29162
+ type: string
29163
+ x-typeid-prefix: organization
29164
+ - in: path
29165
+ name: product
29166
+ required: true
29167
+ schema:
29168
+ $ref: '#/components/schemas/UsageProduct'
29169
+ - description: Inclusive start date (YYYY-MM-DD)
29170
+ in: query
29171
+ name: start_date
29172
+ required: true
29173
+ schema:
29174
+ description: Inclusive start date (YYYY-MM-DD)
29175
+ format: date
29176
+ title: Start Date
29177
+ type: string
29178
+ - description: Inclusive end date (YYYY-MM-DD)
29179
+ in: query
29180
+ name: end_date
29181
+ required: true
29182
+ schema:
29183
+ description: Inclusive end date (YYYY-MM-DD)
29184
+ format: date
29185
+ title: End Date
29186
+ type: string
29187
+ - description: Time-bucket size
29188
+ in: query
29189
+ name: granularity
29190
+ required: false
29191
+ schema:
29192
+ $ref: '#/components/schemas/UsageGranularity'
29193
+ default: day
29194
+ description: Time-bucket size
29195
+ - $ref: '#/components/parameters/DatetimeFormatHeader'
29196
+ responses:
29197
+ '200':
29198
+ content:
29199
+ application/json:
29200
+ schema:
29201
+ $ref: '#/components/schemas/AiInferenceUsageSeriesResponse'
29202
+ description: Successful Response
29203
+ '401':
29204
+ content:
29205
+ application/problem+json:
29206
+ example:
29207
+ code: ERROR_AUTHENTICATION
29208
+ detail: Additional error context.
29209
+ status: 401
29210
+ title: Authentication Error
29211
+ type: authentication
29212
+ schema:
29213
+ $ref: '#/components/schemas/Problem'
29214
+ description: Unauthorized
29215
+ '403':
29216
+ content:
29217
+ application/problem+json:
29218
+ example:
29219
+ code: ERROR_PERMISSION_DENIED
29220
+ detail: Insufficient permissions to perform this action
29221
+ status: 403
29222
+ title: Permission Denied
29223
+ type: permission-denied
29224
+ schema:
29225
+ $ref: '#/components/schemas/Problem'
29226
+ description: Forbidden
29227
+ '422':
29228
+ content:
29229
+ application/problem+json:
29230
+ schema:
29231
+ $ref: '#/components/schemas/HTTPValidationError'
29232
+ description: Validation Error
29233
+ security:
29234
+ - OAuth2PasswordBearer: []
29235
+ - APIKeyHeader: []
29236
+ summary: Usage over time
29237
+ tags:
29238
+ - organization
29239
+ - usage
29240
+ x-required-permissions:
29241
+ - organization:read
29242
+ /v1/organizations/{organization_id}/usage/{product}/summary:
29243
+ get:
29244
+ description: Retrieves the organization's total usage of a metered product over
29245
+ a date range, grouped per sub-metric. Reports usage quantities only.
29246
+ operationId: get_usage_summary_v1_organizations__organization_id__usage__product__summary_get
29247
+ parameters:
29248
+ - in: path
29249
+ name: organization_id
29250
+ required: true
29251
+ schema:
29252
+ examples:
29253
+ - organization_01h45ytscbebyvny4gc8cr8ma2
29254
+ format: typeid
29255
+ pattern: ^organization_[0-7][0-9a-hjkmnpq-tv-z]{25}$
29256
+ title: Organization Id
29257
+ type: string
29258
+ x-typeid-prefix: organization
29259
+ - in: path
29260
+ name: product
29261
+ required: true
29262
+ schema:
29263
+ $ref: '#/components/schemas/UsageProduct'
29264
+ - description: Inclusive start date (YYYY-MM-DD)
29265
+ in: query
29266
+ name: start_date
29267
+ required: true
29268
+ schema:
29269
+ description: Inclusive start date (YYYY-MM-DD)
29270
+ format: date
29271
+ title: Start Date
29272
+ type: string
29273
+ - description: Inclusive end date (YYYY-MM-DD)
29274
+ in: query
29275
+ name: end_date
29276
+ required: true
29277
+ schema:
29278
+ description: Inclusive end date (YYYY-MM-DD)
29279
+ format: date
29280
+ title: End Date
29281
+ type: string
29282
+ - $ref: '#/components/parameters/DatetimeFormatHeader'
29283
+ responses:
29284
+ '200':
29285
+ content:
29286
+ application/json:
29287
+ schema:
29288
+ $ref: '#/components/schemas/AiInferenceUsageSummaryResponse'
29289
+ description: Successful Response
29290
+ '401':
29291
+ content:
29292
+ application/problem+json:
29293
+ example:
29294
+ code: ERROR_AUTHENTICATION
29295
+ detail: Additional error context.
29296
+ status: 401
29297
+ title: Authentication Error
29298
+ type: authentication
29299
+ schema:
29300
+ $ref: '#/components/schemas/Problem'
29301
+ description: Unauthorized
29302
+ '403':
29303
+ content:
29304
+ application/problem+json:
29305
+ example:
29306
+ code: ERROR_PERMISSION_DENIED
29307
+ detail: Insufficient permissions to perform this action
29308
+ status: 403
29309
+ title: Permission Denied
29310
+ type: permission-denied
29311
+ schema:
29312
+ $ref: '#/components/schemas/Problem'
29313
+ description: Forbidden
29314
+ '422':
29315
+ content:
29316
+ application/problem+json:
29317
+ schema:
29318
+ $ref: '#/components/schemas/HTTPValidationError'
29319
+ description: Validation Error
29320
+ security:
29321
+ - OAuth2PasswordBearer: []
29322
+ - APIKeyHeader: []
29323
+ summary: Usage summary
29324
+ tags:
29325
+ - organization
29326
+ - usage
29327
+ x-required-permissions:
29328
+ - organization:read
29257
29329
  /v1/parking:
29258
29330
  get:
29259
29331
  description: Retrieves a paginated list of parking entries for the organization
@@ -31917,12 +31989,12 @@ tags:
31917
31989
  - description: Endpoints for creating new Tags
31918
31990
  name: tag
31919
31991
  x-displayName: Tags
31920
- - description: 'Endpoints for reporting your organization''s AI usage.
31992
+ - description: 'Endpoints for reporting your organization''s usage of metered products.
31921
31993
 
31922
31994
 
31923
- These endpoints expose the AI token consumption incurred by your organization''s
31924
- use of OpusDNS AI features, so you can monitor usage over time and per model.
31925
- Usage is reported as token counts and request volumes only.
31995
+ These endpoints expose the usage your organization has incurred for a metered
31996
+ product, so you can monitor consumption over time and in total. Usage is reported
31997
+ as quantities only; billing costs are never included.
31926
31998
 
31927
31999
 
31928
32000
  ### Endpoints
@@ -31932,15 +32004,16 @@ tags:
31932
32004
 
31933
32005
  |--------|------|-------------|
31934
32006
 
31935
- | `GET` | `/v1/organizations/ai-usage` | Token usage as a time series, bucketed
31936
- by granularity and broken down per model |
32007
+ | `GET` | `/v1/organizations/{organization_id}/usage/{product}` | Usage as a time
32008
+ series, bucketed by granularity and grouped per sub-metric |
31937
32009
 
31938
- | `GET` | `/v1/organizations/ai-usage/summary` | Token usage totals over a date
31939
- range, broken down per model |
32010
+ | `GET` | `/v1/organizations/{organization_id}/usage/{product}/summary` | Usage
32011
+ totals over a date range, grouped per sub-metric |
31940
32012
 
31941
32013
 
31942
- The reporting organization is taken from the authentication token; usage is always
31943
- scoped to the calling organization.
32014
+ `{product}` selects the metered product. Currently supported: `ai_inference` (AI
32015
+ token consumption from OpusDNS AI features). The response carries a top-level
32016
+ `product` field identifying the reported product.
31944
32017
 
31945
32018
 
31946
32019
  ### Query Parameters
@@ -31957,8 +32030,6 @@ tags:
31957
32030
  | `granularity` | Time-bucket size for the series endpoint: `day` (default), `week`,
31958
32031
  or `month` |
31959
32032
 
31960
- | `model` | Optional filter to a single model |
31961
-
31962
32033
 
31963
32034
  `start_date` must be on or before `end_date`, otherwise the request is rejected
31964
32035
  with `422 Unprocessable Content`.
@@ -31967,7 +32038,10 @@ tags:
31967
32038
  ### Reported Metrics
31968
32039
 
31969
32040
 
31970
- Each per-model breakdown reports token counts and request volume:
32041
+ #### `ai_inference`
32042
+
32043
+
32044
+ Each group reports token counts and request volume for one AI model:
31971
32045
 
31972
32046
 
31973
32047
  | Field | Description |
@@ -31991,15 +32065,15 @@ tags:
31991
32065
  permission.
31992
32066
 
31993
32067
  '
31994
- name: ai_usage
31995
- x-displayName: AI usage
32068
+ name: usage
32069
+ x-displayName: Usage
31996
32070
  x-tagGroups:
31997
32071
  - name: Account management
31998
32072
  tags:
31999
32073
  - authentication
32000
32074
  - user
32001
32075
  - organization
32002
- - ai_usage
32076
+ - usage
32003
32077
  - name: Domains
32004
32078
  tags:
32005
32079
  - domain