openapi: 3.1.0 info: title: Prisma Data Platform API description: >- REST API for managing Prisma Data Platform resources including projects, environments, and database connections through the Prisma Console. Provides programmatic access to workspace management, API key generation, and platform resource configuration. version: 1.0.0 contact: name: Prisma Support email: support@prisma.io url: https://www.prisma.io/support license: name: Proprietary url: https://www.prisma.io/terms termsOfService: https://www.prisma.io/terms externalDocs: description: Prisma Data Platform Documentation url: https://www.prisma.io/docs/platform/about servers: - url: https://api.cloud.prisma.io description: Prisma Data Platform production server security: - bearerAuth: [] tags: - name: API Keys description: Operations for managing API keys for platform resources - name: Environments description: Operations for managing project environments - name: Members description: Operations for managing workspace members and roles - name: Projects description: Operations for managing projects within workspaces - name: Workspaces description: Operations for managing Prisma Data Platform workspaces paths: /workspaces: get: operationId: listWorkspaces summary: Prisma List all workspaces description: >- Retrieves a list of all workspaces accessible to the authenticated user. Each workspace contains projects, environments, and associated resources. tags: - Workspaces responses: '200': description: Successfully retrieved list of workspaces content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Workspace' '401': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' /workspaces/{workspaceId}: get: operationId: getWorkspace summary: Prisma Get a workspace description: >- Retrieves detailed information about a specific workspace including its configuration, billing status, and associated projects. tags: - Workspaces parameters: - $ref: '#/components/parameters/WorkspaceId' responses: '200': description: Successfully retrieved workspace details content: application/json: schema: $ref: '#/components/schemas/Workspace' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' patch: operationId: updateWorkspace summary: Prisma Update a workspace description: >- Updates the configuration of a specific workspace, such as its name or settings. tags: - Workspaces parameters: - $ref: '#/components/parameters/WorkspaceId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WorkspaceUpdate' responses: '200': description: Successfully updated workspace content: application/json: schema: $ref: '#/components/schemas/Workspace' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' /workspaces/{workspaceId}/projects: get: operationId: listProjects summary: Prisma List projects in a workspace description: >- Retrieves all projects within a specified workspace. Each project contains environments and database configurations. tags: - Projects parameters: - $ref: '#/components/parameters/WorkspaceId' responses: '200': description: Successfully retrieved list of projects content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Project' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' post: operationId: createProject summary: Prisma Create a project description: >- Creates a new project within the specified workspace with the given name and configuration settings. tags: - Projects parameters: - $ref: '#/components/parameters/WorkspaceId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProjectCreate' responses: '201': description: Successfully created project content: application/json: schema: $ref: '#/components/schemas/Project' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' /projects/{projectId}: get: operationId: getProject summary: Prisma Get a project description: >- Retrieves detailed information about a specific project including its environments and database connections. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' responses: '200': description: Successfully retrieved project details content: application/json: schema: $ref: '#/components/schemas/Project' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' delete: operationId: deleteProject summary: Prisma Delete a project description: >- Permanently deletes a project and all associated environments and resources. This action cannot be undone. tags: - Projects parameters: - $ref: '#/components/parameters/ProjectId' responses: '204': description: Successfully deleted project '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' /projects/{projectId}/environments: get: operationId: listEnvironments summary: Prisma List environments for a project description: >- Retrieves all environments configured for a specific project. Environments represent different deployment stages such as development, staging, and production. tags: - Environments parameters: - $ref: '#/components/parameters/ProjectId' responses: '200': description: Successfully retrieved list of environments content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Environment' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' post: operationId: createEnvironment summary: Prisma Create an environment description: >- Creates a new environment within a project for a specific deployment stage with its own database connection and API key. tags: - Environments parameters: - $ref: '#/components/parameters/ProjectId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EnvironmentCreate' responses: '201': description: Successfully created environment content: application/json: schema: $ref: '#/components/schemas/Environment' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' /environments/{environmentId}: get: operationId: getEnvironment summary: Prisma Get an environment description: >- Retrieves detailed information about a specific environment including its connection configuration and API key status. tags: - Environments parameters: - $ref: '#/components/parameters/EnvironmentId' responses: '200': description: Successfully retrieved environment details content: application/json: schema: $ref: '#/components/schemas/Environment' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' delete: operationId: deleteEnvironment summary: Prisma Delete an environment description: >- Permanently deletes an environment and its associated API keys. This action cannot be undone. tags: - Environments parameters: - $ref: '#/components/parameters/EnvironmentId' responses: '204': description: Successfully deleted environment '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' /environments/{environmentId}/apikeys: get: operationId: listApiKeys summary: Prisma List API keys for an environment description: >- Retrieves all API keys associated with a specific environment. API keys are used to authenticate Prisma Client requests to platform resources. tags: - API Keys parameters: - $ref: '#/components/parameters/EnvironmentId' responses: '200': description: Successfully retrieved list of API keys content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/ApiKey' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' post: operationId: createApiKey summary: Prisma Create an API key description: >- Generates a new API key for the specified environment. The full API key value is only returned once during creation and cannot be retrieved later. tags: - API Keys parameters: - $ref: '#/components/parameters/EnvironmentId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ApiKeyCreate' responses: '201': description: Successfully created API key content: application/json: schema: $ref: '#/components/schemas/ApiKeyWithValue' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' /apikeys/{apiKeyId}: delete: operationId: deleteApiKey summary: Prisma Delete an API key description: >- Permanently revokes and deletes an API key. Any clients using this key will immediately lose access. tags: - API Keys parameters: - name: apiKeyId in: path required: true description: Unique identifier of the API key schema: type: string responses: '204': description: Successfully deleted API key '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' /workspaces/{workspaceId}/members: get: operationId: listWorkspaceMembers summary: Prisma List workspace members description: >- Retrieves all members of a workspace including their roles and invitation status. tags: - Members parameters: - $ref: '#/components/parameters/WorkspaceId' responses: '200': description: Successfully retrieved workspace members content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/WorkspaceMember' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/RateLimited' '500': $ref: '#/components/responses/InternalServerError' components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: >- Authentication via service token or OAuth 2.0 access token. Service tokens are created in the Prisma Console under workspace settings. parameters: WorkspaceId: name: workspaceId in: path required: true description: Unique identifier of the workspace schema: type: string ProjectId: name: projectId in: path required: true description: Unique identifier of the project schema: type: string EnvironmentId: name: environmentId in: path required: true description: Unique identifier of the environment schema: type: string schemas: Workspace: type: object description: >- A workspace is the top-level organizational unit in the Prisma Data Platform that contains projects, members, and billing configuration. properties: id: type: string description: Unique identifier for the workspace examples: - ws_abc123def456 name: type: string description: Display name of the workspace examples: - My Workspace slug: type: string description: URL-friendly identifier for the workspace examples: - my-workspace plan: type: string description: Current billing plan for the workspace enum: - free - pro - business - enterprise createdAt: type: string format: date-time description: Timestamp when the workspace was created updatedAt: type: string format: date-time description: Timestamp when the workspace was last updated required: - id - name - slug - plan - createdAt - updatedAt WorkspaceUpdate: type: object description: Fields that can be updated on a workspace properties: name: type: string description: New display name for the workspace Project: type: object description: >- A project represents an application or service within a workspace that contains environments and database connections. properties: id: type: string description: Unique identifier for the project examples: - prj_abc123def456 name: type: string description: Display name of the project examples: - My Application workspaceId: type: string description: Identifier of the parent workspace createdAt: type: string format: date-time description: Timestamp when the project was created updatedAt: type: string format: date-time description: Timestamp when the project was last updated required: - id - name - workspaceId - createdAt - updatedAt ProjectCreate: type: object description: Request body for creating a new project properties: name: type: string description: Display name for the new project examples: - My New Application required: - name Environment: type: object description: >- An environment represents a deployment stage within a project, such as development, staging, or production, with its own database connection and API keys. properties: id: type: string description: Unique identifier for the environment examples: - env_abc123def456 name: type: string description: Display name of the environment examples: - Production projectId: type: string description: Identifier of the parent project connectionString: type: string description: Database connection string for this environment examples: - prisma://accelerate.prisma-data.net/?api_key=ey... createdAt: type: string format: date-time description: Timestamp when the environment was created updatedAt: type: string format: date-time description: Timestamp when the environment was last updated required: - id - name - projectId - createdAt - updatedAt EnvironmentCreate: type: object description: Request body for creating a new environment properties: name: type: string description: Display name for the new environment examples: - Staging connectionString: type: string description: Database connection string for the environment required: - name - connectionString ApiKey: type: object description: >- An API key used to authenticate Prisma Client requests to Data Platform resources. The key value is only available at creation time. properties: id: type: string description: Unique identifier for the API key name: type: string description: Display name of the API key hint: type: string description: Masked hint showing the last few characters of the key examples: - '****abc123' environmentId: type: string description: Identifier of the associated environment createdAt: type: string format: date-time description: Timestamp when the API key was created required: - id - name - hint - environmentId - createdAt ApiKeyCreate: type: object description: Request body for creating a new API key properties: name: type: string description: Display name for the new API key examples: - Production API Key required: - name ApiKeyWithValue: allOf: - $ref: '#/components/schemas/ApiKey' - type: object properties: apiKey: type: string description: >- The full API key value. This is only returned once during creation and cannot be retrieved later. examples: - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... required: - apiKey WorkspaceMember: type: object description: A member of a workspace with an assigned role properties: id: type: string description: Unique identifier for the membership userId: type: string description: Identifier of the user email: type: string format: email description: Email address of the member role: type: string description: Role assigned to the member within the workspace enum: - owner - admin - member - viewer status: type: string description: Current status of the membership enum: - active - invited - suspended joinedAt: type: string format: date-time description: Timestamp when the member joined the workspace required: - id - userId - email - role - status Error: type: object description: Standard error response from the API properties: error: type: object properties: code: type: string description: Machine-readable error code message: type: string description: Human-readable error message details: type: object description: Additional error context additionalProperties: true required: - code - message responses: BadRequest: description: The request was invalid or malformed content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Authentication is required or the provided credentials are invalid content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: The requested resource was not found content: application/json: schema: $ref: '#/components/schemas/Error' RateLimited: description: Too many requests - rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/Error' InternalServerError: description: An unexpected error occurred on the server content: application/json: schema: $ref: '#/components/schemas/Error'