Vintner
API Reference

CLI APIs

API endpoints used by the Grape CLI for vineyard, vine, job, and worker management.

CLI APIs

These endpoints are called by the Grape CLI. Authentication is via Authorization: Bearer {jwt} header with a CLI-issued JWT. See Authentication Flows.

Vineyards

GET /api/cli/vineyards

List all vineyards with nested vine configurations.

POST /api/cli/vineyards

Create a new vineyard.

Body: { "name": "api-backend" }

GET /api/cli/vineyards/{id}

Get a single vineyard with its vines.

Configurations (Vines)

GET /api/cli/configurations

List all vine configurations for the authenticated user.

GET /api/cli/configurations/{name}

Get a configuration by name.

GET /api/cli/configurations/by-project-name/{project_name}

Look up a vine by project name.

POST /api/cli/configurations

Create a new vine configuration from CLI input.

Jobs

POST /api/jobs

Create a new job. Accepts:

{
  "job_type": "PLAN",
  "configuration_id": "vine-uuid",
  "assigned_worker_id": "worker-uuid",
  "plan_job_id": "plan-job-uuid"
}

Valid job types: PLAN, DEPLOY, DESTROY, DESTROY_WORKER.

If configuration_id is provided, the server auto-resolves cloud_identity_id, vineyard_id, computes config hash, and creates a config snapshot.

GET /api/jobs

List all jobs for the authenticated user. Supports ?status={status} and ?vineyard_id={id} filters.

GET /api/cli/jobs/{id}

Get job status and metadata.

GET /api/cli/jobs/{id}/logs

Get job logs (same format as worker API).

POST /api/cli/jobs/{id}/cancel

Cancel a QUEUED or PROCESSING job.

Workers

GET /api/cli/workers

List all registered Tendrils.

POST /api/cli/workers

Register a self-hosted Tendril.

GET /api/cli/workers/{id}

Get Tendril details.

Repositories

GET /api/cli/repositories/github

List GitHub repositories for the authenticated user.

GET /api/cli/repositories/gitlab

List GitLab repositories.

GET /api/cli/repositories/bitbucket

List Bitbucket repositories.

Releases

POST /api/releases/worker

Publish a new Tendril release (CI/CD only, requires RELEASE_API_SECRET).

Body:

{
  "version": "0.1.0",
  "release_notes": "Changelog content..."
}

POST /api/tendrils/register

Register a cloud-hosted Tendril (CI/CD only, requires RELEASE_API_SECRET). Used by Terraform during Tendril deployment.

On this page