Skip to content

Instantly share code, notes, and snippets.

@dimatkach
Last active February 21, 2024 14:52
Show Gist options
  • Save dimatkach/478fd144b6ae277efbdf65e30efdcc0c to your computer and use it in GitHub Desktop.
Save dimatkach/478fd144b6ae277efbdf65e30efdcc0c to your computer and use it in GitHub Desktop.
openapi: 3.0.3
info:
title: UsageApi
version: 2.0.0
paths:
/skus/admin/import/all:
post:
tags:
- admin
description: Reload latest SKU configuration and assignments for ALL tenants
operationId: 'importAll '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: ignoreErrors
in: query
required: false
schema:
type: boolean
default: false
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ImportReport'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/skus/admin/audit:
get:
tags:
- admin
description: Search audit history
operationId: 'audit '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: tenant
in: query
required: false
schema:
type: integer
format: int64
- name: endpoint
in: query
required: false
schema:
type: string
- name: until
in: query
required: false
schema:
type: string
format: date-time
- name: limit
in: query
required: false
schema:
type: integer
format: int32
default: 100
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SeqResponse_LogEntry'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/entitlements/{code}:
get:
tags:
- entitlements
description: Get an entitlement by code
operationId: 'getEntitlement '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: code
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Entitlement'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/entitlements:
get:
tags:
- entitlements
description: Get all entitlements
operationId: 'getEntitlements '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SeqResponse_Entitlement'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
put:
tags:
- entitlements
description: Create or modify an existing entitlement
operationId: 'putEntitlement '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Entitlement'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Entitlement'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/entitlements/{entitlement}:
get:
tags:
- entitlements
description: Get tenant override for an entitlement
operationId: 'getTenantOverride '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: entitlement
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TenantEntitlement'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
put:
tags:
- entitlements
description: Set an override value for tenant entitlement
operationId: 'putTenantOverride '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: entitlement
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TenantEntitlementInput'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TenantEntitlement'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
delete:
tags:
- entitlements
description: Remove tenant override for an entitlement
operationId: 'deleteTenantOverride '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: entitlement
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/entitlements:
get:
tags:
- entitlements
description: Get tenant overrides for all entitlements
operationId: 'getTenantOverrides '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SeqResponse_TenantEntitlement'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/skus/{code}:
get:
tags:
- skus
description: Get a SKU by code
operationId: 'getSku '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: code
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SKU'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/skus:
get:
tags:
- skus
description: Get all SKUs
operationId: 'getSkus '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: group
in: query
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SeqResponse_SKU'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
put:
tags:
- skus
description: Create or update a SKU
operationId: 'putSku '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SKUInput'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SKU'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/skus/all/addons/{code}:
get:
tags:
- skus
description: Get a SKU addon by code
operationId: 'getAddon '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: code
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Addon'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/skus/{sku}/addons:
get:
tags:
- skus
description: Get or query all SKU addons. Use `all` for {sku} to query across
all skus
operationId: 'getAddons '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: sku
in: path
required: true
schema:
type: string
- name: entitlement
in: query
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SeqResponse_Addon'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/skus/addons:
put:
tags:
- skus
description: Create or update a SKU addon
operationId: 'putAddon '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AddonInput'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Addon'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/skus/{code}:
get:
tags:
- skus
description: Get SKU config for current tenant
operationId: 'getTenantSku '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: code
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TenantSku'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
put:
tags:
- skus
description: Assign a SKU to current tenant or modify existing assignment
operationId: 'putTenantSku '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: code
in: path
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TenantSkuInput'
required: false
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TenantSku'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
delete:
tags:
- skus
description: Unassign specified SKU from current tenant
operationId: 'deleteTenantSku '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: code
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/skus:
get:
tags:
- skus
description: Get all SKUs for current tenant or query by code
operationId: 'getTenantSkus '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: group
in: query
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SeqResponse_TenantSku'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/usage/{entitlement}:
get:
tags:
- usage
description: Get tenant usage and limits for given entitlement
operationId: 'getUsage '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: entitlement
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TenantUsage'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
put:
tags:
- usage
description: Increment or decrement current tenant usage of entitlement
operationId: 'putUsage '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: entitlement
in: path
required: true
schema:
type: string
- name: increment
in: query
required: true
schema:
type: integer
format: int64
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/usage/{entitlement}/set:
put:
tags:
- usage
description: Replace current usage with given value. BEWARE of race condition!
operationId: 'setUsage '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: entitlement
in: path
required: true
schema:
type: string
- name: value
in: query
required: true
schema:
type: integer
format: int64
- name: current
in: query
description: Only update if current date matches this exactly
required: false
schema:
type: string
format: date-time
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Usage'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/usage/{entitlement}/allocate:
put:
tags:
- usage
description: Variant of put that will only increment up to the limit, and return
the amount of increment
operationId: 'allocateUsage '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: entitlement
in: path
required: true
schema:
type: string
- name: increment
in: query
required: true
schema:
type: integer
format: int64
- name: partialOK
in: query
required: false
schema:
type: boolean
default: false
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/UsageAllocation'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/usage/{entitlement}/now:
get:
tags:
- usage
description: Get current usage and cadence detail for the tenant
operationId: 'getCurrentUsage '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: entitlement
in: path
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/UsageAllocation'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/usage/{entitlement}/history:
get:
tags:
- usage
description: Get historical usage values
operationId: 'getHistory '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
- name: entitlement
in: path
required: true
schema:
type: string
- name: step
in: query
required: true
schema:
$ref: '#/components/schemas/Granularity'
- name: from
in: query
required: false
schema:
type: string
format: date-time
default: '2021-02-21T14:35:01.278337Z'
- name: to
in: query
required: false
schema:
type: string
format: date-time
default: '2024-02-21T14:35:01.282140Z'
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SeqResponse_UsageHistory'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
/tenants/usage:
get:
tags:
- usage
description: Get tenant usage and limits for all entitlements
operationId: 'getAllUsage '
parameters:
- name: X-Tenant-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Request-Id
in: header
required: false
schema:
type: string
- name: X-BU-Workspace-Id
in: header
required: false
schema:
type: integer
format: int64
- name: X-Platform-User-Role
in: header
required: false
schema:
type: string
- name: X-Platform-User-Email
in: header
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/SeqResponse_TenantUsage'
'400':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
'403':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
'404':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotFound'
'409':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Conflict'
'429':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequests'
'500':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InternalError'
'501':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/NotImplemented'
components:
schemas:
Addon:
required:
- code
- name
- desc
- entitlement
type: object
properties:
code:
type: string
name:
type: string
desc:
type: string
skus:
type: array
items:
$ref: '#/components/schemas/SkuRef'
entitlement:
$ref: '#/components/schemas/Entitlement'
maxAgeDays:
type: integer
format: int32
AddonInput:
required:
- code
- entitlement
- name
- desc
type: object
properties:
code:
type: string
entitlement:
type: string
skus:
type: array
items:
$ref: '#/components/schemas/SkuRef'
name:
type: string
desc:
type: string
maxAgeDays:
type: integer
format: int32
value:
type: integer
format: int64
pattern: '[\w-]{1,36}'
maxLength: 255
AddonRef:
required:
- code
type: object
properties:
code:
type: string
value:
type: integer
format: int64
expiration:
type: string
format: date-time
BadRequest:
required:
- message
type: object
properties:
message:
type: string
Cadence:
type: string
enum:
- Hourly
- Daily
- Weekly
- Monthly
CadenceDesc:
required:
- period
- duration
- bucketDuration
- numBuckets
- currentBucket
- nextBucket
type: object
properties:
period:
$ref: '#/components/schemas/Cadence'
duration:
type: integer
format: int64
bucketDuration:
type: integer
format: int64
numBuckets:
type: integer
format: int32
currentBucket:
type: string
format: date-time
nextBucket:
type: string
format: date-time
Conflict:
required:
- message
type: object
properties:
message:
type: string
EntOverride:
required:
- code
type: object
properties:
code:
type: string
value:
type: integer
format: int64
expiration:
type: string
format: date-time
Entitlement:
required:
- code
- name
- description
- options
type: object
properties:
code:
type: string
name:
type: string
description:
type: string
options:
$ref: '#/components/schemas/Options'
limits:
$ref: '#/components/schemas/Limit'
cadence:
$ref: '#/components/schemas/Cadence'
pattern: '[\w-]{1,36}'
maxLength: 255
Feature:
required:
- feature
type: object
properties:
feature:
type: string
Forbidden:
required:
- message
type: object
properties:
message:
type: string
Granularity:
type: string
enum:
- day
- week
- month
- year
ImportReport:
required:
- entitlements
- skus
- addons
- skuEnts
- addonSkus
- tenSkus
- tenEnts
- tenAdds
type: object
properties:
entitlements:
type: integer
format: int32
skus:
type: integer
format: int32
addons:
type: integer
format: int32
skuEnts:
type: integer
format: int32
addonSkus:
type: integer
format: int32
tenSkus:
type: integer
format: int32
tenEnts:
type: integer
format: int32
tenAdds:
type: integer
format: int32
InternalError:
required:
- message
type: object
properties:
message:
type: string
JsonObject:
type: object
Limit:
required:
- configured
type: object
properties:
configured:
type: integer
format: int64
hard:
type: integer
format: int32
soft:
type: array
items:
type: integer
format: int32
LogEntry:
required:
- id
- endpoint
- tenantId
- userId
- action
- param
- createdAt
type: object
properties:
id:
type: integer
format: int64
endpoint:
type: string
tenantId:
type: integer
format: int64
userId:
type: integer
format: int64
requestId:
type: string
action:
type: string
param:
$ref: '#/components/schemas/JsonObject'
createdAt:
type: string
format: date-time
NotFound:
required:
- message
type: object
properties:
message:
type: string
NotImplemented:
required:
- message
type: object
properties:
message:
type: string
Options:
type: string
enum:
- None
- Configurable
- Adhoc
SKU:
required:
- code
- group
- name
- desc
type: object
properties:
code:
type: string
group:
type: string
name:
type: string
desc:
type: string
features:
type: array
items:
$ref: '#/components/schemas/Feature'
maxAgeDays:
type: integer
format: int32
entitlements:
type: array
items:
$ref: '#/components/schemas/Entitlement'
SKUInput:
required:
- code
- group
- name
- desc
type: object
properties:
code:
type: string
group:
type: string
name:
type: string
desc:
type: string
features:
type: array
items:
type: string
entitlements:
type: array
items:
$ref: '#/components/schemas/EntOverride'
maxAgeDays:
type: integer
format: int32
pattern: '[\w-]{1,36}'
maxLength: 255
SeqResponse_Addon:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Addon'
SeqResponse_Entitlement:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Entitlement'
SeqResponse_LogEntry:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/LogEntry'
SeqResponse_SKU:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SKU'
SeqResponse_TenantEntitlement:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TenantEntitlement'
SeqResponse_TenantSku:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TenantSku'
SeqResponse_TenantUsage:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/TenantUsage'
SeqResponse_UsageHistory:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/UsageHistory'
SkuRef:
required:
- code
- value
type: object
properties:
code:
type: string
value:
type: integer
format: int64
TenantEntitlement:
required:
- entitlement
- value
type: object
properties:
entitlement:
type: string
value:
type: integer
format: int64
expiration:
type: string
format: date-time
sku:
type: string
TenantEntitlementInput:
required:
- value
type: object
properties:
value:
type: integer
format: int64
expiration:
type: string
format: date-time
sku:
type: string
TenantSku:
required:
- code
- group
type: object
properties:
code:
type: string
group:
type: string
addons:
type: array
items:
$ref: '#/components/schemas/AddonRef'
overrides:
type: array
items:
$ref: '#/components/schemas/EntOverride'
expiration:
type: string
format: date-time
TenantSkuInput:
type: object
properties:
addons:
type: array
items:
$ref: '#/components/schemas/AddonRef'
overrides:
type: array
items:
$ref: '#/components/schemas/EntOverride'
TenantUsage:
required:
- code
- name
- description
- options
type: object
properties:
code:
type: string
name:
type: string
description:
type: string
options:
$ref: '#/components/schemas/Options'
limits:
$ref: '#/components/schemas/Limit'
cadence:
$ref: '#/components/schemas/Cadence'
currentUsage:
type: integer
format: int64
usageDate:
type: string
format: date-time
TooManyRequests:
required:
- message
type: object
properties:
message:
type: string
Usage:
required:
- code
- currentUsage
- limits
- usageDate
type: object
properties:
code:
type: string
currentUsage:
type: integer
format: int64
limits:
$ref: '#/components/schemas/Limit'
usageDate:
type: string
format: date-time
cadence:
$ref: '#/components/schemas/Cadence'
UsageAllocation:
required:
- requested
- configured
- allowed
- allocated
- remaining
- usageDate
type: object
properties:
requested:
type: integer
format: int64
configured:
type: integer
format: int64
allowed:
type: integer
format: int64
allocated:
type: integer
format: int64
remaining:
type: integer
format: int64
usageDate:
type: string
format: date-time
cadence:
$ref: '#/components/schemas/CadenceDesc'
UsageHistory:
required:
- usage
- usageDate
type: object
properties:
usage:
type: integer
format: int64
configured:
type: integer
format: int64
usageDate:
type: string
format: date-time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment