openapi: 3.0.3 info: description: The Subscriptions API manages subscriptions for CLI and registry events title: Speakeasy Artifacts PublishingTokens API version: 0.4.0 servers: - url: https://api.prod.speakeasy.com x-speakeasy-server-id: prod security: - APIKey: [] - WorkspaceIdentifier: [] - Bearer: [] tags: - name: PublishingTokens paths: /v1/publishing-tokens: get: summary: Get Publishing Tokens for a Workspace description: Returns a publishing token for the current workspace operationId: getPublishingToken responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/PublishingToken' description: OK 4XX: $ref: '#/components/responses/default' tags: - PublishingTokens x-speakeasy-name-override: list post: summary: Create a Publishing Token for a Workspace description: Creates a publishing token for the current workspace operationId: createPublishingToken requestBody: description: The publishing token to create content: application/json: schema: type: object properties: target_id: type: string target_resource: type: string valid_until: type: string format: date-time token_name: type: string required: - target_id - target_resource - valid_until - token_name responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PublishingToken' 4XX: $ref: '#/components/responses/default' tags: - PublishingTokens x-speakeasy-name-override: create /v1/publishing-tokens/{tokenID}: get: parameters: - name: tokenID in: path required: true description: Unique identifier of the publishing token. schema: type: string summary: Get a Specific Publishing Token description: Get information about a particular publishing token. operationId: getPublishingTokenByID responses: '200': content: application/json: schema: $ref: '#/components/schemas/PublishingToken' description: OK 4XX: $ref: '#/components/responses/default' tags: - PublishingTokens x-speakeasy-name-override: get put: parameters: - name: tokenID in: path required: true description: Unique identifier of the publishing token. schema: type: string requestBody: description: The publishing token to update content: application/json: schema: type: object required: - valid_until properties: valid_until: type: string format: date-time description: The new expiration date for the publishing token. token_name: type: string description: The new name for the publishing token. summary: Updates the Validitity Period of a Publishing Token description: Updates the validity period of a particular publishing token. operationId: updatePublishingTokenExpiration responses: '200': description: OK 4XX: $ref: '#/components/responses/default' tags: - PublishingTokens x-speakeasy-name-override: update delete: parameters: - name: tokenID in: path required: true description: Unique identifier of the publishing token. schema: type: string summary: Delete a Specific Publishing Token description: Delete a particular publishing token. operationId: deletePublishingToken responses: '200': description: OK 4XX: $ref: '#/components/responses/default' tags: - PublishingTokens x-speakeasy-name-override: delete /v1/publishing-tokens/{tokenID}/target: parameters: - name: tokenID in: path required: true description: Unique identifier of the publishing token. schema: type: string get: summary: Get a Specific Publishing Token Target description: Get information about a particular publishing token target. operationId: getPublishingTokenTargetByID responses: '200': content: text/plain: schema: type: object description: OK 4XX: $ref: '#/components/responses/default' tags: - PublishingTokens x-speakeasy-name-override: resolveTarget /v1/publishing-tokens/{tokenID}/metadata: parameters: - name: tokenID in: path required: true description: Unique identifier of the publishing token. schema: type: string get: summary: Get Metadata About the Token description: Get information about a particular publishing token. operationId: getPublishingTokenPublicMetadata responses: '200': content: application/json: schema: type: object properties: target_id: type: string target_resource: type: string workspace_id: type: string organization_id: type: string valid_until: type: string format: date-time description: OK 4XX: $ref: '#/components/responses/default' tags: - PublishingTokens x-speakeasy-name-override: resolveMetadata components: schemas: Error: description: The `Status` type defines a logical error model properties: message: description: A developer-facing error message. type: string status_code: description: The HTTP status code format: int32 type: integer required: - message - status_code type: object PublishingToken: description: A token used to publish to a target properties: id: type: string token: type: string valid_until: type: string format: date-time token_name: type: string target_id: type: string target_resource: enum: - document created_at: type: string format: date-time updated_at: type: string format: date-time created_by: type: string updated_by: type: string organization_id: type: string workspace_id: type: string required: - target_id - target_resource - valid_until - token_name - id - token - created_at - created_by - organization_id - workspace_id responses: default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Default error response securitySchemes: APIKey: description: The API Key for the workspace in: header name: x-api-key type: apiKey WorkspaceIdentifier: description: The API Key for the workspace in: header name: x-workspace-identifier type: apiKey Bearer: description: The Bearer token for the workspace type: http scheme: bearer externalDocs: url: /docs description: The Speakeasy Platform Documentation x-speakeasy-globals: parameters: - name: workspace_id in: path schema: type: string