Applications API

Manage your Kubernetes applications programmatically using the Applications API.

List Applications

GET/api/applications

Retrieve all applications for the authenticated user.

Example Request:

curl -X GET https://api.scallerfox.com/api/applications \\
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response:

{
  "data": [
    {
      "id": "uuid",
      "name": "my-app",
      "repository_id": "uuid",
      "deployment_package_id": "uuid",
      "status": "running",
      "deployment_status": "success",
      "min_pods": 1,
      "max_pods": 3,
      "container_port": 8080,
      "domain": "my-app.scallerfox.com",
      "created_at": "2024-01-01T00:00:00Z"
    }
  ]
}

Get Application

GET/api/applications/{id}

Retrieve details of a specific application.

Create Application

POST/api/applications

Create a new application.

Request Body:

{
  "name": "my-app",
  "repository_id": "uuid",
  "deployment_package_id": "uuid",
  "min_pods": 1,
  "max_pods": 3,
  "container_port": 8080,
  "domain": "my-app.scallerfox.com",
  "env_variables": {
    "NODE_ENV": "production",
    "API_KEY": "secret"
  }
}

Deploy Application

POST/api/applications/{id}/deploy

Trigger a deployment for the application. This will build and deploy the application to Kubernetes.

Update Application

PUT/api/applications/{id}

Update application configuration. Changes require redeployment to take effect.

Delete Application

DELETE/api/applications/{id}

Delete an application. This will stop all pods and remove all resources.

Application Billing

GET/api/applications/{id}/billing

Get billing history for an application.

Query Parameters:

  • range: Time range (1h, 24h, 7d, 30d)