OpenAPI Specification
openapi: 3.1.1
info:
title: Tessl Admin Keys API Keys API
version: 1.0.0
description: Admin-scoped API keys for support tooling.
servers:
- url: https://api.tessl.io
tags:
- name: API Keys
description: Workspace and organization API keys.
paths:
/experimental/workspaces/{workspaceId}/api-keys:
get:
tags:
- API Keys
description: Lists API keys for a workspace.
parameters:
- schema:
default: -createdAt
anyOf:
- type: array
items:
anyOf:
- type: string
enum:
- createdAt
- type: string
enum:
- -createdAt
- anyOf:
- type: string
enum:
- createdAt
- type: string
enum:
- -createdAt
in: query
name: sort
required: false
- schema:
minimum: 1
maximum: 100
default: 100
type: number
in: query
name: page[size]
required: false
- schema:
type: string
in: query
name: page[after]
required: false
- schema:
type: string
in: query
name: page[before]
required: false
- schema:
format: uuid
type: string
in: path
name: workspaceId
required: true
- schema:
type: string
example: Bearer <token>
in: header
name: Authorization
required: false
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
required:
- links
- meta
- data
properties:
links:
type: object
required:
- self
- next
- prev
properties:
self:
format: uri
type: string
next:
anyOf:
- format: uri
type: string
- type: 'null'
prev:
anyOf:
- format: uri
type: string
- type: 'null'
meta:
type: object
required:
- count
properties:
count:
type: number
data:
type: array
items:
type: object
required:
- id
- type
- attributes
properties:
id:
type: string
type:
type: string
enum:
- api-key
attributes:
type: object
required:
- name
- obfuscatedValue
- lastUsedAt
- createdBy
- expiryDate
- createdAt
- updatedAt
properties:
name:
type: string
obfuscatedValue:
type: string
lastUsedAt:
anyOf:
- type: string
- type: 'null'
createdBy:
type: string
expiryDate:
format: date-time
type: string
createdAt:
type: string
updatedAt:
type: string
'401':
description: Unauthorized
content:
application/json:
schema:
description: Unauthorized
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Unauthorized
status:
type: number
enum:
- 401
message:
type: string
'403':
description: Forbidden
content:
application/json:
schema:
description: Forbidden
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Forbidden
status:
type: number
enum:
- 403
message:
type: string
'404':
description: Not Found
content:
application/json:
schema:
description: Not Found
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Not Found
status:
type: number
enum:
- 404
message:
type: string
'500':
description: Internal Server Error
content:
application/json:
schema:
description: Internal Server Error
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Internal Server Error
status:
type: number
enum:
- 500
message:
type: string
post:
tags:
- API Keys
description: Issues a new API key scoped to a workspace and a member role.
requestBody:
required: true
content:
application/json:
schema:
additionalProperties: false
type: object
required:
- name
- role
properties:
name:
type: string
role:
anyOf:
- type: string
enum:
- owner
- type: string
enum:
- manager
- type: string
enum:
- publisher
- type: string
enum:
- member
- type: string
enum:
- consumer
expiryDate:
format: date-time
type: string
parameters:
- schema:
format: uuid
type: string
in: path
name: workspaceId
required: true
- schema:
type: string
example: Bearer <token>
in: header
name: Authorization
required: false
responses:
'201':
description: Default Response
content:
application/json:
schema:
type: object
required:
- links
- data
properties:
links:
type: object
required:
- self
properties:
self:
format: uri
type: string
data:
type: object
required:
- id
- type
- attributes
properties:
id:
type: string
type:
type: string
enum:
- api-key
attributes:
type: object
required:
- name
- value
- expiryDate
- createdAt
properties:
name:
type: string
value:
type: string
expiryDate:
format: date-time
type: string
createdAt:
type: string
'401':
description: Unauthorized
content:
application/json:
schema:
description: Unauthorized
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Unauthorized
status:
type: number
enum:
- 401
message:
type: string
'403':
description: Forbidden
content:
application/json:
schema:
description: Forbidden
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Forbidden
status:
type: number
enum:
- 403
message:
type: string
'404':
description: Not Found
content:
application/json:
schema:
description: Not Found
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Not Found
status:
type: number
enum:
- 404
message:
type: string
'409':
description: Conflict
content:
application/json:
schema:
description: Conflict
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Conflict
status:
type: number
enum:
- 409
message:
type: string
'500':
description: Internal Server Error
content:
application/json:
schema:
description: Internal Server Error
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Internal Server Error
status:
type: number
enum:
- 500
message:
type: string
/experimental/workspaces/{workspaceId}/api-keys/{apiKeyId}:
delete:
tags:
- API Keys
description: Revokes a workspace API key.
parameters:
- schema:
format: uuid
type: string
in: path
name: workspaceId
required: true
- schema:
format: uuid
type: string
in: path
name: apiKeyId
required: true
- schema:
type: string
example: Bearer <token>
in: header
name: Authorization
required: false
responses:
'204':
description: Default Response
'401':
description: Unauthorized
content:
application/json:
schema:
description: Unauthorized
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Unauthorized
status:
type: number
enum:
- 401
message:
type: string
'403':
description: Forbidden
content:
application/json:
schema:
description: Forbidden
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Forbidden
status:
type: number
enum:
- 403
message:
type: string
'404':
description: Not Found
content:
application/json:
schema:
description: Not Found
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Not Found
status:
type: number
enum:
- 404
message:
type: string
'500':
description: Internal Server Error
content:
application/json:
schema:
description: Internal Server Error
type: object
required:
- error
properties:
error:
type: object
required:
- title
- status
- message
properties:
title:
type: string
enum:
- Internal Server Error
status:
type: number
enum:
- 500
message:
type: string