Skip to content
Ona Docs

DeleteProjects

projects.bulk_delete(ProjectBulkDeleteParams**kwargs) -> ProjectBulkDeleteResponse
POST/gitpod.v1.ProjectService/DeleteProjects

Deletes multiple projects in a single request.

Use this method to:

  • Remove multiple unused projects at once
  • Clean up projects in batch

Returns successfully deleted project IDs and details about any failures. Each project in the request is processed independently — partial success is possible.

Examples

  • Delete multiple projects:

    Permanently removes several projects in one request.

    projectIds:
      - "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
      - "c1f23g7d-5d78-430e-b5b7-e0949c6eb158"
ParametersExpand Collapse
project_ids: Optional[Sequence[str]]
ReturnsExpand Collapse
class ProjectBulkDeleteResponse:
deleted_project_ids: Optional[List[str]]

deleted_project_ids contains the IDs of successfully deleted projects

failed_projects: Optional[List[FailedProject]]

failed_projects contains details about projects that failed to delete

error: Optional[str]

error describes why the project deletion failed

index: Optional[int]

index is the position in the request array (0-based)

formatint32
project_id: Optional[str]

project_id is the project ID that failed

DeleteProjects

import os
from gitpod import Gitpod

client = Gitpod(
    bearer_token=os.environ.get("GITPOD_API_KEY"),  # This is the default and can be omitted
)
response = client.projects.bulk_delete(
    project_ids=["b0e12f6c-4c67-429d-a4a6-d9838b5da047", "c1f23g7d-5d78-430e-b5b7-e0949c6eb158"],
)
print(response.deleted_project_ids)
{
  "deletedProjectIds": [
    "string"
  ],
  "failedProjects": [
    {
      "error": "error",
      "index": 0,
      "projectId": "projectId"
    }
  ]
}
Returns Examples
{
  "deletedProjectIds": [
    "string"
  ],
  "failedProjects": [
    {
      "error": "error",
      "index": 0,
      "projectId": "projectId"
    }
  ]
}