Projects API
API endpoints for managing infrastructure projects in the Kubiya platform
Projects API
The Projects API enables you to manage infrastructure-as-code (IaC) projects within Kubiya. These endpoints allow you to create, retrieve, and manage Terraform-based infrastructure deployments. Use Kubiya as a Terraform backend for GitOps workflows, state management, and agentic operations.
List all projects
Create a new project
List Projects
Retrieve a list of all projects in your organization.
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | No | application/json |
Response
The response contains an array of project objects. This endpoint internally calls the Tasks API and formats the response as projects.
Create Project
Create a new infrastructure project in your organization.
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
Required Fields
name
: Name of the projectdescription
: Description of what the project does
Response
Get Project Details
Retrieve detailed information about a specific project.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
project_id | string | Yes | ID of the project to retrieve |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | No | application/json |
Response
Update Project
Update an existing project with new parameters.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
project_id | string | Yes | ID of the project to update |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
Response
Run Terraform Plan
Generate a Terraform plan for a project.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
project_id | string | Yes | ID of the project to plan |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
Response
Apply Terraform Plan
Apply a previously generated Terraform plan.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
project_id | string | Yes | ID of the project to apply |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
Response
Get Workflow Status
Retrieve the status of a specific workflow (plan or apply).
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
project_id | string | Yes | ID of the project |
workflow_id | string | Yes | ID of the workflow to check |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | No | application/json |
Response
Example Usage
List Projects
Create a Project
Get Project Details
Update a Project
Run Terraform Plan
Apply Terraform Plan
Common Errors
HTTP Status | Description |
---|---|
400 | Bad Request - Invalid parameters or missing required fields |
401 | Unauthorized - Missing or invalid API key |
403 | Forbidden - Insufficient permissions to access the project |
404 | Not Found - Project or workflow not found |
409 | Conflict - A project with this name already exists |
500 | Internal Server Error - Unexpected server error |
Projects in Kubiya are integrated with Terraform to provide infrastructure-as-code capabilities. The API allows you to manage the entire lifecycle of infrastructure projects, from planning to applying changes.
Project States
Projects in Kubiya can have the following states:
State | Description |
---|---|
pending | Project has been created but not yet initialized |
active | Project is fully operational and ready for use |
failed | Project initialization or operation has failed |
updating | Project is currently being updated |
deleting | Project is in the process of being deleted |
error | Project is in an error state |