Workflows
Workspaces
Lists all Workspaces with Filtering and Sorting Options. Supports VCS Providers Integration.
0
25
POST /v2/workspaces/search HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 616
{
"projection": [
"text"
],
"searchValue": "text",
"filters": {
"workspaceName": [
"production-infra"
],
"repositories": [
"org/repo-name"
],
"ciTool": [
"github-actions"
],
"labels": [
"text"
],
"status": [
"plan_success"
],
"isManagedWorkflow": true,
"vcsType": [
"github"
],
"$or": {
"workspaceName": [
"production-infra"
],
"repositories": [
"org/repo-name"
],
"ciTool": [
"github-actions"
],
"labels": [
"text"
],
"status": [
"plan_success"
],
"isManagedWorkflow": true,
"vcsType": [
"github"
]
}
},
"sort": [
{
"lastRunTime": {
"order": -1
},
"workspaceName": {
"order": -1
},
"repository": {
"order": -1
},
"terraformVersion": {
"order": -1
},
"lastRunStatus": {
"order": -1
},
"ciTool": {
"order": -1
}
}
]
}
[
{
"id": "507f1f77bcf86cd799439011",
"accountId": "507f1f77bcf86cd799439011",
"createdAt": "2025-06-26T10:55:49.934Z",
"updatedAt": "2025-06-26T10:55:49.934Z",
"workspaceId": "507f1f77bcf86cd799439012",
"workspaceName": "production-infra",
"repo": "org/repo-name",
"repoUrl": "https://github.com/org/repo-name",
"vcsType": "github",
"runnerType": "github-actions",
"lastRunStatus": {
"description": "text"
},
"lastApplyTime": "2025-06-26T10:55:49.934Z",
"lastPlanTime": "2025-06-26T10:55:49.934Z",
"lastRunTime": "2025-06-26T10:55:49.934Z",
"iacType": "terraform",
"iacTypeVersion": "1.0.11",
"backendSummary": {
"backendType": "s3",
"backendConfig": {
"bucket": "terraform-state",
"key": "prod/terraform.tfstate"
},
"iacStackId": "stack-123",
"managedResourceCount": 42
},
"labels": [
"prod",
"terraform"
],
"runsCount": 5,
"isWorkflowManaged": true,
"guardrails": [
"cost",
"security"
]
}
]
Deletes a specific workspace and its associated data
Unique identifier of the workspace
0e01b22c-7f4b-5e0f-b1c1-faff031977f8
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
DELETE /v2/workspaces/{workspaceId} HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer JWT
Accept: */*
{
"status": 200,
"data": {
"message": "Workspace deleted successfully"
}
}
Updates Labels for a specific Workspace
Unique identifier of the workspace
0e01b22c-7f4b-5e0f-b1c1-faff031977f8
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
List of labels to assign to the workspace
PUT /v2/workspaces/{workspaceId}/labels HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"labels": [
"text"
]
}
{
"id": "507f1f77bcf86cd799439015",
"workspaceName": "production-infra",
"labels": [
"production",
"terraform",
"critical"
],
"updatedAt": "2025-06-26T10:55:49.934Z"
}
Lists all Runs for a specific Workspace
Unique identifier of the workspace
0e01b22c-7f4b-5e0f-b1c1-faff031977f8
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
0
25
POST /v2/workspaces/{workspaceId}/runs/search HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 1368
{
"projection": [
"text"
],
"searchValue": "text",
"filters": {
"runId": [
"run-123456"
],
"runName": [
"Deploy to Production"
],
"status": [
"plan_success"
],
"pullRequestUrl": [
"https://github.com/org/repo/pull/123"
],
"branch": [
"main"
],
"commitId": [
"abc123def456"
],
"ciTool": [
"github-actions"
],
"buildId": [
"build-789012"
],
"buildName": [
"CI Build"
],
"buildUrl": [
"https://github.com/org/repo/actions/runs/789012"
],
"vcsType": [
"github"
],
"repository": [
"org/repo"
],
"repositoryUrl": [
"https://github.com/org/repo"
],
"title": [
"Update infrastructure for new feature"
],
"createdAt": "2025-06-26T10:55:49.934Z",
"updatedAt": "2025-06-26T10:55:49.934Z",
"$or": {
"runId": [
"run-123456"
],
"runName": [
"Deploy to Production"
],
"status": [
"plan_success"
],
"pullRequestUrl": [
"https://github.com/org/repo/pull/123"
],
"branch": [
"main"
],
"commitId": [
"abc123def456"
],
"ciTool": [
"github-actions"
],
"buildId": [
"build-789012"
],
"buildName": [
"CI Build"
],
"buildUrl": [
"https://github.com/org/repo/actions/runs/789012"
],
"vcsType": [
"github"
],
"repository": [
"org/repo"
],
"repositoryUrl": [
"https://github.com/org/repo"
],
"title": [
"Update infrastructure for new feature"
],
"createdAt": "2025-06-26T10:55:49.934Z",
"updatedAt": "2025-06-26T10:55:49.934Z"
}
},
"sort": [
{
"updatedAt": {
"order": -1
},
"title": {
"order": -1
},
"commitId": {
"order": -1
},
"branch": {
"order": -1
},
"status": {
"order": -1
},
"ciTool": {
"order": -1
},
"vcsType": {
"order": -1
},
"repository": {
"order": -1
}
}
]
}
[
{
"id": "507f1f77bcf86cd799439011",
"accountId": "507f1f77bcf86cd799439011",
"createdAt": "2025-06-26T10:55:49.934Z",
"updatedAt": "2025-06-26T10:55:49.934Z",
"workspaceId": "507f1f77bcf86cd799439012",
"workspaceName": "production-infra",
"runId": "run-123456",
"runName": "Deploy to Production",
"status": "plan_success",
"pullRequestId": "123",
"pullRequestUrl": "https://github.com/org/repo/pull/123",
"branch": "main",
"commitId": "abc123def456",
"commitUrl": "https://github.com/org/repo/commit/abc123def456",
"runnerType": "github-actions",
"buildId": "build-789012",
"buildUrl": "https://github.com/org/repo/actions/runs/789012",
"buildName": "CI Build",
"vcsType": "github",
"repo": "org/repo",
"repoUrl": "https://github.com/org/repo",
"ownerSummary": {
"email": "[email protected]",
"name": "John Doe",
"initials": "JD",
"customColor": "#00000F"
},
"title": "Update infrastructure for new feature",
"terraformVersion": "1.0.11",
"iacType": "terraform",
"backendSummary": {
"backendType": "s3",
"backendConfig": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"iacStackId": "text",
"managedResourceCount": 1
},
"planTaskId": "507f1f77bcf86cd799439013",
"applyTaskId": "507f1f77bcf86cd799439014",
"plan": [
{
"id": "507f1f77bcf86cd799439011",
"accountId": "507f1f77bcf86cd799439011",
"createdAt": "2025-06-26T10:55:49.934Z",
"updatedAt": "2025-06-26T10:55:49.934Z",
"contentKeys": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"status": "completed",
"resultStatus": "success",
"type": {
"description": "text"
},
"guardrailsSummary": {
"total": 10,
"passed": 8,
"failed": 2,
"violations": [
{
"id": "v1",
"severity": "high",
"message": "Resource does not have required tags"
}
],
"description": "text"
},
"backendSummary": {
"type": "s3",
"config": {
"bucket": "terraform-state",
"key": "prod/terraform.tfstate"
},
"resources": 42,
"description": "text"
},
"changedFilesCodeSummary": {
"total": 5,
"added": 2,
"modified": 3,
"deleted": 0,
"files": [
{
"path": "main.tf",
"type": "modified"
}
],
"description": "text"
},
"vcsType": {
"description": "text"
},
"runnerType": {
"description": "text"
}
}
],
"apply": [
{
"id": "507f1f77bcf86cd799439011",
"accountId": "507f1f77bcf86cd799439011",
"createdAt": "2025-06-26T10:55:49.934Z",
"updatedAt": "2025-06-26T10:55:49.934Z",
"contentKeys": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"status": "completed",
"resultStatus": "success",
"type": {
"description": "text"
},
"guardrailsSummary": {
"total": 10,
"passed": 8,
"failed": 2,
"violations": [
{
"id": "v1",
"severity": "high",
"message": "Resource does not have required tags"
}
],
"description": "text"
},
"backendSummary": {
"type": "s3",
"config": {
"bucket": "terraform-state",
"key": "prod/terraform.tfstate"
},
"resources": 42,
"description": "text"
},
"changedFilesCodeSummary": {
"total": 5,
"added": 2,
"modified": 3,
"deleted": 0,
"files": [
{
"path": "main.tf",
"type": "modified"
}
],
"description": "text"
},
"vcsType": {
"description": "text"
},
"runnerType": {
"description": "text"
}
}
]
}
]
Guardrails
Returns a list of guardrails rules based on filter criteria
0
25
POST /v2/guardrails/search HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 496
{
"projection": [
"text"
],
"searchValue": "text",
"filters": {
"createdBy": [
"John Doe"
],
"type": [
"policy",
"cost"
],
"labels": [
"production"
],
"repositories": [
"my-repo"
],
"workspaces": [
"my-workspace"
],
"branches": [
"main"
],
"$or": {
"createdBy": [
"John Doe"
],
"type": [
"policy",
"cost"
],
"labels": [
"production"
],
"repositories": [
"my-repo"
],
"workspaces": [
"my-workspace"
],
"branches": [
"main"
]
}
},
"sort": [
{
"createdAt": {
"order": -1
},
"accountId": {
"order": -1
},
"createdBy": {
"order": -1
},
"name": {
"order": -1
},
"severity": {
"order": -1
}
}
]
}
[
{
"id": "507f1f77bcf86cd799439012",
"accountId": "507f1f77bcf86cd799439012",
"createdBy": "507f1f77bcf86cd799439012",
"name": "text",
"type": "policy",
"scope": {
"workspaces": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"repositories": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"branches": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"labels": {
"include": [
"text"
],
"exclude": [
"text"
]
}
},
"criteria": {
"cost": {
"thresholdAmount": 1,
"thresholdPercentage": 1
},
"policy": {
"severity": "text",
"policies": {
"include": [
"text"
],
"exclude": [
"text"
]
}
},
"resource": {
"actions": [
"create"
],
"regions": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"assetTypes": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"specificResources": [
"text"
]
},
"tag": {
"tagEnforcementMode": "requiredTags",
"requiredTags": [
"text"
],
"requiredValues": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
}
}
},
"isEnabled": true,
"createdAt": "2025-06-26T10:55:49.934Z",
"updatedAt": "2025-06-26T10:55:49.934Z",
"notificationId": "507f1f77bcf86cd799439012",
"severity": 0
}
]
Creates a new guardrail rule with optional notification setup
POST /v2/guardrails HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 913
{
"accountId": "507f1f77bcf86cd799439012",
"createdBy": "507f1f77bcf86cd799439012",
"name": "text",
"type": "policy",
"scope": {
"workspaces": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"repositories": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"branches": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"labels": {
"include": [
"text"
],
"exclude": [
"text"
]
}
},
"criteria": {
"cost": {
"thresholdAmount": 1,
"thresholdPercentage": 1
},
"policy": {
"severity": "text",
"policies": {
"include": [
"text"
],
"exclude": [
"text"
]
}
},
"resource": {
"actions": [
"create"
],
"regions": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"assetTypes": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"specificResources": [
"text"
]
},
"tag": {
"tagEnforcementMode": "requiredTags",
"requiredTags": [
"text"
],
"requiredValues": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
}
}
},
"isEnabled": true,
"createdAt": "2025-06-26T10:55:49.934Z",
"updatedAt": "2025-06-26T10:55:49.934Z",
"notificationId": "507f1f77bcf86cd799439012",
"severity": 0
}
{
"ruleId": "507f1f77bcf86cd799439011",
"notificationId": "507f1f77bcf86cd799439012"
}
Updates an existing Guardrail Rule and its Notifications
Unique identifier of the Guardrail Rule
0e01b22c-7f4b-5e0f-b1c1-faff031977f8
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Unique identifier of the guardrail rule
507f1f77bcf86cd799439012
Pattern: ^[0-9a-fA-F]{24}$
Unique identifier of the associated account
507f1f77bcf86cd799439012
Pattern: ^[0-9a-fA-F]{24}$
Unique identifier of the user who created the rule
507f1f77bcf86cd799439012
Pattern: ^[0-9a-fA-F]{24}$
Name of the guardrail rule
Type of the guardrail rule
Scope of the guardrail rule
Whether the rule is enabled
Timestamp when the rule was created
Timestamp when the rule was last updated
Unique identifier of the associated notification configuration
507f1f77bcf86cd799439012
Pattern: ^[0-9a-fA-F]{24}$
Severity level of the guardrail rule
PATCH /v2/guardrails/{ruleId} HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 913
{
"accountId": "507f1f77bcf86cd799439012",
"createdBy": "507f1f77bcf86cd799439012",
"name": "text",
"type": "policy",
"scope": {
"workspaces": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"repositories": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"branches": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"labels": {
"include": [
"text"
],
"exclude": [
"text"
]
}
},
"criteria": {
"cost": {
"thresholdAmount": 1,
"thresholdPercentage": 1
},
"policy": {
"severity": "text",
"policies": {
"include": [
"text"
],
"exclude": [
"text"
]
}
},
"resource": {
"actions": [
"create"
],
"regions": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"assetTypes": {
"include": [
"text"
],
"exclude": [
"text"
]
},
"specificResources": [
"text"
]
},
"tag": {
"tagEnforcementMode": "requiredTags",
"requiredTags": [
"text"
],
"requiredValues": {
"ANY_ADDITIONAL_PROPERTY": [
"text"
]
}
}
},
"isEnabled": true,
"createdAt": "2025-06-26T10:55:49.934Z",
"updatedAt": "2025-06-26T10:55:49.934Z",
"notificationId": "507f1f77bcf86cd799439012",
"severity": 0
}
{
"id": "507f1f77bcf86cd799439011",
"name": "Enforce S3 Encryption",
"enabled": true,
"updatedAt": "2024-11-11T10:00:00Z"
}
Deletes a Guardrail Rule and its Associated Notification
Unique identifier of the Guardrail Rule
0e01b22c-7f4b-5e0f-b1c1-faff031977f8
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
DELETE /v2/guardrails/{ruleId} HTTP/1.1
Host: api.firefly.ai
Authorization: Bearer JWT
Accept: */*
{
"status": 200,
"message": "Guardrail rule and notification deleted successfully"
}
Last updated
Was this helpful?