Game Framework
APIEndpoints

Package Endpoints

List Packages

GET /v1/workspaces/:workspaceId/packages

List all packages in a workspace.

Query Parameters:

  • limit (number): Number of results (default: 50)
  • offset (number): Pagination offset
  • search (string): Search query

Response:

{
  "data": [
    {
      "id": "c0s6t7vjnb0c73f5g6eg",
      "workspace_id": "ws_xyz789",
      "name": "my_package",
      "description": "A Flutter package",
      "visibility": "private",
      "created_at": "2025-01-09T10:30:00Z",
      "updated_at": "2025-01-09T10:30:00Z"
    }
  ],
  "pagination": {
    "total": 10,
    "limit": 50,
    "offset": 0
  }
}

Create Package

POST /v1/workspaces/:workspaceId/packages

Create a new package.

Request Body:

{
  "name": "my_flutter_package",
  "description": "A Flutter package for...",
  "visibility": "private"
}

Response: 201 Created

{
  "id": "c0s6t7vjnb0c73f5g6eg",
  "workspace_id": "ws_xyz789",
  "name": "my_flutter_package",
  "description": "A Flutter package for...",
  "visibility": "private",
  "created_at": "2025-01-09T10:30:00Z"
}

Get Package

GET /v1/packages/:packageId

Get a specific package by ID.

Update Package

PATCH /v1/packages/:packageId

Update package metadata.

Request Body:

{
  "description": "Updated description",
  "visibility": "public"
}

Delete Package

DELETE /v1/packages/:packageId

Delete a package (soft delete).

Response: 204 No Content

Publish Package

POST /v1/packages/:packageId/publish

Publish a package to the registry.

Response: 200 OK