From db11eb0ff5dd05b281334a0389ee9ba4eea49764 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 07:14:23 +0000 Subject: [PATCH 1/3] chore: regenerate catalog from OpenAPI spec --- src/catalog.json | 14938 +++++++++++++++++++++++---------------------- 1 file changed, 7606 insertions(+), 7332 deletions(-) diff --git a/src/catalog.json b/src/catalog.json index 7359ecc..dea31c3 100644 --- a/src/catalog.json +++ b/src/catalog.json @@ -1,6 +1,6 @@ [ { - "id": "allow_artifact_for_env", + "id": "allow_artifact_for_environment", "method": "PUT", "path": "/allowlists/{org}/{env_name}", "summary": "Allow artifact for environment", @@ -116,7 +116,7 @@ "searchText": "archive custom attestation type archive a custom attestation type. put custom-attestation-types org custom_attestation_type_name archive custom attestation types" }, { - "id": "archive_env", + "id": "archive_environment", "method": "PUT", "path": "/environments/{org}/{env_name}/archive", "summary": "Archive environment", @@ -180,7 +180,7 @@ "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Fingerprint"} + "schema": {"type":"string","pattern":"^[a-f0-9]{64}$","title":"Fingerprint"} }, { "name": "org", @@ -227,7 +227,7 @@ "searchText": "assert artifact assert an artifact. get asserts org fingerprint fingerprint asserts" }, { - "id": "attach_policy_to_env", + "id": "attach_environment_policy", "method": "POST", "path": "/environments/{org}/{env_name}/policies", "summary": "Attach policy to environment", @@ -273,198 +273,26 @@ "searchText": "attach policy to environment attach a policy to an environment. post environments org env_name policies environments" }, { - "id": "azure_apps_report", - "method": "PUT", - "path": "/environments/{org}/{env_name}/report/azure-apps", - "summary": "Report Azure Web and Function Apps environment", - "description": "Process a report for an Azure Web and Function Apps environment.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "type": { - "type": "string", - "const": "azure-apps", - "title": "Type", - "description": "Environment type", - "default": "azure-apps" - }, - "artifacts": { - "items": { - "properties": { - "digests": { - "additionalProperties": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{64}$"}, - {"type":"string","const":""} - ] - }, - "type": "object", - "title": "Digests", - "description": "Image name to sha256 fingerprint mapping" - }, - "digests_source": { - "type": "string", - "enum": ["acr","logs","kosli-cli"], - "title": "Digests Source", - "description": "Source of the digests. Valid values are ['acr', 'logs', 'kosli-cli']" - }, - "app_name": { - "type": "string", - "title": "App Name", - "description": "Azure Web/Function app name" - }, - "app_kind": {"type":"string","title":"App Kind","description":"Azure app kind"}, - "creationTimestamp": { - "type": "integer", - "title": "Creationtimestamp", - "description": "Creation time stamp for the Web app in UTC" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["digests","digests_source","app_name","app_kind","creationTimestamp"], - "title": "AzureAppsArtifact", - "description": "Individual artifact in an Azure Web/Function Apps report" - }, - "type": "array", - "title": "Artifacts", - "description": "all artifacts in the report" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["artifacts"], - "title": "AzureAppsReport", - "description": "Azure Web and Function Apps report containing artifacts", - "examples": [ - { - "artifacts": [ - { - "app_kind": "app", - "app_name": "my-azure-web-app", - "creationTimestamp": 1632122962, - "digests": { - "acme/myapp:1.0.0": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" - }, - "digests_source": "acr" - } - ] - } - ] - } - } - ], - "searchText": "report azure web and function apps environment process a report for an azure web and function apps environment. put environments org env_name report azure-apps environments" - }, - { - "id": "build_statistics", - "method": "GET", - "path": "/builds/{org}/statistics", - "summary": "Build frequency statistics", - "description": "Build-frequency series for a repo within a time window.\n\nReturns one timestamp per build (deduplicated by fingerprint) plus the\nresolved window bounds and a count. Daily bucketing and the median are\ncomputed client-side.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", - "tags": ["Builds"], + "id": "attest_custom", + "method": "POST", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/custom", + "summary": "Attest custom", + "description": "Add custom attestation to a trail with an optional attachment file.", + "tags": ["Attestation"], "parameters": [ { - "name": "org", + "name": "flow_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "repo_id", - "in": "query", - "required": false, - "description": "Filter by external VCS repo ID", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by external VCS repo ID", - "title": "Repo Id" - } - }, - { - "name": "repo_name", - "in": "query", - "required": false, - "description": "Filter by repo name (e.g. 'cyber-dojo/differ')", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by repo name (e.g. 'cyber-dojo/differ')", - "title": "Repo Name" - } - }, - { - "name": "repo_inner_id", - "in": "query", - "required": false, - "description": "Filter by the repo's internal id (the `id` in the repo response). The stable identifier: unaffected by repo renames or a missing external VCS id.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by the repo's internal id (the `id` in the repo response). The stable identifier: unaffected by repo renames or a missing external VCS id.", - "title": "Repo Inner Id" - } - }, - { - "name": "start_ts", - "in": "query", - "required": false, - "description": "Include builds created at or after this timestamp. Defaults to 28 days before end_ts", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include builds created at or after this timestamp. Defaults to 28 days before end_ts", - "title": "Start Ts" - } + "schema": {"type":"string","title":"Flow Name"} }, { - "name": "end_ts", - "in": "query", - "required": false, - "description": "Include builds created at or before this timestamp. Defaults to now", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include builds created at or before this timestamp. Defaults to now", - "title": "End Ts" - } - } - ], - "requestBody": null, - "searchText": "build frequency statistics build-frequency series for a repo within a time window.\n\nreturns one timestamp per build (deduplicated by fingerprint) plus the\nresolved window bounds and a count. daily bucketing and the median are\ncomputed client-side.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get builds org statistics builds" - }, - { - "id": "cloud_run_report", - "method": "PUT", - "path": "/environments/{org}/{env_name}/report/cloud-run", - "summary": "Report Cloud Run environment", - "description": "Process a report for a Google Cloud Run environment.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", + "name": "trail_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Env Name"} + "schema": {"type":"string","title":"Trail Name"} }, { "name": "org", @@ -478,108 +306,228 @@ { "name": "body", "required": true, - "description": "Request body (application/json)", + "description": "Request body (multipart/form-data)", "schema": { "properties": { - "type": { - "type": "string", - "const": "cloud-run", - "title": "Type", - "description": "Environment type", - "default": "cloud-run" - }, - "artifacts": { - "items": { - "properties": { - "digests": { - "additionalProperties": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{64}$"}, - {"type":"string","const":""} - ] - }, - "type": "object", - "title": "Digests", - "description": "Image name to sha256 fingerprint mapping" - }, - "creationTimestamp": { - "type": "integer", - "title": "Creationtimestamp", - "description": "Creation time stamp for the revision or job execution in UTC" - }, - "kind": { - "type": "string", - "enum": ["service","job"], - "title": "Kind", - "description": "Discriminator for the Cloud Run resource kind: \"service\" or \"job\"" - }, - "serviceName": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Servicename", - "description": "Cloud Run service name (kind=service)" - }, - "revisionName": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Revisionname", - "description": "Cloud Run revision name (kind=service)" + "data_json": { + "allOf": [ + { + "if": { + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts","artifact_fingerprint"] }, - "jobName": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Jobname", - "description": "Cloud Run job name (kind=job)" - } + "then": {"properties":{"target_artifacts":{"maxItems":1}}} }, - "additionalProperties": false, - "type": "object", - "required": ["digests","creationTimestamp","kind"], - "title": "CloudRunArtifact", - "description": "Individual artifact (revision or job) in a Cloud Run report" - }, - "type": "array", - "title": "Artifacts", - "description": "all artifacts in the report" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["artifacts"], - "title": "CloudRunReport", - "description": "Cloud Run report containing revision and job artifacts", - "examples": [ - { - "artifacts": [ { - "creationTimestamp": 1632122962, - "digests": { - "europe-west1-docker.pkg.dev/proj/svc@sha256:c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" + "if": { + "not": {"required":["artifact_fingerprint"]}, + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts"] }, - "kind": "service", - "revisionName": "hello-world-00007-abc", - "serviceName": "hello-world" + "then": {"required":["git_commit_info"]} + } + ], + "properties": { + "attestation_name": { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-_,]+$", + "title": "Attestation Name" + }, + "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "artifact_fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Artifact Fingerprint" + }, + "target_artifacts": { + "anyOf": [ + {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, + {"type":"null"} + ], + "title": "Target Artifacts" + }, + "git_commit_info": { + "anyOf": [ + { + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, + "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" + }, + "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, + "timestamp": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Timestamp" + }, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Parents" + }, + "verified": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Verified" + }, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } + }, + "type": "object", + "required": ["sha1"], + "title": "GitCommit" + }, + {"type":"null"} + ] + }, + "repo_info": { + "anyOf": [ + { + "properties": { + "name": {"type":"string","title":"Name"}, + "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, + "url": {"type":"string","title":"Url"}, + "description": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Description" + }, + "provider": { + "anyOf": [ + { + "type": "string", + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ] + }, + {"type":"null"} + ], + "title": "Provider" + }, + "namespace_path": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Namespace Path" + }, + "additional_info": { + "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], + "title": "Additional Info" + } + }, + "type": "object", + "required": ["name","url"], + "title": "RepoInfoPostInput" + }, + {"type":"null"} + ] + }, + "external_urls": { + "anyOf": [ + { + "patternProperties": { + "^[^=.]+$": { + "properties": { + "href": {"type":"string","title":"Href"}, + "fingerprint": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{64}$"}, + {"type":"null"} + ], + "title": "Fingerprint" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["href"], + "title": "ExternalAttachmentUrl" + } + }, + "type": "object" + }, + {"type":"null"} + ], + "title": "External Urls" + }, + "annotations": { + "anyOf": [ + {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, + {"type":"null"} + ], + "title": "Annotations" + }, + "user_data": { + "anyOf": [ + {"additionalProperties":true,"type":"object"}, + {"items":{},"type":"array"}, + {"type":"null"} + ], + "title": "User Data" }, + "type_name": {"type":"string","title":"Type Name"}, + "attestation_data": { + "type": "string", + "contentMediaType": "application/json", + "contentSchema": {}, + "title": "Attestation Data" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["attestation_name","type_name","attestation_data"], + "title": "CustomAttestationPostInput", + "examples": [ { - "creationTimestamp": 1632122962, - "digests": { - "europe-west1-docker.pkg.dev/proj/job@sha256:1e54935005f517e13b0a104681d2aad9092a147ba7f3573a84c56dda8001f1dc": "1e54935005f517e13b0a104681d2aad9092a147ba7f3573a84c56dda8001f1dc" + "attestation_data": {"key":"value"}, + "attestation_name": "custom", + "git_commit_info": { + "author": "Jon Smith ", + "branch": "main", + "message": "adding glorious commit", + "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", + "timestamp": 1750923680, + "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" }, - "jobName": "sandman-job", - "kind": "job" + "type_name": "custom_type", + "user_data": {} } - ] + ], + "description": "Attestation data in JSON format" + }, + "attachment_file": { + "anyOf": [ + {"type":"string","contentMediaType":"application/octet-stream"}, + {"type":"null"} + ], + "title": "Attachment File", + "description": "Optional attachment file (max size: 10MB)" } - ] + }, + "type": "object", + "required": ["data_json"], + "title": "Body_attest_custom" } } ], - "searchText": "report cloud run environment process a report for a google cloud run environment. put environments org env_name report cloud-run environments" + "searchText": "attest custom add custom attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name custom attestation" }, { - "id": "create_artifact", + "id": "attest_generic", "method": "POST", - "path": "/artifacts/{org}/{flow_name}", - "summary": "Report artifact", - "description": "Create an artifact for organization.", - "tags": ["Artifacts"], + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/generic", + "summary": "Attest generic", + "description": "Add Generic attestation to a trail with an optional attachment file.", + "tags": ["Attestation"], "parameters": [ { "name": "flow_name", @@ -588,6 +536,13 @@ "description": "", "schema": {"type":"string","title":"Flow Name"} }, + { + "name": "trail_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, { "name": "org", "in": "path", @@ -600,290 +555,241 @@ { "name": "body", "required": true, - "description": "Request body (application/json)", + "description": "Request body (multipart/form-data)", "schema": { - "allOf": [ - {"anyOf":[{"required":["git_commit"]},{"required":["git_commit_info"]}]}, - { - "if": {"required":["trail_name","template_reference_name"]}, - "then": {"not":{"required":["template"]}} - } - ], "properties": { - "trail_name": { - "anyOf": [ - {"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9\\-_.~]*$"}, - {"type":"null"} - ], - "title": "Trail Name" - }, - "template_reference_name": { - "anyOf": [{"type":"string","pattern":"^[a-zA-Z0-9\\-_]+$"},{"type":"null"}], - "title": "Template Reference Name" - }, - "fingerprint": {"type":"string","pattern":"^[a-f0-9]{64}$","title":"Fingerprint"}, - "filename": {"type":"string","minLength":1,"title":"Filename"}, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "git_commit": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}], - "title": "Git Commit" - }, - "git_commit_info": { - "anyOf": [ + "data_json": { + "allOf": [ { - "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, - "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, - "timestamp": {"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"}, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Parents" - }, - "verified": {"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"}, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } + "if": { + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts","artifact_fingerprint"] }, - "type": "object", - "required": ["sha1"], - "title": "GitCommit" + "then": {"properties":{"target_artifacts":{"maxItems":1}}} }, - {"type":"null"} - ] - }, - "repo_info": { - "anyOf": [ { - "properties": { - "name": {"type":"string","title":"Name"}, - "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, - "url": {"type":"string","title":"Url"}, - "description": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Description" - }, - "provider": { - "anyOf": [ - { - "type": "string", - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ] - }, - {"type":"null"} - ], - "title": "Provider" - }, - "namespace_path": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Namespace Path" - }, - "additional_info": { - "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], - "title": "Additional Info" - } + "if": { + "not": {"required":["artifact_fingerprint"]}, + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts"] }, - "type": "object", - "required": ["name","url"], - "title": "RepoInfoPostInput" + "then": {"required":["git_commit_info"]} + } + ], + "properties": { + "attestation_name": { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-_,]+$", + "title": "Attestation Name" }, - {"type":"null"} - ] - }, - "commits_list": { - "anyOf": [ - { - "items": { - "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, - "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, - "timestamp": {"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"}, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Parents" + "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "artifact_fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Artifact Fingerprint" + }, + "target_artifacts": { + "anyOf": [ + {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, + {"type":"null"} + ], + "title": "Target Artifacts" + }, + "git_commit_info": { + "anyOf": [ + { + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, + "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" + }, + "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, + "timestamp": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Timestamp" + }, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Parents" + }, + "verified": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Verified" + }, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } }, - "verified": {"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"}, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } + "type": "object", + "required": ["sha1"], + "title": "GitCommit" }, - "type": "object", - "required": ["sha1"], - "title": "GitCommit" - }, - "type": "array" + {"type":"null"} + ] }, - {"type":"null"} - ], - "title": "Commits List" - }, - "repo_url": { - "anyOf": [{"type":"string"},{"type":"string","const":""},{"type":"null"}], - "title": "Repo Url" - }, - "is_compliant": {"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Compliant"}, - "build_url": {"type":"string","title":"Build Url"}, - "commit_url": {"type":"string","title":"Commit Url"}, - "template": { - "anyOf": [ - {"type":"string"}, - {"items":{"type":"string"},"type":"array"}, - {"type":"null"} - ], - "title": "Template" - }, - "external_urls": { - "anyOf": [ - { - "patternProperties": { - "^[^=.]+$": { + "repo_info": { + "anyOf": [ + { "properties": { - "href": {"type":"string","title":"Href"}, - "fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Fingerprint" + "name": {"type":"string","title":"Name"}, + "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, + "url": {"type":"string","title":"Url"}, + "description": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Description" + }, + "provider": { + "anyOf": [ + { + "type": "string", + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ] + }, + {"type":"null"} + ], + "title": "Provider" + }, + "namespace_path": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Namespace Path" + }, + "additional_info": { + "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], + "title": "Additional Info" } }, - "additionalProperties": false, "type": "object", - "required": ["href"], - "title": "ExternalAttachmentUrl" - } - }, - "type": "object" + "required": ["name","url"], + "title": "RepoInfoPostInput" + }, + {"type":"null"} + ] }, + "external_urls": { + "anyOf": [ + { + "patternProperties": { + "^[^=.]+$": { + "properties": { + "href": {"type":"string","title":"Href"}, + "fingerprint": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{64}$"}, + {"type":"null"} + ], + "title": "Fingerprint" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["href"], + "title": "ExternalAttachmentUrl" + } + }, + "type": "object" + }, + {"type":"null"} + ], + "title": "External Urls" + }, + "annotations": { + "anyOf": [ + {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, + {"type":"null"} + ], + "title": "Annotations" + }, + "user_data": { + "anyOf": [ + {"additionalProperties":true,"type":"object"}, + {"items":{},"type":"array"}, + {"type":"null"} + ], + "title": "User Data" + }, + "is_compliant": {"type":"boolean","title":"Is Compliant"} + }, + "additionalProperties": false, + "type": "object", + "required": ["attestation_name","is_compliant"], + "title": "GenericAttestationPostInput", + "examples": [ + { + "annotations": {"key":"value"}, + "artifact_fingerprint": "089eeef9ef2ba07f142d93bb172eab3f23586b4cb40af75175ce140ab9a88c9a", + "attestation_name": "manual-test", + "description": "this is a glorious attestation", + "external_urls": {"github":"https://github.com/org/repo/actions/123"}, + "git_commit_info": { + "author": "Jon Smith ", + "branch": "main", + "message": "adding glorious commit", + "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", + "timestamp": 1750923680, + "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" + }, + "is_compliant": true, + "origin_url": "https://github.com/actions/123", + "user_data": {} + } + ], + "description": "Attestation data in JSON format" + }, + "attachment_file": { + "anyOf": [ + {"type":"string","contentMediaType":"application/octet-stream"}, {"type":"null"} ], - "title": "External Urls" - }, - "annotations": { - "anyOf": [ - {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, - {"type":"null"} - ], - "title": "Annotations" - }, - "user_data": { - "anyOf": [ - {"additionalProperties":true,"type":"object"}, - {"items":{},"type":"array"}, - {"type":"null"} - ], - "title": "User Data" + "title": "Attachment File", + "description": "Optional attachment file (max size: 10MB)" } }, "type": "object", - "required": ["fingerprint","filename","build_url","commit_url"], - "title": "CreateArtifact" + "required": ["data_json"], + "title": "Body_attest_generic" } } ], - "searchText": "report artifact create an artifact for organization. post artifacts org flow_name artifacts" + "searchText": "attest generic add generic attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name generic attestation" }, { - "id": "create_env", - "method": "PUT", - "path": "/environments/{org}", - "summary": "Create or update environment", - "description": "Create or update an Environment for an organization.", - "tags": ["Environments"], + "id": "attest_jira", + "method": "POST", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/jira", + "summary": "Attest Jira issue", + "description": "Add Jira attestation to a trail with an optional attachment file.", + "tags": ["Attestation"], "parameters": [ { - "name": "org", + "name": "flow_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ + "schema": {"type":"string","title":"Flow Name"} + }, { - "name": "body", + "name": "trail_name", + "in": "path", "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "name": {"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_]*$","title":"Name"}, - "type": { - "type": "string", - "enum": [ - "K8S", - "ECS", - "S3", - "lambda", - "server", - "docker", - "azure-apps", - "cloud-run", - "logical" - ], - "title": "Type" - }, - "description": {"type":"string","title":"Description"}, - "include_scaling": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Include Scaling", - "description": "This field is deprecated and will be removed in a future version. Scaling events are no longer recorded, so this field is ignored.", - "deprecated": true - }, - "require_provenance": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Require Provenance", - "description": "This field is deprecated and will be removed in a future version. Use policies instead.", - "deprecated": true - }, - "included_environments": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Included Environments" - }, - "policies": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Policies" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["name","type","description"], - "title": "CreateEnvironmentPutInput" - } - } - ], - "searchText": "create or update environment create or update an environment for an organization. put environments org environments" - }, - { - "id": "create_flow_with_template", - "method": "PUT", - "path": "/flows/{org}/template_file", - "summary": "Create or update flow with template", - "description": "Create or update a flow for an organization.", - "tags": ["Flows"], - "parameters": [ + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, { "name": "org", "in": "path", @@ -900,389 +806,257 @@ "schema": { "properties": { "data_json": { - "properties": { - "name": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", - "title": "Name" + "allOf": [ + { + "if": { + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts","artifact_fingerprint"] + }, + "then": {"properties":{"target_artifacts":{"maxItems":1}}} }, - "description": {"type":"string","title":"Description"}, - "visibility": { - "anyOf": [{"type":"string","enum":["public","private"]},{"type":"null"}], - "title": "Visibility" + { + "if": { + "not": {"required":["artifact_fingerprint"]}, + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts"] + }, + "then": {"required":["git_commit_info"]} } - }, - "type": "object", - "required": ["name","description"], - "title": "CreateFlow", - "description": "Flow metadata in JSON format" - }, - "template_file": { - "anyOf": [ - {"type":"string","contentMediaType":"application/octet-stream"}, - {"type":"null"} ], - "title": "Template File", - "description": "The flow template file (max size: 10MB)" - } - }, - "type": "object", - "required": ["data_json"], - "title": "Body_create_flow_with_template" - } - } - ], - "searchText": "create or update flow with template create or update a flow for an organization. put flows org template_file flows" - }, - { - "id": "create_or_update_env_action", - "method": "PUT", - "path": "/actions/{org}/environments", - "summary": "Create or update environment action", - "description": "Create or Update an environment action for an org.", - "tags": ["Actions"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "name": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~/]*$", - "title": "Name", - "examples": ["production-action"] - }, - "targets": { - "items": { - "anyOf": [ - { - "properties": { - "type": {"type":"string","const":"SLACK","title":"Type","default":"SLACK"}, - "last_success_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Success At" - }, - "last_failure_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Failure At" - }, - "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, - "context": { - "anyOf": [ - { - "properties": { - "channel_id": {"type":"string","title":"Channel Id"}, - "channel_name": {"type":"string","title":"Channel Name"}, - "team_id": {"type":"string","title":"Team Id"} - }, - "additionalProperties": false, - "type": "object", - "required": ["channel_id","channel_name","team_id"], - "title": "SlackAppContext" - }, - {"type":"null"} - ] - } - }, - "additionalProperties": false, - "type": "object", - "required": ["webhook"], - "title": "SlackActionTarget" - }, - { - "properties": { - "type": {"type":"string","const":"WEBHOOK","title":"Type","default":"WEBHOOK"}, - "last_success_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Success At" - }, - "last_failure_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Failure At" + "properties": { + "attestation_name": { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-_,]+$", + "title": "Attestation Name" + }, + "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "artifact_fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Artifact Fingerprint" + }, + "target_artifacts": { + "anyOf": [ + {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, + {"type":"null"} + ], + "title": "Target Artifacts" + }, + "git_commit_info": { + "anyOf": [ + { + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, + "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" + }, + "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, + "timestamp": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Timestamp" + }, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Parents" + }, + "verified": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Verified" + }, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } }, - "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, - "payload_version": { - "type": "string", - "const": "1.0", - "title": "Payload Version", - "default": "1.0" - } + "type": "object", + "required": ["sha1"], + "title": "GitCommit" }, - "additionalProperties": false, - "type": "object", - "required": ["webhook"], - "title": "WebhookActionTarget" - }, - { - "properties": { - "type": {"type":"string","const":"EMAIL","title":"Type","default":"EMAIL"}, - "last_success_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Success At" + {"type":"null"} + ] + }, + "repo_info": { + "anyOf": [ + { + "properties": { + "name": {"type":"string","title":"Name"}, + "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, + "url": {"type":"string","title":"Url"}, + "description": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Description" + }, + "provider": { + "anyOf": [ + { + "type": "string", + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ] + }, + {"type":"null"} + ], + "title": "Provider" + }, + "namespace_path": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Namespace Path" + }, + "additional_info": { + "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], + "title": "Additional Info" + } }, - "last_failure_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Failure At" + "type": "object", + "required": ["name","url"], + "title": "RepoInfoPostInput" + }, + {"type":"null"} + ] + }, + "external_urls": { + "anyOf": [ + { + "patternProperties": { + "^[^=.]+$": { + "properties": { + "href": {"type":"string","title":"Href"}, + "fingerprint": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{64}$"}, + {"type":"null"} + ], + "title": "Fingerprint" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["href"], + "title": "ExternalAttachmentUrl" + } }, - "emails": { - "items": {"type":"string","format":"email"}, - "type": "array", - "title": "Emails" - } + "type": "object" }, - "additionalProperties": false, - "type": "object", - "required": ["emails"], - "title": "EmailActionTarget" - }, - { + {"type":"null"} + ], + "title": "External Urls" + }, + "annotations": { + "anyOf": [ + {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, + {"type":"null"} + ], + "title": "Annotations" + }, + "user_data": { + "anyOf": [ + {"additionalProperties":true,"type":"object"}, + {"items":{},"type":"array"}, + {"type":"null"} + ], + "title": "User Data" + }, + "jira_results": { + "items": { "properties": { - "type": {"type":"string","enum":["SLACK","EMAIL","WEBHOOK"],"title":"Type"}, - "config": {"additionalProperties":true,"type":"object","title":"Config"}, - "context": { - "anyOf": [ - { - "properties": { - "channel_id": {"type":"string","title":"Channel Id"}, - "channel_name": {"type":"string","title":"Channel Name"}, - "team_id": {"type":"string","title":"Team Id"} - }, - "additionalProperties": false, - "type": "object", - "required": ["channel_id","channel_name","team_id"], - "title": "SlackAppContext" - }, - {"type":"null"} - ] + "issue_id": {"type":"string","title":"Issue Id"}, + "issue_url": {"type":"string","title":"Issue Url"}, + "issue_exists": {"type":"boolean","title":"Issue Exists"}, + "issue_fields": { + "additionalProperties": true, + "type": "object", + "title": "Issue Fields" } }, "additionalProperties": false, "type": "object", - "required": ["type","config"], - "title": "NestedConfigActionTarget", - "description": "The pre-v2 target shape, with the type's own fields nested under `config`.\n\nStill sent by the Slack app and by older callers, so it stays part of the\npublished contract instead of being accepted as an untyped object." - } - ] - }, - "type": "array", - "title": "Targets" - }, - "type": {"type":"string","const":"env","title":"Type","default":"env"}, - "environments": {"items":{"type":"string"},"type":"array","title":"Environments"}, - "triggers": { - "items": { - "type": "string", - "enum": [ - "ON_STARTED_ARTIFACT", - "ON_EXITED_ARTIFACT", - "ON_SCALED_ARTIFACT", - "ON_ALLOWED_ARTIFACT", - "ON_NON_COMPLIANT_ENV", - "ON_COMPLIANT_ENV" - ] + "required": ["issue_id","issue_url","issue_exists"], + "title": "JiraItem" + }, + "type": "array", + "title": "Jira Results" + } }, - "type": "array", - "title": "Triggers" + "additionalProperties": false, + "type": "object", + "required": ["attestation_name","jira_results"], + "title": "JiraAttestationPostInput", + "examples": [ + { + "attestation_name": "jira", + "git_commit_info": { + "author": "Jon Smith ", + "branch": "main", + "message": "adding glorious commit", + "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", + "timestamp": 1750923680, + "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" + }, + "jira_results": [ + { + "issue_exists": true, + "issue_id": "ML-50", + "issue_url": "https://your-org.atlassian.net/browse/ML-50" + } + ], + "user_data": {} + } + ], + "description": "Attestation data in JSON format" + }, + "attachment_file": { + "anyOf": [ + {"type":"string","contentMediaType":"application/octet-stream"}, + {"type":"null"} + ], + "title": "Attachment File", + "description": "Optional attachment file (max size: 10MB)" } }, - "additionalProperties": false, "type": "object", - "required": ["name","targets","environments","triggers"], - "title": "EnvActionPutInput" + "required": ["data_json"], + "title": "Body_attest_jira" } } ], - "searchText": "create or update environment action create or update an environment action for an org. put actions org environments actions" + "searchText": "attest jira issue add jira attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name jira attestation" }, { - "id": "create_or_update_flow_action", - "method": "PUT", - "path": "/actions/{org}/flows", - "summary": "Create or update flow action", - "description": "Create or Update a flow action for an org.", - "tags": ["Actions"], + "id": "attest_junit", + "method": "POST", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/junit", + "summary": "Attest JUnit test results", + "description": "Add JUnit attestation to a trail with an optional attachment file.", + "tags": ["Attestation"], "parameters": [ { - "name": "org", + "name": "flow_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ + "schema": {"type":"string","title":"Flow Name"} + }, { - "name": "body", + "name": "trail_name", + "in": "path", "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "name": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~/]*$", - "title": "Name", - "examples": ["release-action"] - }, - "targets": { - "items": { - "anyOf": [ - { - "properties": { - "type": {"type":"string","const":"SLACK","title":"Type","default":"SLACK"}, - "last_success_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Success At" - }, - "last_failure_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Failure At" - }, - "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, - "context": { - "anyOf": [ - { - "properties": { - "channel_id": {"type":"string","title":"Channel Id"}, - "channel_name": {"type":"string","title":"Channel Name"}, - "team_id": {"type":"string","title":"Team Id"} - }, - "additionalProperties": false, - "type": "object", - "required": ["channel_id","channel_name","team_id"], - "title": "SlackAppContext" - }, - {"type":"null"} - ] - } - }, - "additionalProperties": false, - "type": "object", - "required": ["webhook"], - "title": "SlackActionTarget" - }, - { - "properties": { - "type": {"type":"string","const":"WEBHOOK","title":"Type","default":"WEBHOOK"}, - "last_success_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Success At" - }, - "last_failure_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Failure At" - }, - "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, - "payload_version": { - "type": "string", - "const": "1.0", - "title": "Payload Version", - "default": "1.0" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["webhook"], - "title": "WebhookActionTarget" - }, - { - "properties": { - "type": {"type":"string","const":"EMAIL","title":"Type","default":"EMAIL"}, - "last_success_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Success At" - }, - "last_failure_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Failure At" - }, - "emails": { - "items": {"type":"string","format":"email"}, - "type": "array", - "title": "Emails" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["emails"], - "title": "EmailActionTarget" - }, - { - "properties": { - "type": {"type":"string","enum":["SLACK","EMAIL","WEBHOOK"],"title":"Type"}, - "config": {"additionalProperties":true,"type":"object","title":"Config"}, - "context": { - "anyOf": [ - { - "properties": { - "channel_id": {"type":"string","title":"Channel Id"}, - "channel_name": {"type":"string","title":"Channel Name"}, - "team_id": {"type":"string","title":"Team Id"} - }, - "additionalProperties": false, - "type": "object", - "required": ["channel_id","channel_name","team_id"], - "title": "SlackAppContext" - }, - {"type":"null"} - ] - } - }, - "additionalProperties": false, - "type": "object", - "required": ["type","config"], - "title": "NestedConfigActionTarget", - "description": "The pre-v2 target shape, with the type's own fields nested under `config`.\n\nStill sent by the Slack app and by older callers, so it stays part of the\npublished contract instead of being accepted as an untyped object." - } - ] - }, - "type": "array", - "title": "Targets" - }, - "type": {"type":"string","const":"flow","title":"Type","default":"flow"}, - "flows": {"items":{"type":"string"},"type":"array","title":"Flows"}, - "triggers": { - "items": { - "type": "string", - "enum": [ - "ON_STARTED_TRAIL", - "ON_ATTESTED_PROVENANCE", - "ON_ATTESTATION", - "ON_APPROVAL", - "ON_RELEASE" - ] - }, - "type": "array", - "title": "Triggers" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["name","targets","flows","triggers"], - "title": "FlowActionPutInput" - } - } - ], - "searchText": "create or update flow action create or update a flow action for an org. put actions org flows actions" - }, - { - "id": "create_service_account", - "method": "POST", - "path": "/service-accounts/{org}", - "summary": "Create a service account", - "description": "Create a new service account in the organization. API keys are minted\nseparately via the `/{name}/api-keys` endpoint.", - "tags": ["Service Accounts"], - "parameters": [ + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, { "name": "org", "in": "path", @@ -1295,114 +1069,46 @@ { "name": "body", "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "name": { - "type": "string", - "maxLength": 64, - "minLength": 1, - "pattern": "^[a-zA-Z0-9\\-]+$", - "title": "Name" - }, - "description": { - "anyOf": [{"type":"string","maxLength":512},{"type":"null"}], - "title": "Description" - }, - "privilege": { - "type": "string", - "enum": ["admin","member","snapshotter","reader"], - "title": "Privilege", - "default": "reader" - } - }, - "type": "object", - "required": ["name"], - "title": "ServiceAccountPostInput" - } - } - ], - "searchText": "create a service account create a new service account in the organization. api keys are minted\nseparately via the `/{name}/api-keys` endpoint. post service-accounts org service accounts" - }, - { - "id": "create_service_account_api_key", - "method": "POST", - "path": "/service-accounts/{org}/{name}/api-keys", - "summary": "Create an API key for a service account", - "description": "Create a new API key for a service account. The key value is only returned once.", - "tags": ["Service Accounts"], - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "description": {"type":"string","maxLength":256,"minLength":1,"title":"Description"}, - "expires_at": { - "anyOf": [{"type":"integer","maximum":4102444800},{"type":"null"}], - "title": "Expires At", - "description": "Unix timestamp for key expiry. Use 0 or omit for no expiry. Must not be in the past." - } - }, - "type": "object", - "required": ["description"], - "title": "ApiKeyPostInput" - } - } - ], - "searchText": "create an api key for a service account create a new api key for a service account. the key value is only returned once. post service-accounts org name api-keys service accounts" - }, - { - "id": "create_trail", - "method": "PUT", - "path": "/trails/{org}/{flow_name}", - "summary": "Begin trail", - "description": "Add a Trail to a Flow.", - "tags": ["Trails"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (multipart/form-data)", + "description": "Request body (multipart/form-data)", "schema": { "properties": { "data_json": { + "allOf": [ + { + "if": { + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts","artifact_fingerprint"] + }, + "then": {"properties":{"target_artifacts":{"maxItems":1}}} + }, + { + "if": { + "not": {"required":["artifact_fingerprint"]}, + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts"] + }, + "then": {"required":["git_commit_info"]} + } + ], "properties": { - "name": {"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9\\-_.~]*$","title":"Name"}, + "attestation_name": { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-_,]+$", + "title": "Attestation Name" + }, + "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "artifact_fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Artifact Fingerprint" + }, + "target_artifacts": { + "anyOf": [ + {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, + {"type":"null"} + ], + "title": "Target Artifacts" + }, "git_commit_info": { "anyOf": [ { @@ -1489,7 +1195,6 @@ {"type":"null"} ] }, - "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, "external_urls": { "anyOf": [ { @@ -1517,6 +1222,13 @@ ], "title": "External Urls" }, + "annotations": { + "anyOf": [ + {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, + {"type":"null"} + ], + "title": "Annotations" + }, "user_data": { "anyOf": [ {"additionalProperties":true,"type":"object"}, @@ -1524,70 +1236,96 @@ {"type":"null"} ], "title": "User Data" + }, + "junit_results": { + "items": { + "properties": { + "name": {"type":"string","title":"Name"}, + "failures": {"type":"integer","title":"Failures"}, + "errors": {"type":"integer","title":"Errors"}, + "skipped": {"type":"integer","title":"Skipped"}, + "total": {"type":"integer","title":"Total"}, + "duration": {"type":"number","title":"Duration"}, + "timestamp": {"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"} + }, + "additionalProperties": false, + "type": "object", + "required": ["name","failures","errors","skipped","total","duration"], + "title": "JUnitResult" + }, + "type": "array", + "minItems": 1, + "title": "Junit Results" } }, + "additionalProperties": false, "type": "object", - "required": ["name"], - "title": "CreateTrail", - "description": "Trail metadata in JSON format" + "required": ["attestation_name","junit_results"], + "title": "JUnitAttestationPostInput", + "examples": [ + { + "attestation_name": "junit", + "git_commit_info": { + "author": "Jon Smith ", + "branch": "main", + "message": "adding glorious commit", + "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", + "timestamp": 1750923680, + "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" + }, + "junit_results": [ + { + "duration": 2.5, + "errors": 0, + "failures": 0, + "name": "test suite", + "skipped": 1, + "total": 5 + } + ], + "user_data": {} + } + ], + "description": "Attestation data in JSON format" }, - "template_file": { + "attachment_file": { "anyOf": [ {"type":"string","contentMediaType":"application/octet-stream"}, {"type":"null"} ], - "title": "Template File", - "description": "Optional flow template file (max size: 10MB)" + "title": "Attachment File", + "description": "Optional attachment file (max size: 10MB)" } }, "type": "object", "required": ["data_json"], - "title": "Body_create_trail" + "title": "Body_attest_junit" } } ], - "searchText": "begin trail add a trail to a flow. put trails org flow_name trails" + "searchText": "attest junit test results add junit attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name junit attestation" }, { - "id": "delete_action", - "method": "DELETE", - "path": "/actions/{org}/{action_number}", - "summary": "Delete an action", - "description": "Delete a specific action for an org.", - "tags": ["Actions"], + "id": "attest_pull_request", + "method": "POST", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/pull_request", + "summary": "Attest pull request", + "description": "Add Pull-Request attestation to a trail with an optional attachment file.", + "tags": ["Attestation"], "parameters": [ { - "name": "action_number", + "name": "flow_name", "in": "path", "required": true, "description": "", - "schema": {"type":"integer","title":"Action Number"} + "schema": {"type":"string","title":"Flow Name"} }, { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "delete an action delete a specific action for an org. delete actions org action_number actions" - }, - { - "id": "delete_environment_notification", - "method": "DELETE", - "path": "/organizations/{org}/environments_notifications/{notification_number}", - "summary": "Delete environment notification", - "description": "Delete a specific environments-notification for an org.", - "tags": ["Organizations"], - "parameters": [ - { - "name": "notification_number", + "name": "trail_name", "in": "path", "required": true, "description": "", - "schema": {"type":"integer","title":"Notification Number"} + "schema": {"type":"string","title":"Trail Name"} }, { "name": "org", @@ -1597,3807 +1335,415 @@ "schema": {"type":"string","title":"Org"} } ], - "requestBody": null, - "searchText": "delete environment notification delete a specific environments-notification for an org. delete organizations org environments_notifications notification_number organizations" - }, - { - "id": "delete_service_account", - "method": "DELETE", - "path": "/service-accounts/{org}/{name}", - "summary": "Delete a service account", - "description": "Remove a service account from the organization.", - "tags": ["Service Accounts"], - "parameters": [ + "requestBody": [ { - "name": "name", - "in": "path", + "name": "body", "required": true, - "description": "", - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "pattern": "^[a-zA-Z0-9\\-]+$", - "title": "Name" - } - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "delete a service account remove a service account from the organization. delete service-accounts org name service accounts" - }, - { - "id": "delete_service_account_api_key", - "method": "DELETE", - "path": "/service-accounts/{org}/{name}/api-keys/{key_id}", - "summary": "Revoke an API key for a service account", - "description": "Revoke an API key for a service account.", - "tags": ["Service Accounts"], - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Name"} - }, - { - "name": "key_id", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Key Id"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "revoke an api key for a service account revoke an api key for a service account. delete service-accounts org name api-keys key_id service accounts" - }, - { - "id": "detach_policy_from_env", - "method": "DELETE", - "path": "/environments/{org}/{env_name}/policies", - "summary": "Detach policy from environment", - "description": "Detach a Policy from an environment.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "policy_names": { - "items": {"type":"string"}, - "type": "array", - "title": "Policy Names", - "description": "List of policy names to attach/detach" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["policy_names"], - "title": "AttachPoliciesPutInput" - } - } - ], - "searchText": "detach policy from environment detach a policy from an environment. delete environments org env_name policies environments" - }, - { - "id": "docker_report", - "method": "PUT", - "path": "/environments/{org}/{env_name}/report/docker", - "summary": "Report Docker environment", - "description": "Process a report for a Docker environment.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", + "description": "Request body (multipart/form-data)", "schema": { "properties": { - "type": { - "type": "string", - "const": "docker", - "title": "Type", - "description": "Environment type", - "default": "docker" - }, - "artifacts": { - "items": { - "properties": { - "digests": { - "additionalProperties": {"type":"string","pattern":"^[a-f0-9]{64}$"}, - "type": "object", - "title": "Digests", - "description": "Image name to sha256 fingerprint mapping" + "data_json": { + "allOf": [ + { + "if": { + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts","artifact_fingerprint"] }, - "creationTimestamp": { - "type": "integer", - "title": "Creationtimestamp", - "description": "Creation time stamp for the container in UTC" - } + "then": {"properties":{"target_artifacts":{"maxItems":1}}} }, - "additionalProperties": false, - "type": "object", - "required": ["digests","creationTimestamp"], - "title": "DockerArtifact", - "description": "Individual artifact in a Docker report" - }, - "type": "array", - "title": "Artifacts", - "description": "all artifacts in the report" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["artifacts"], - "title": "DockerReport", - "description": "Docker report containing artifacts", - "examples": [ - { - "artifacts": [ { - "creationTimestamp": 1632122962, - "digests": { - "acme/myimage:1.0.0": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" - } + "if": { + "not": {"required":["artifact_fingerprint"]}, + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts"] + }, + "then": {"required":["git_commit_info"]} } - ] - } - ] - } - } - ], - "searchText": "report docker environment process a report for a docker environment. put environments org env_name report docker environments" - }, - { - "id": "download_trail_audit_package", - "method": "GET", - "path": "/trails/{org}/{flow_name}/{trail_name}/audit_package", - "summary": "Download trail audit package", - "description": "Download the full trail audit package (same content as the app “Download Full Audit Package”).", - "tags": ["Trails"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "download trail audit package download the full trail audit package (same content as the app “download full audit package”). get trails org flow_name trail_name audit_package trails" - }, - { - "id": "download_trail_audit_pdf", - "method": "GET", - "path": "/trails/{org}/{flow_name}/{trail_name}/audit_pdf", - "summary": "Download trail audit PDF", - "description": "Download only the trail PDF report (same as `trail-page.pdf` inside the full audit package).", - "tags": ["Trails"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "download trail audit pdf download only the trail pdf report (same as `trail-page.pdf` inside the full audit package). get trails org flow_name trail_name audit_pdf trails" - }, - { - "id": "ecs_report", - "method": "PUT", - "path": "/environments/{org}/{env_name}/report/ECS", - "summary": "Report ECS environment", - "description": "Process a report for an ECS environment.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "type": { - "type": "string", - "const": "ECS", - "title": "Type", - "description": "Environment type", - "default": "ECS" - }, - "artifacts": { - "items": { - "properties": { - "digests": { - "additionalProperties": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{64}$"}, - {"type":"string","const":""} - ] + ], + "properties": { + "attestation_name": { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-_,]+$", + "title": "Attestation Name" + }, + "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "artifact_fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Artifact Fingerprint" + }, + "target_artifacts": { + "anyOf": [ + {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, + {"type":"null"} + ], + "title": "Target Artifacts" + }, + "git_commit_info": { + "anyOf": [ + { + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, + "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" + }, + "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, + "timestamp": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Timestamp" + }, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Parents" + }, + "verified": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Verified" + }, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } + }, + "type": "object", + "required": ["sha1"], + "title": "GitCommit" }, - "type": "object", - "title": "Digests", - "description": "Image name to sha256 fingerprint mapping" - }, - "taskArn": {"type":"string","title":"Taskarn","description":"AWS ECS task ARN"}, - "cluster_name": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Cluster Name", - "description": "AWS ECS cluster name" - }, - "service_name": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Service Name", - "description": "AWS ECS service name" - }, - "creationTimestamp": { - "type": "integer", - "title": "Creationtimestamp", - "description": "Creation time stamp for the task in UTC" - } + {"type":"null"} + ] }, - "additionalProperties": false, - "type": "object", - "required": ["digests","taskArn","creationTimestamp"], - "title": "ECSArtifact", - "description": "Individual artifact in an ECS report" - }, - "type": "array", - "title": "Artifacts", - "description": "all artifacts in the report" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["artifacts"], - "title": "ECSReport", - "description": "ECS report containing artifacts", - "examples": [ - { - "artifacts": [ - { - "clusterName": "ecs-cluster", - "creationTimestamp": 1632122962, - "digests": { - "acme/hadroncollider:1.1.1": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" - }, - "serviceName": "ecs-service", - "taskArn": "arn:aws:ecs:eu-central-1:***:task/test/ef5609c25ad44aabb4bb518ac6573f8e" - } - ] - } - ] - } - } - ], - "searchText": "report ecs environment process a report for an ecs environment. put environments org env_name report ecs environments" - }, - { - "id": "environment_diff", - "method": "GET", - "path": "/env-diff/{org}", - "summary": "Get environment diff", - "description": "Get diff between to snapshots", - "tags": ["EnvDiff"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "snappish1", - "in": "query", - "required": true, - "description": "Expression to specify the snapshot 1 for comparison.\nMust contain environment name.\nAdd '#N' to specify exact snapshot number N.\nAdd '~N' to get N-th behind the latest snapshot.\nExamples: staging, staging#10, staging~2", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Expression to specify the snapshot 1 for comparison.\nMust contain environment name.\nAdd '#N' to specify exact snapshot number N.\nAdd '~N' to get N-th behind the latest snapshot.\nExamples: staging, staging#10, staging~2", - "title": "Snappish1" - } - }, - { - "name": "snappish2", - "in": "query", - "required": true, - "description": "Expression to specify the snapshot 2 for comparison.\nMust contain environment name.\nAdd '#N' to specify exact snapshot number N.\n'Add '~N' to get N-th behind the latest snapshot.\nExamples: staging, staging#10, staging~2", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Expression to specify the snapshot 2 for comparison.\nMust contain environment name.\nAdd '#N' to specify exact snapshot number N.\n'Add '~N' to get N-th behind the latest snapshot.\nExamples: staging, staging#10, staging~2", - "title": "Snappish2" - } - } - ], - "requestBody": null, - "searchText": "get environment diff get diff between to snapshots get env-diff org envdiff" - }, - { - "id": "environment_policy_schema_v1", - "method": "GET", - "path": "/schemas/environment-policy/v1", - "summary": "Environment policy schema v1", - "description": "Return the JSON Schema for the environment policy YAML format (v1).", - "tags": ["Schemas"], - "parameters": [], - "requestBody": null, - "searchText": "environment policy schema v1 return the json schema for the environment policy yaml format (v1). get schemas environment-policy v1 schemas" - }, - { - "id": "flow_template_schema_v1", - "method": "GET", - "path": "/schemas/flow-template/v1", - "summary": "Flow template schema v1", - "description": "Return the JSON Schema for the flow template YAML format (v1).", - "tags": ["Schemas"], - "parameters": [], - "requestBody": null, - "searchText": "flow template schema v1 return the json schema for the flow template yaml format (v1). get schemas flow-template v1 schemas" - }, - { - "id": "get_action", - "method": "GET", - "path": "/actions/{org}/{action_number}", - "summary": "Get action", - "description": "Get a specific action for an org.", - "tags": ["Actions"], - "parameters": [ - { - "name": "action_number", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"integer","title":"Action Number"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get action get a specific action for an org. get actions org action_number actions" - }, - { - "id": "get_artifact_attestation", - "method": "GET", - "path": "/attestations/{org}/{flow_name}/artifact/{fingerprint}/{attestation_name}", - "summary": "Get artifact attestation", - "description": "", - "tags": ["Attestation"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "fingerprint", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","pattern":"^[a-f0-9]{5,64}$","title":"Fingerprint"} - }, - { - "name": "attestation_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Attestation Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get artifact attestation get attestations org flow_name artifact fingerprint attestation_name attestation" - }, - { - "id": "get_artifact_by_commit_sha", - "method": "GET", - "path": "/artifacts/{org}/{flow_name}/commit_sha/{commit_sha}", - "summary": "Get artifacts by commit SHA", - "description": "Get artifact by commit sha.", - "tags": ["Artifacts"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", - "title": "Flow Name" - } - }, - { - "name": "commit_sha", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Commit Sha"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "trail", - "in": "query", - "required": false, - "description": "The name of the trail the artifact was reported to.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The name of the trail the artifact was reported to.", - "title": "Trail" - } - } - ], - "requestBody": null, - "searchText": "get artifacts by commit sha get artifact by commit sha. get artifacts org flow_name commit_sha commit_sha artifacts" - }, - { - "id": "get_artifact_by_fingerprint", - "method": "GET", - "path": "/artifacts/{org}/{flow_name}/fingerprint/{fingerprint}", - "summary": "Get artifact by fingerprint", - "description": "Get artifact by fingerprint.", - "tags": ["Artifacts"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", - "title": "Flow Name" - } - }, - { - "name": "fingerprint", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","pattern":"^[a-f0-9]{5,64}$","title":"Fingerprint"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "trail", - "in": "query", - "required": false, - "description": "The name of the trail the artifact was reported to.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The name of the trail the artifact was reported to.", - "title": "Trail" - } - }, - { - "name": "attestation_id", - "in": "query", - "required": false, - "description": "Internal artifact attestation id.", - "schema": { - "anyOf": [ - { - "type": "string", - "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{8}$" - }, - {"type":"null"} - ], - "description": "Internal artifact attestation id.", - "title": "Attestation Id" - } - } - ], - "requestBody": null, - "searchText": "get artifact by fingerprint get artifact by fingerprint. get artifacts org flow_name fingerprint fingerprint artifacts" - }, - { - "id": "get_attestation_evidence", - "method": "GET", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/attestation/{attestation_id}/evidence", - "summary": "Get attestation evidence file", - "description": "Download the evidence file attached to an attestation.", - "tags": ["Attestation"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, - { - "name": "attestation_id", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Attestation Id"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get attestation evidence file download the evidence file attached to an attestation. get attestations org flow_name trail trail_name attestation attestation_id evidence attestation" - }, - { - "id": "get_attestations", - "method": "GET", - "path": "/attestations/{org}", - "summary": "List attestations", - "description": "Get a paginated list of attestations for an organization based on filters\nprovided as query parameters.", - "tags": ["Attestation"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "attestation_id", - "in": "query", - "required": false, - "description": "The attestation ID to search for", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The attestation ID to search for", - "title": "Attestation Id" - } - }, - { - "name": "name", - "in": "query", - "required": false, - "description": "Filter by exact attestation name. Cannot be combined with name_regex.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by exact attestation name. Cannot be combined with name_regex.", - "title": "Name" - } - }, - { - "name": "name_regex", - "in": "query", - "required": false, - "description": "Filter by attestation name (substring regex match)", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by attestation name (substring regex match)", - "title": "Name Regex" - } - }, - { - "name": "flow", - "in": "query", - "required": false, - "description": "Filter by flow name. Repeat the parameter to match several flows.", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by flow name. Repeat the parameter to match several flows.", - "title": "Flow" - } - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter by attestation type. Use built-in types (e.g. 'junit', 'decision') or 'custom:' for custom types. Repeat the parameter to match several types.", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by attestation type. Use built-in types (e.g. 'junit', 'decision') or 'custom:' for custom types. Repeat the parameter to match several types.", - "title": "Type" - } - }, - { - "name": "is_compliant", - "in": "query", - "required": false, - "description": "Filter by compliance state. Omit to include both compliant and non-compliant.", - "schema": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "description": "Filter by compliance state. Omit to include both compliant and non-compliant.", - "title": "Is Compliant" - } - }, - { - "name": "from_timestamp", - "in": "query", - "required": false, - "description": "From timestamp filter. Example: ?from_timestamp=1675167540", - "schema": { - "anyOf": [{"type":"integer"},{"type":"null"}], - "description": "From timestamp filter. Example: ?from_timestamp=1675167540", - "title": "From Timestamp" - } - }, - { - "name": "to_timestamp", - "in": "query", - "required": false, - "description": "To timestamp filter. Example: ?to_timestamp=1675167540", - "schema": { - "anyOf": [{"type":"integer"},{"type":"null"}], - "description": "To timestamp filter. Example: ?to_timestamp=1675167540", - "title": "To Timestamp" - } - }, - { - "name": "after", - "in": "query", - "required": false, - "description": "Cursor for the next page. Use the token from a previous response's _links.next; omit for the first page.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Cursor for the next page. Use the token from a previous response's _links.next; omit for the first page.", - "title": "After" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "How many results to return per page of response (max 100)", - "schema": { - "anyOf": [{"type":"integer","maximum":100,"minimum":1},{"type":"null"}], - "description": "How many results to return per page of response (max 100)", - "default": 20, - "title": "Per Page" - } - } - ], - "requestBody": null, - "searchText": "list attestations get a paginated list of attestations for an organization based on filters\nprovided as query parameters. get attestations org attestation" - }, - { - "id": "get_audit_package", - "method": "GET", - "path": "/artifacts/{org}/{flow_name}/{fingerprint}/audit_package", - "summary": "Get artifact audit package", - "description": "Get audit package for an artifact.", - "tags": ["Artifacts"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", - "title": "Flow Name" - } - }, - { - "name": "fingerprint", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","pattern":"^[a-f0-9]{5,64}$","title":"Fingerprint"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get artifact audit package get audit package for an artifact. get artifacts org flow_name fingerprint audit_package artifacts" - }, - { - "id": "get_control", - "method": "GET", - "path": "/controls/{org}/{identifier}", - "summary": "Get a control", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], - "parameters": [ - { - "name": "identifier", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Identifier"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier controls" - }, - { - "id": "get_control_coverage", - "method": "GET", - "path": "/controls/{org}/{identifier}/coverage", - "summary": "Environment coverage for a control", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], - "parameters": [ - { - "name": "identifier", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Identifier"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of environments per page", - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Number of environments per page", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "search", - "in": "query", - "required": false, - "description": "Filter environments by name (case-insensitive substring)", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter environments by name (case-insensitive substring)", - "title": "Search" - } - }, - { - "name": "covered", - "in": "query", - "required": false, - "description": "Filter by coverage state: true (covered) or false (not covered)", - "schema": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "description": "Filter by coverage state: true (covered) or false (not covered)", - "title": "Covered" - } - } - ], - "requestBody": null, - "searchText": "environment coverage for a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier coverage controls" - }, - { - "id": "get_control_decision", - "method": "GET", - "path": "/controls/{org}/{identifier}/decisions/{decision_id}", - "summary": "Get a single decision for a control", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], - "parameters": [ - { - "name": "identifier", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Identifier"} - }, - { - "name": "decision_id", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Decision Id"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get a single decision for a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier decisions decision_id controls" - }, - { - "id": "get_control_version", - "method": "GET", - "path": "/controls/{org}/{identifier}/versions/{version_number}", - "summary": "Get a specific version of a control", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], - "parameters": [ - { - "name": "identifier", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Identifier"} - }, - { - "name": "version_number", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"integer","title":"Version Number"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get a specific version of a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier versions version_number controls" - }, - { - "id": "get_custom_attestation_type", - "method": "GET", - "path": "/custom-attestation-types/{org}/{custom_attestation_type_name}", - "summary": "Get custom attestation type", - "description": "Get a custom attestation type.", - "tags": ["Custom Attestation Types"], - "parameters": [ - { - "name": "custom_attestation_type_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Custom Attestation Type Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "version", - "in": "query", - "required": false, - "description": "Version of the custom attestation type", - "schema": { - "anyOf": [{"type":"integer"},{"type":"null"}], - "description": "Version of the custom attestation type", - "title": "Version" - } - } - ], - "requestBody": null, - "searchText": "get custom attestation type get a custom attestation type. get custom-attestation-types org custom_attestation_type_name custom attestation types" - }, - { - "id": "get_custom_attestation_types", - "method": "GET", - "path": "/custom-attestation-types/{org}", - "summary": "List custom attestation types", - "description": "List all custom attestation types for an org.", - "tags": ["Custom Attestation Types"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "list custom attestation types list all custom attestation types for an org. get custom-attestation-types org custom attestation types" - }, - { - "id": "get_deployment", - "method": "GET", - "path": "/deployments/{org}/{env_name}/{fingerprint}", - "summary": "Get Deployment", - "description": "Get a single deployment by environment and fingerprint.", - "tags": ["Deployments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "fingerprint", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Fingerprint"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get deployment get a single deployment by environment and fingerprint. get deployments org env_name fingerprint deployments" - }, - { - "id": "get_deployment_frequency", - "method": "GET", - "path": "/environments/{org}/{env_name}/deployment_frequency", - "summary": "Get deployment frequency", - "description": "Get deployment frequency for a specific flow in an environment.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "flow_id", - "in": "query", - "required": false, - "description": "The id of the flow to get deployment frequency", - "schema": { - "type": "string", - "description": "The id of the flow to get deployment frequency", - "title": "Flow Id" - } - } - ], - "requestBody": null, - "searchText": "get deployment frequency get deployment frequency for a specific flow in an environment. get environments org env_name deployment_frequency environments" - }, - { - "id": "get_env_auditlog", - "method": "GET", - "path": "/environments/{org}/{env_name}/auditlog", - "summary": "Get environment audit log", - "description": "Get audit log (as a CSV file) for an environment.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "from_timestamp", - "in": "query", - "required": false, - "description": "From timestamp filter. Takes a UNIX timestamp. e.g. from_timestamp=1675167540", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "From timestamp filter. Takes a UNIX timestamp. e.g. from_timestamp=1675167540", - "title": "From Timestamp" - } - }, - { - "name": "to_timestamp", - "in": "query", - "required": false, - "description": "To timestamp filter. Takes a UNIX timestamp. e.g. from_timestamp=1675167540", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "To timestamp filter. Takes a UNIX timestamp. e.g. from_timestamp=1675167540", - "title": "To Timestamp" - } - }, - { - "name": "event_types", - "in": "query", - "required": false, - "description": "Event types filter. Can be one of started, exited, changed. e.g. event_types=started,exited", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Event types filter. Can be one of started, exited, changed. e.g. event_types=started,exited", - "title": "Event Types" - } - }, - { - "name": "flow_names", - "in": "query", - "required": false, - "description": "Flow names filter as comma separated list. Use 'no provenance' to include artifacts without provenance.e.g. flow_names=server,web,no provenance", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Flow names filter as comma separated list. Use 'no provenance' to include artifacts without provenance.e.g. flow_names=server,web,no provenance", - "title": "Flow Names" - } - }, - { - "name": "repo_names", - "in": "query", - "required": false, - "description": "Repo names filter as comma separated list. e.g. repo_names=repo1,repo2", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Repo names filter as comma separated list. e.g. repo_names=repo1,repo2", - "title": "Repo Names" - } - } - ], - "requestBody": null, - "searchText": "get environment audit log get audit log (as a csv file) for an environment. get environments org env_name auditlog environments" - }, - { - "id": "get_env_events", - "method": "GET", - "path": "/environments/{org}/{env_name}/events", - "summary": "List environment events", - "description": "Get events log for an environment.\n\n**Response Headers:**\n\n* `X-Total-Count`: Total number of events available\n* `X-Per-Page`: Number of events per page\n* `X-Current-Page`: Current page number\n* `X-Total-Pages`: Total number of pages\n* `Link`: Pagination links (first, prev, next, last) when applicable\n\n**Pagination Links Format:**\n```\n; rel=\"first\",\n; rel=\"prev\",\n; rel=\"next\",\n; rel=\"last\"\n```\n\n**Note:** The Link header is only included when there are multiple pages.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "interval", - "in": "query", - "required": false, - "description": "Deprecated, use 'start' and 'end' instead. Expression to specify the interval of snapshots to query.\nMust be two snapshot expressions separated by '..'\nie: '5..10', or '~5..NOW'", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Deprecated, use 'start' and 'end' instead. Expression to specify the interval of snapshots to query.\nMust be two snapshot expressions separated by '..'\nie: '5..10', or '~5..NOW'", - "deprecated": true, - "title": "Interval" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "The page number of response.", - "schema": { - "type": "integer", - "minimum": 1, - "description": "The page number of response.", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "How many results to return per page of response. min: 1, max: 100", - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "How many results to return per page of response. min: 1, max: 100", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "description": "Return results in reverse order. Expected values: True or False. Defaults to False.", - "schema": { - "type": "boolean", - "description": "Return results in reverse order. Expected values: True or False. Defaults to False.", - "default": false, - "title": "Reverse" - } - }, - { - "name": "repo_name", - "in": "query", - "required": false, - "description": "Filter events by repo name. Can be repeated for multiple repos, e.g. repo_name=repo1&repo_name=repo2", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter events by repo name. Can be repeated for multiple repos, e.g. repo_name=repo1&repo_name=repo2", - "title": "Repo Name" - } - }, - { - "name": "start_ts", - "in": "query", - "required": false, - "description": "The start of the interval as a UNIX timestamp. When provided, this takes precedence over the 'start' parameter. e.g. start_ts=1719638400", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "The start of the interval as a UNIX timestamp. When provided, this takes precedence over the 'start' parameter. e.g. start_ts=1719638400", - "title": "Start Ts" - } - }, - { - "name": "end_ts", - "in": "query", - "required": false, - "description": "The end of the interval as a UNIX timestamp. When provided, this takes precedence over the 'end' parameter. e.g. end_ts=1719638400", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "The end of the interval as a UNIX timestamp. When provided, this takes precedence over the 'end' parameter. e.g. end_ts=1719638400", - "title": "End Ts" - } - }, - { - "name": "start", - "in": "query", - "required": false, - "description": "The start of the interval to query. Can be a positive snapshot index (1, 2, etc.), negative snapshot index (-1 for latest, -2 for second latest, etc.), or time reference ['NOW', '1hour', '1h', '2days', '30mins'].", - "schema": { - "type": "string", - "description": "The start of the interval to query. Can be a positive snapshot index (1, 2, etc.), negative snapshot index (-1 for latest, -2 for second latest, etc.), or time reference ['NOW', '1hour', '1h', '2days', '30mins'].", - "default": "1", - "title": "Start" - } - }, - { - "name": "end", - "in": "query", - "required": false, - "description": "The end of the interval to query. Can be a positive snapshot index (1, 2, etc.), negative snapshot index (-1 for latest, -2 for second latest, etc.), or time reference ['NOW', '1hour', '1h', '2days', '30mins'].", - "schema": { - "type": "string", - "description": "The end of the interval to query. Can be a positive snapshot index (1, 2, etc.), negative snapshot index (-1 for latest, -2 for second latest, etc.), or time reference ['NOW', '1hour', '1h', '2days', '30mins'].", - "default": "NOW", - "title": "End" - } - } - ], - "requestBody": null, - "searchText": "list environment events get events log for an environment.\n\n**response headers:**\n\n* `x-total-count`: total number of events available\n* `x-per-page`: number of events per page\n* `x-current-page`: current page number\n* `x-total-pages`: total number of pages\n* `link`: pagination links (first, prev, next, last) when applicable\n\n**pagination links format:**\n```\n; rel=\"first\",\n; rel=\"prev\",\n; rel=\"next\",\n; rel=\"last\"\n```\n\n**note:** the link header is only included when there are multiple pages. get environments org env_name events environments" - }, - { - "id": "get_environment", - "method": "GET", - "path": "/environments/{org}/{env_name}", - "summary": "Get environment", - "description": "Get an environment for an organization.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get environment get an environment for an organization. get environments org env_name environments" - }, - { - "id": "get_environment_notification", - "method": "GET", - "path": "/organizations/{org}/environments_notifications/{notification_number}", - "summary": "Get environment notification", - "description": "Get a specific environments-notification for an org.", - "tags": ["Organizations"], - "parameters": [ - { - "name": "notification_number", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"integer","title":"Notification Number"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get environment notification get a specific environments-notification for an org. get organizations org environments_notifications notification_number organizations" - }, - { - "id": "get_environment_notifications", - "method": "GET", - "path": "/organizations/{org}/environments_notifications", - "summary": "List environment notifications", - "description": "List environments-notifications for an org.", - "tags": ["Organizations"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "list environment notifications list environments-notifications for an org. get organizations org environments_notifications organizations" - }, - { - "id": "get_flow", - "method": "GET", - "path": "/flows/{org}/{flow_name}", - "summary": "Get flow", - "description": "Get a flow for an organization.", - "tags": ["Flows"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get flow get a flow for an organization. get flows org flow_name flows" - }, - { - "id": "get_flow_attestations", - "method": "GET", - "path": "/attestations/{org}/{flow_name}", - "summary": "List flow attestations", - "description": "Get all attestations for a flow for a given time span.", - "tags": ["Attestation"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "The page number of response", - "schema": { - "anyOf": [{"type":"integer"},{"type":"null"}], - "description": "The page number of response", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "How many results to return per page of response", - "schema": { - "anyOf": [{"type":"integer"},{"type":"null"}], - "description": "How many results to return per page of response", - "default": 20, - "title": "Per Page" - } - }, - { - "name": "from_timestamp", - "in": "query", - "required": false, - "description": "From timestamp filter. Example: ?from_timestamp=1675167540", - "schema": { - "anyOf": [{"type":"integer"},{"type":"null"}], - "description": "From timestamp filter. Example: ?from_timestamp=1675167540", - "title": "From Timestamp" - } - }, - { - "name": "to_timestamp", - "in": "query", - "required": false, - "description": "To timestamp filter. Example: ?to_timestamp=1675167540", - "schema": { - "anyOf": [{"type":"integer"},{"type":"null"}], - "description": "To timestamp filter. Example: ?to_timestamp=1675167540", - "title": "To Timestamp" - } - } - ], - "requestBody": null, - "searchText": "list flow attestations get all attestations for a flow for a given time span. get attestations org flow_name attestation" - }, - { - "id": "get_flows", - "method": "GET", - "path": "/flows/{org}", - "summary": "List flows", - "description": "List flows for an organization.", - "tags": ["Flows"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "search_by_name", - "in": "query", - "required": false, - "description": "Return flows that contain the given string in their name. Matched literally, so '-prod' finds the flows whose name ends in '-prod'.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Return flows that contain the given string in their name. Matched literally, so '-prod' finds the flows whose name ends in '-prod'.", - "title": "Search By Name" - } - }, - { - "name": "case_sensitive", - "in": "query", - "required": false, - "description": "Whether the search_by_name filter is case sensitive. Defaults to true.", - "schema": { - "type": "boolean", - "description": "Whether the search_by_name filter is case sensitive. Defaults to true.", - "default": true, - "title": "Case Sensitive" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "The page number of response", - "schema": { - "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], - "description": "The page number of response", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "How many results to return per page. When omitted, all flows are returned as a plain list (no pagination envelope).", - "schema": { - "anyOf": [{"type":"integer","maximum":100,"minimum":1},{"type":"null"}], - "description": "How many results to return per page. When omitted, all flows are returned as a plain list (no pagination envelope).", - "title": "Per Page" - } - }, - { - "name": "sort", - "in": "query", - "required": false, - "description": "Sort field", - "schema": { - "type": "string", - "enum": ["name","latest_activity"], - "title": "FlowSortField", - "description": "Sort field", - "default": "name" - } - }, - { - "name": "sort_direction", - "in": "query", - "required": false, - "description": "Sort direction", - "schema": { - "type": "string", - "enum": ["asc","desc"], - "title": "SortDirection", - "description": "Sort direction", - "default": "asc" - } - }, - { - "name": "space_id", - "in": "query", - "required": false, - "description": "Filter by space ID. Can be repeated for OR semantics, e.g. space_id=a&space_id=b", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by space ID. Can be repeated for OR semantics, e.g. space_id=a&space_id=b", - "title": "Space Id" - } - }, - { - "name": "tag", - "in": "query", - "required": false, - "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:platform", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:platform", - "title": "Tag" - } - } - ], - "requestBody": null, - "searchText": "list flows list flows for an organization. get flows org flows" - }, - { - "id": "get_latest_artifact_commit", - "method": "GET", - "path": "/artifacts/{org}/{flow_name}/{fingerprint}/latest_commit", - "summary": "Get latest artifact commit", - "description": "Get the latest git commit of the artifact.", - "tags": ["Artifacts"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", - "title": "Flow Name" - } - }, - { - "name": "fingerprint", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","pattern":"^[a-f0-9]{5,64}$","title":"Fingerprint"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "branch", - "in": "query", - "required": false, - "description": "The branch to get the commit from", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The branch to get the commit from", - "title": "Branch" - } - } - ], - "requestBody": null, - "searchText": "get latest artifact commit get the latest git commit of the artifact. get artifacts org flow_name fingerprint latest_commit artifacts" - }, - { - "id": "get_organization", - "method": "GET", - "path": "/organizations/{org}", - "summary": "Get organization", - "description": "Get a specific org.", - "tags": ["Organizations"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get organization get a specific org. get organizations org organizations" - }, - { - "id": "get_policy", - "method": "GET", - "path": "/policies/{org}/{policy_name}", - "summary": "Get policy", - "description": "Get a Policy in an organization.", - "tags": ["Policies"], - "parameters": [ - { - "name": "policy_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Policy Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get policy get a policy in an organization. get policies org policy_name policies" - }, - { - "id": "get_repo", - "method": "GET", - "path": "/repos/{org}/{repo_name}", - "summary": "Get a repo", - "description": "Get a repo by name, or unambiguously by its internal `id`.\n\nReturns the repo's details, including its internal `id`, which is required to\ntag the repo via the generic tags endpoint (PATCH /tags/{org}/repo/{id}).\n\nIf multiple repos share the same name across different VCS providers and\nneither `id` nor `provider` is given, returns a 400 listing the providers to\nchoose from.", - "tags": ["Repos"], - "parameters": [ - { - "name": "repo_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Repo Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "provider", - "in": "query", - "required": false, - "description": "VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci). Required when multiple repos share the same name across providers.", - "schema": { - "anyOf": [ - { - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ], - "type": "string" - }, - {"type":"null"} - ], - "description": "VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci). Required when multiple repos share the same name across providers.", - "title": "Provider" - } - }, - { - "name": "id", - "in": "query", - "required": false, - "description": "The repo's internal id (returned as `id` in the repo response). If given, this unambiguously identifies the repo and 'provider' is ignored.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The repo's internal id (returned as `id` in the repo response). If given, this unambiguously identifies the repo and 'provider' is ignored.", - "title": "Id" - } - } - ], - "requestBody": null, - "searchText": "get a repo get a repo by name, or unambiguously by its internal `id`.\n\nreturns the repo's details, including its internal `id`, which is required to\ntag the repo via the generic tags endpoint (patch /tags/{org}/repo/{id}).\n\nif multiple repos share the same name across different vcs providers and\nneither `id` nor `provider` is given, returns a 400 listing the providers to\nchoose from. get repos org repo_name repos" - }, - { - "id": "get_repo_deployment_statistics", - "method": "GET", - "path": "/repos/{org}/{repo}/deployment-statistics", - "summary": "Deployment frequency and lead-time statistics for a repo", - "description": "Per-environment deployment-frequency and lead-time series for a repo,\nidentified by its internal `id` (the `{repo}` path segment).\n\nReturns one entry per non-logical environment the repo has been deployed to\n(respecting the env filter), each with its raw `deployed_at` and\n`lead_time_seconds` series plus the shared window bounds. Daily bucketing,\nmedian and percentiles are computed client-side.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", - "tags": ["Repos"], - "parameters": [ - { - "name": "repo", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Repo"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "env", - "in": "query", - "required": false, - "description": "Filter by environment name. Repeat to select several; omit for all environments the repo has been deployed to.", - "schema": { - "type": "array", - "items": {"type":"string"}, - "description": "Filter by environment name. Repeat to select several; omit for all environments the repo has been deployed to.", - "default": [], - "title": "Env" - } - }, - { - "name": "start_ts", - "in": "query", - "required": false, - "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", - "title": "Start Ts" - } - }, - { - "name": "end_ts", - "in": "query", - "required": false, - "description": "Include deployments at or before this timestamp. Defaults to now", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include deployments at or before this timestamp. Defaults to now", - "title": "End Ts" - } - } - ], - "requestBody": null, - "searchText": "deployment frequency and lead-time statistics for a repo per-environment deployment-frequency and lead-time series for a repo,\nidentified by its internal `id` (the `{repo}` path segment).\n\nreturns one entry per non-logical environment the repo has been deployed to\n(respecting the env filter), each with its raw `deployed_at` and\n`lead_time_seconds` series plus the shared window bounds. daily bucketing,\nmedian and percentiles are computed client-side.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get repos org repo deployment-statistics repos" - }, - { - "id": "get_repo_live_artifacts", - "method": "GET", - "path": "/repos/{org}/live-artifacts/{repo_name}", - "summary": "Get live artifacts for a repo", - "description": "Get the live status of artifacts from a repository across all environments.\n\nReturns a `RepoLiveStatusResponse` object that includes:\n- `_embedded.environments`: environments that currently have running artifacts from this repo\n- `_embedded.artifacts`: the corresponding artifacts for those environments\n- `live_artifacts`: a flattened view of currently running artifacts, including each artifact's\n compliance status, fingerprint, commit SHA, and start timestamp.\n\nRepo names are not unique within an org, so pass `id` to resolve an exact repo.\nOtherwise, if multiple repos share the same name across different VCS providers, use the\n`provider` parameter to disambiguate; without either, the most recently created match is used.", - "tags": ["Repos"], - "parameters": [ - { - "name": "repo_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Repo Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "provider", - "in": "query", - "required": false, - "description": "VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci). Required when multiple repos share the same name across providers.", - "schema": { - "anyOf": [ - { - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ], - "type": "string" - }, - {"type":"null"} - ], - "description": "VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci). Required when multiple repos share the same name across providers.", - "title": "Provider" - } - }, - { - "name": "id", - "in": "query", - "required": false, - "description": "The repo's internal id (returned as `id` in the repo response). If given, this unambiguously identifies the repo and 'provider' is ignored.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The repo's internal id (returned as `id` in the repo response). If given, this unambiguously identifies the repo and 'provider' is ignored.", - "title": "Id" - } - } - ], - "requestBody": null, - "searchText": "get live artifacts for a repo get the live status of artifacts from a repository across all environments.\n\nreturns a `repolivestatusresponse` object that includes:\n- `_embedded.environments`: environments that currently have running artifacts from this repo\n- `_embedded.artifacts`: the corresponding artifacts for those environments\n- `live_artifacts`: a flattened view of currently running artifacts, including each artifact's\n compliance status, fingerprint, commit sha, and start timestamp.\n\nrepo names are not unique within an org, so pass `id` to resolve an exact repo.\notherwise, if multiple repos share the same name across different vcs providers, use the\n`provider` parameter to disambiguate; without either, the most recently created match is used. get repos org live-artifacts repo_name repos" - }, - { - "id": "get_search", - "method": "GET", - "path": "/search/{org}/sha/{search_value}", - "summary": "Search artifacts by SHA or fingerprint", - "description": "Get artifacts that match fingerprint or commit-sha.", - "tags": ["Search"], - "parameters": [ - { - "name": "search_value", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Search Value"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "search artifacts by sha or fingerprint get artifacts that match fingerprint or commit-sha. get search org sha search_value search" - }, - { - "id": "get_service_account", - "method": "GET", - "path": "/service-accounts/{org}/{name}", - "summary": "Get a service account", - "description": "Get a single service account by name.", - "tags": ["Service Accounts"], - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "", - "schema": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "pattern": "^[a-zA-Z0-9\\-]+$", - "title": "Name" - } - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get a service account get a single service account by name. get service-accounts org name service accounts" - }, - { - "id": "get_service_account_api_key", - "method": "GET", - "path": "/service-accounts/{org}/{name}/api-keys/{key_id}", - "summary": "Get an API key for a service account", - "description": "Get a single active API key for a service account.", - "tags": ["Service Accounts"], - "parameters": [ - { - "name": "name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Name"} - }, - { - "name": "key_id", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Key Id"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get an api key for a service account get a single active api key for a service account. get service-accounts org name api-keys key_id service accounts" - }, - { - "id": "get_snapshot", - "method": "GET", - "path": "/snapshots/{org}/{env_name}/{snapshot_expression}", - "summary": "Get snapshot", - "description": "Get a snapshot for an environment.\n\n`snapshot_expression` can be specified as follows:\n- `N`: the Nth snapshot, counting from 1. Negative values count from the latest snapshot i.e. -1 is the latest snapshot.\n example: 42\n- `~N`: the Nth snapshot behind the latest, at the time of the request\n example: ~5\n- `@{YYYY-MM-DDTHH:MM:SS}`: the snapshot at specific moment in time in UTC\n example: @{2023-10-02T12:00:00}\n- `@{N..ago}`: the snapshot at a time relative to the time of the request. N is a positive integer.\n example: @{2.hours.ago}\n- `@{now}`: the snapshot at the time of the request\n example: @{now}", - "tags": ["Snapshots"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "snapshot_expression", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Snapshot Expression"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get snapshot get a snapshot for an environment.\n\n`snapshot_expression` can be specified as follows:\n- `n`: the nth snapshot, counting from 1. negative values count from the latest snapshot i.e. -1 is the latest snapshot.\n example: 42\n- `~n`: the nth snapshot behind the latest, at the time of the request\n example: ~5\n- `@{yyyy-mm-ddthh:mm:ss}`: the snapshot at specific moment in time in utc\n example: @{2023-10-02t12:00:00}\n- `@{n..ago}`: the snapshot at a time relative to the time of the request. n is a positive integer.\n example: @{2.hours.ago}\n- `@{now}`: the snapshot at the time of the request\n example: @{now} get snapshots org env_name snapshot_expression snapshots" - }, - { - "id": "get_trail", - "method": "GET", - "path": "/trails/{org}/{flow_name}/{trail_name}", - "summary": "Get trail", - "description": "Get a Trail for a Flow in an organization.", - "tags": ["Trails"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get trail get a trail for a flow in an organization. get trails org flow_name trail_name trails" - }, - { - "id": "get_trail_attestation", - "method": "GET", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/{attestation_name}", - "summary": "Get trail attestation", - "description": "", - "tags": ["Attestation"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, - { - "name": "attestation_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Attestation Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "get trail attestation get attestations org flow_name trail trail_name attestation_name attestation" - }, - { - "id": "get_user_default_org", - "method": "GET", - "path": "/user/default-org", - "summary": "Get default organization", - "description": "Get the default org for the current user.", - "tags": ["User"], - "parameters": [], - "requestBody": null, - "searchText": "get default organization get the default org for the current user. get user default-org user" - }, - { - "id": "join_physical_to_logical", - "method": "PUT", - "path": "/environments/{org}/{env_name}/join", - "summary": "Add environment to logical environment", - "description": "Join the given physical environment to this Logical environment", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "physical_env_name": { - "type": "string", - "title": "Physical Env Name", - "description": "Physical environment name" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["physical_env_name"], - "title": "JoinPhysicalToLogicalPutInput" - } - } - ], - "searchText": "add environment to logical environment join the given physical environment to this logical environment put environments org env_name join environments" - }, - { - "id": "k8s_report", - "method": "PUT", - "path": "/environments/{org}/{env_name}/report/K8S", - "summary": "Report K8S environment", - "description": "Process a report for a K8S environment.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "type": { - "type": "string", - "const": "K8S", - "title": "Type", - "description": "Environment type", - "default": "K8S" - }, - "artifacts": { - "items": { - "properties": { - "podName": {"type":"string","title":"Podname","description":"Name of pod"}, - "namespace": { - "type": "string", - "title": "Namespace", - "description": "Namespace of cluster" - }, - "digests": { - "additionalProperties": {"type":"string","pattern":"^[a-f0-9]{64}$"}, - "type": "object", - "title": "Digests", - "description": "Image name to sha256 fingerprint mapping" - }, - "creationTimestamp": { - "type": "integer", - "title": "Creationtimestamp", - "description": "Creation time stamp for the pod in UTC" - }, - "owners": { - "anyOf": [ - { - "items": { - "properties": { - "apiVersion": { - "type": "string", - "title": "Apiversion", - "description": "API version of the owner" - }, - "kind": { - "type": "string", - "title": "Kind", - "description": "Kind of the owner" - }, - "name": { - "type": "string", - "title": "Name", - "description": "Name of the owner" - }, - "uid": { - "type": "string", - "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", - "title": "Uid", - "description": "UID of the owner" - }, - "controller": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Controller", - "description": "Whether the owner is a controller" - }, - "blockOwnerDeletion": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Blockownerdeletion", - "description": "Whether to block owner deletion" - } - }, - "additionalProperties": true, - "type": "object", - "required": ["apiVersion","kind","name","uid"], - "title": "K8SOwner", - "description": "Owner reference for a K8S pod" - }, - "type": "array" - }, - {"type":"null"} - ], - "title": "Owners", - "description": "Owner references for the pod" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["podName","namespace","digests","creationTimestamp"], - "title": "K8SArtifact", - "description": "Individual artifact (pod) in a K8S report" - }, - "type": "array", - "title": "Artifacts", - "description": "all artifacts in the report" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["artifacts"], - "title": "K8SReport", - "description": "K8S report containing pod artifacts", - "examples": [ - { - "artifacts": [ - { - "creationTimestamp": 1632122962, - "digests": { - "acme/hadroncollider:1.1.1": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" - }, - "namespace": "default", - "podName": "my-pod-abc123" - } - ] - } - ] - } - } - ], - "searchText": "report k8s environment process a report for a k8s environment. put environments org env_name report k8s environments" - }, - { - "id": "lambda_report", - "method": "PUT", - "path": "/environments/{org}/{env_name}/report/lambda", - "summary": "Report Lambda environment", - "description": "Process a report for a Lambda environment.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "type": { - "type": "string", - "const": "lambda", - "title": "Type", - "description": "Environment type", - "default": "lambda" - }, - "artifacts": { - "items": { - "properties": { - "digests": { - "additionalProperties": {"type":"string","pattern":"^[a-f0-9]{64}$"}, - "type": "object", - "title": "Digests", - "description": "Function name to sha256 fingerprint mapping" - }, - "creationTimestamp": { - "type": "integer", - "title": "Creationtimestamp", - "description": "Creation time stamp for the function in UTC" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["digests","creationTimestamp"], - "title": "LambdaArtifact", - "description": "Individual artifact in a Lambda report" - }, - "type": "array", - "title": "Artifacts", - "description": "all artifacts in the report" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["artifacts"], - "title": "LambdaReport", - "description": "Lambda report containing artifacts", - "examples": [ - { - "artifacts": [ - { - "creationTimestamp": 1632122962, - "digests": { - "my-lambda-function": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" - } - } - ] - } - ] - } - } - ], - "searchText": "report lambda environment process a report for a lambda environment. put environments org env_name report lambda environments" - }, - { - "id": "list_actions", - "method": "GET", - "path": "/actions/{org}", - "summary": "List actions", - "description": "List actions for an org.", - "tags": ["Actions"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "list actions list actions for an org. get actions org actions" - }, - { - "id": "list_allowlist", - "method": "GET", - "path": "/allowlists/{org}", - "summary": "List allowlist", - "description": "List Allowlist records in an organization.", - "tags": ["Allowlists"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "list allowlist list allowlist records in an organization. get allowlists org allowlists" - }, - { - "id": "list_artifacts", - "method": "GET", - "path": "/artifacts/{org}", - "summary": "List artifacts", - "description": "List artifacts in organization. Can be filtered by flow name or repo name.\n\n- The result is paginated.\n- The list of artifacts is sorted by creation time in descending order.", - "tags": ["Artifacts"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "flow_name", - "in": "query", - "required": false, - "description": "The name of the flow to list artifacts from", - "schema": { - "anyOf": [{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$"},{"type":"null"}], - "description": "The name of the flow to list artifacts from", - "title": "Flow Name" - } - }, - { - "name": "repo_name", - "in": "query", - "required": false, - "description": "The name of the repo to list artifacts from", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The name of the repo to list artifacts from", - "title": "Repo Name" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "The page number of response", - "schema": { - "type": "integer", - "description": "The page number of response", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "How many artifacts to return per page of response", - "schema": { - "type": "integer", - "description": "How many artifacts to return per page of response", - "default": 15, - "title": "Per Page" - } - } - ], - "requestBody": null, - "searchText": "list artifacts list artifacts in organization. can be filtered by flow name or repo name.\n\n- the result is paginated.\n- the list of artifacts is sorted by creation time in descending order. get artifacts org artifacts" - }, - { - "id": "list_attestations_for_criteria", - "method": "GET", - "path": "/attestations/{org}/list_attestations_for_criteria", - "summary": "List attestations for criteria", - "description": "List attestations matching a search criteria within an organization.\n\nThis endpoint returns a dictionary mapping commit SHAs to lists of attestations.\nEach attestation contains metadata about compliance, timing, and type-specific data.\n\n`commit_list` is required; it scopes the search to a specific set of commits.\n`attestation_type`, `attestation_name`, and `flow_name` further narrow results\nwithin that commit set but cannot be used on their own.\n\n## Usage Examples\n\n### Get all attestations for a list of commits\n```\nGET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6\n```\n\n### Narrow by flow and attestation type\n```\nGET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&flow_name=production-flow&attestation_type=snyk\n```\n\n### Narrow by attestation name\n```\nGET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_name=manual-test\n```\n\n### Narrow by custom attestation type\n```\nGET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_type=custom:security-scan\n```", - "tags": ["Attestation"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "flow_name", - "in": "query", - "required": false, - "description": "The flow name to search for attestations in", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The flow name to search for attestations in", - "title": "Flow Name" - } - }, - { - "name": "commit_list", - "in": "query", - "required": false, - "description": "The commit list that the attestations are associated with", - "schema": { - "anyOf": [ - {"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{40}$"}}, - {"type":"null"} - ], - "description": "The commit list that the attestations are associated with", - "title": "Commit List" - } - }, - { - "name": "attestation_name", - "in": "query", - "required": false, - "description": "The attestation name to search for", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The attestation name to search for", - "title": "Attestation Name" - } - }, - { - "name": "attestation_id", - "in": "query", - "required": false, - "description": "The attestation ID to search for. Not yet supported on this endpoint — currently ignored.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The attestation ID to search for. Not yet supported on this endpoint — currently ignored.", - "title": "Attestation Id" - } - }, - { - "name": "attestation_type", - "in": "query", - "required": false, - "description": "The attestation type to search for. Use built-in types (e.g., 'junit') or 'custom:' for custom types.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The attestation type to search for. Use built-in types (e.g., 'junit') or 'custom:' for custom types.", - "title": "Attestation Type" - } - } - ], - "requestBody": null, - "searchText": "list attestations for criteria list attestations matching a search criteria within an organization.\n\nthis endpoint returns a dictionary mapping commit shas to lists of attestations.\neach attestation contains metadata about compliance, timing, and type-specific data.\n\n`commit_list` is required; it scopes the search to a specific set of commits.\n`attestation_type`, `attestation_name`, and `flow_name` further narrow results\nwithin that commit set but cannot be used on their own.\n\n## usage examples\n\n### get all attestations for a list of commits\n```\nget /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6\n```\n\n### narrow by flow and attestation type\n```\nget /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&flow_name=production-flow&attestation_type=snyk\n```\n\n### narrow by attestation name\n```\nget /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_name=manual-test\n```\n\n### narrow by custom attestation type\n```\nget /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_type=custom:security-scan\n``` get attestations org list_attestations_for_criteria attestation" - }, - { - "id": "list_audit_log", - "method": "GET", - "path": "/membership-audit-log/{org}", - "summary": "List membership/role change history for an org", - "description": "", - "tags": ["Audit Log"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of events per page", - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Number of events per page", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "search", - "in": "query", - "required": false, - "description": "Filter by affected user or actor (name substring)", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by affected user or actor (name substring)", - "title": "Search" - } - }, - { - "name": "event_type", - "in": "query", - "required": false, - "description": "Filter by event type: added, changed, or removed", - "schema": { - "anyOf": [ - {"type":"string","enum":["added","changed","removed"],"title":"AuditEventType"}, - {"type":"null"} - ], - "description": "Filter by event type: added, changed, or removed", - "title": "Event Type" - } - }, - { - "name": "role", - "in": "query", - "required": false, - "description": "Filter by new role. Can be repeated.", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by new role. Can be repeated.", - "title": "Role" - } - }, - { - "name": "source", - "in": "query", - "required": false, - "description": "Filter by source (app/scim/invitation/script). Repeatable.", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by source (app/scim/invitation/script). Repeatable.", - "title": "Source" - } - }, - { - "name": "from_timestamp", - "in": "query", - "required": false, - "description": "Only events at or after this unix timestamp", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Only events at or after this unix timestamp", - "title": "From Timestamp" - } - }, - { - "name": "to_timestamp", - "in": "query", - "required": false, - "description": "Only events at or before this unix timestamp", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Only events at or before this unix timestamp", - "title": "To Timestamp" - } - }, - { - "name": "sort_by", - "in": "query", - "required": false, - "description": "Column to sort by", - "schema": { - "type": "string", - "enum": ["when","user","role","changed_by","source"], - "title": "AuditSortBy", - "description": "Column to sort by", - "default": "when" - } - }, - { - "name": "sort_dir", - "in": "query", - "required": false, - "description": "Sort direction", - "schema": { - "type": "string", - "enum": ["asc","desc"], - "title": "SortDir", - "description": "Sort direction", - "default": "desc" - } - } - ], - "requestBody": null, - "searchText": "list membership/role change history for an org get membership-audit-log org audit log" - }, - { - "id": "list_builds", - "method": "GET", - "path": "/builds/{org}", - "summary": "List Builds", - "description": "List builds for an organization.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", - "tags": ["Builds"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of builds per page", - "schema": { - "type": "integer", - "maximum": 50, - "minimum": 0, - "description": "Number of builds per page", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "repo_id", - "in": "query", - "required": false, - "description": "Filter by external VCS repo ID", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by external VCS repo ID", - "title": "Repo Id" - } - }, - { - "name": "repo_name", - "in": "query", - "required": false, - "description": "Filter by repo name (e.g. 'cyber-dojo/differ')", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by repo name (e.g. 'cyber-dojo/differ')", - "title": "Repo Name" - } - }, - { - "name": "repo_inner_id", - "in": "query", - "required": false, - "description": "Filter by the repo's internal id (the `id` in the repo response). The stable identifier: unaffected by repo renames or a missing external VCS id.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by the repo's internal id (the `id` in the repo response). The stable identifier: unaffected by repo renames or a missing external VCS id.", - "title": "Repo Inner Id" - } - }, - { - "name": "start_ts", - "in": "query", - "required": false, - "description": "Include builds created at or after this timestamp. Defaults to 28 days before end_ts", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include builds created at or after this timestamp. Defaults to 28 days before end_ts", - "title": "Start Ts" - } - }, - { - "name": "end_ts", - "in": "query", - "required": false, - "description": "Include builds created at or before this timestamp. Defaults to now", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include builds created at or before this timestamp. Defaults to now", - "title": "End Ts" - } - } - ], - "requestBody": null, - "searchText": "list builds list builds for an organization.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get builds org builds" - }, - { - "id": "list_control_decisions", - "method": "GET", - "path": "/controls/{org}/{identifier}/decisions", - "summary": "List decisions for a control", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], - "parameters": [ - { - "name": "identifier", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Identifier"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of decisions per page", - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Number of decisions per page", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "is_compliant", - "in": "query", - "required": false, - "description": "Filter by compliance status", - "schema": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "description": "Filter by compliance status", - "title": "Is Compliant" - } - }, - { - "name": "from_timestamp", - "in": "query", - "required": false, - "description": "Filter decisions recorded at or after this Unix timestamp", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Filter decisions recorded at or after this Unix timestamp", - "title": "From Timestamp" - } - }, - { - "name": "to_timestamp", - "in": "query", - "required": false, - "description": "Filter decisions recorded at or before this Unix timestamp", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Filter decisions recorded at or before this Unix timestamp", - "title": "To Timestamp" - } - }, - { - "name": "flow_id", - "in": "query", - "required": false, - "description": "Filter decisions to these flows. Can be repeated, e.g. flow_id=&flow_id=", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter decisions to these flows. Can be repeated, e.g. flow_id=&flow_id=", - "title": "Flow Id" - } - }, - { - "name": "sort_direction", - "in": "query", - "required": false, - "description": "Sort by decision time: desc (newest first) or asc (oldest first)", - "schema": { - "type": "string", - "enum": ["asc","desc"], - "title": "SortDirection", - "description": "Sort by decision time: desc (newest first) or asc (oldest first)", - "default": "desc" - } - } - ], - "requestBody": null, - "searchText": "list decisions for a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier decisions controls" - }, - { - "id": "list_control_tag_choices", - "method": "GET", - "path": "/controls/{org}/tags", - "summary": "List distinct tag key/value pairs for an org's controls", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "list distinct tag key/value pairs for an org's controls **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org tags controls" - }, - { - "id": "list_control_versions", - "method": "GET", - "path": "/controls/{org}/{identifier}/versions", - "summary": "List versions of a control", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], - "parameters": [ - { - "name": "identifier", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Identifier"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of versions per page", - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Number of versions per page", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "sort_direction", - "in": "query", - "required": false, - "description": "Sort direction by version number", - "schema": { - "type": "string", - "enum": ["asc","desc"], - "title": "SortDirection", - "description": "Sort direction by version number", - "default": "desc" - } - } - ], - "requestBody": null, - "searchText": "list versions of a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier versions controls" - }, - { - "id": "list_controls", - "method": "GET", - "path": "/controls/{org}", - "summary": "List controls", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of controls per page", - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Number of controls per page", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "sort_direction", - "in": "query", - "required": false, - "description": "Sort direction", - "schema": { - "type": "string", - "enum": ["asc","desc"], - "title": "SortDirection", - "description": "Sort direction", - "default": "asc" - } - }, - { - "name": "search", - "in": "query", - "required": false, - "description": "Filter by name or identifier (case-insensitive substring match on either field)", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by name or identifier (case-insensitive substring match on either field)", - "title": "Search" - } - }, - { - "name": "tag", - "in": "query", - "required": false, - "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=framework or tag=framework:finos-sdlc", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=framework or tag=framework:finos-sdlc", - "title": "Tag" - } - }, - { - "name": "archived", - "in": "query", - "required": false, - "description": "Return archived controls when true", - "schema": { - "type": "boolean", - "description": "Return archived controls when true", - "default": false, - "title": "Archived" - } - } - ], - "requestBody": null, - "searchText": "list controls **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org controls" - }, - { - "id": "list_deployments", - "method": "GET", - "path": "/deployments/{org}", - "summary": "List Deployments", - "description": "List deployments for an organization.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", - "tags": ["Deployments"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of deployments per page", - "schema": { - "type": "integer", - "maximum": 50, - "minimum": 0, - "description": "Number of deployments per page", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "repo_name", - "in": "query", - "required": false, - "description": "Filter by repo name (e.g. 'kosli-dev/server')", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by repo name (e.g. 'kosli-dev/server')", - "title": "Repo Name" - } - }, - { - "name": "env_name", - "in": "query", - "required": false, - "description": "Filter by environment name", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by environment name", - "title": "Env Name" - } - }, - { - "name": "start_ts", - "in": "query", - "required": false, - "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", - "title": "Start Ts" - } - }, - { - "name": "end_ts", - "in": "query", - "required": false, - "description": "Include deployments at or before this timestamp. Defaults to now", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include deployments at or before this timestamp. Defaults to now", - "title": "End Ts" - } - } - ], - "requestBody": null, - "searchText": "list deployments list deployments for an organization.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get deployments org deployments" - }, - { - "id": "list_env_deployments", - "method": "GET", - "path": "/environments/{org}/{env_name}/deployments", - "summary": "List deployments for an environment", - "description": "List deployments for a single environment within a time range, newest first.", - "tags": ["Environments"], - "parameters": [ - { - "name": "env_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Env Name"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "from", - "in": "query", - "required": false, - "description": "Start of time range, ISO-8601 (Default: 30 days ago)", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Start of time range, ISO-8601 (Default: 30 days ago)", - "title": "From" - } - }, - { - "name": "to", - "in": "query", - "required": false, - "description": "End of time range, ISO-8601 (Default: now)", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "End of time range, ISO-8601 (Default: now)", - "title": "To" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "page_size", - "in": "query", - "required": false, - "description": "Deployments per page", - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Deployments per page", - "default": 50, - "title": "Page Size" - } - } - ], - "requestBody": null, - "searchText": "list deployments for an environment list deployments for a single environment within a time range, newest first. get environments org env_name deployments environments" - }, - { - "id": "list_envs", - "method": "GET", - "path": "/environments/{org}", - "summary": "List environments", - "description": "List environments of an organization.", - "tags": ["Environments"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], - "description": "Page number", - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of environments per page", - "schema": { - "anyOf": [{"type":"integer","maximum":50,"minimum":1},{"type":"null"}], - "description": "Number of environments per page", - "title": "Per Page" - } - }, - { - "name": "sort", - "in": "query", - "required": false, - "description": "Sort field", - "schema": { - "type": "string", - "enum": ["name","last_modified_at","last_changed_at"], - "title": "EnvironmentSortField", - "description": "Sort field", - "default": "name" - } - }, - { - "name": "sort_direction", - "in": "query", - "required": false, - "description": "Sort direction", - "schema": { - "type": "string", - "enum": ["asc","desc"], - "title": "SortDirection", - "description": "Sort direction", - "default": "asc" - } - }, - { - "name": "space_id", - "in": "query", - "required": false, - "description": "Filter by space ID. Can be repeated for OR semantics, e.g. space_id=a&space_id=b", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by space ID. Can be repeated for OR semantics, e.g. space_id=a&space_id=b", - "title": "Space Id" - } - }, - { - "name": "name", - "in": "query", - "required": false, - "description": "Filter by name (case-insensitive substring match)", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by name (case-insensitive substring match)", - "title": "Name" - } - }, - { - "name": "type", - "in": "query", - "required": false, - "description": "Filter by environment type. Can be repeated, e.g. type=K8S&type=ECS", - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "string", - "enum": [ - "K8S", - "ECS", - "S3", - "lambda", - "server", - "docker", - "azure-apps", - "cloud-run", - "logical" - ], - "title": "EnvironmentTypeFilter" - } - }, - {"type":"null"} - ], - "description": "Filter by environment type. Can be repeated, e.g. type=K8S&type=ECS", - "title": "Type" - } - }, - { - "name": "tag", - "in": "query", - "required": false, - "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:platform", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:platform", - "title": "Tag" - } - } - ], - "requestBody": null, - "searchText": "list environments list environments of an organization. get environments org environments" - }, - { - "id": "list_policies", - "method": "GET", - "path": "/policies/{org}", - "summary": "List policies", - "description": "List Policies in an organization.", - "tags": ["Policies"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "list policies list policies in an organization. get policies org policies" - }, - { - "id": "list_repo_deployments", - "method": "GET", - "path": "/repos/{org}/{repo}/deployments", - "summary": "List deployments for a repo", - "description": "List deployments for a repo, identified by its internal `id` (the `{repo}`\npath segment), newest first.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", - "tags": ["Repos"], - "parameters": [ - { - "name": "repo", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Repo"} - }, - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of deployments per page", - "schema": { - "type": "integer", - "maximum": 50, - "minimum": 0, - "description": "Number of deployments per page", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "env", - "in": "query", - "required": false, - "description": "Filter by environment name. Repeat to select several; omit for all environments the repo has been deployed to.", - "schema": { - "type": "array", - "items": {"type":"string"}, - "description": "Filter by environment name. Repeat to select several; omit for all environments the repo has been deployed to.", - "default": [], - "title": "Env" - } - }, - { - "name": "start_ts", - "in": "query", - "required": false, - "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", - "title": "Start Ts" - } - }, - { - "name": "end_ts", - "in": "query", - "required": false, - "description": "Include deployments at or before this timestamp. Defaults to now", - "schema": { - "anyOf": [{"type":"number"},{"type":"null"}], - "description": "Include deployments at or before this timestamp. Defaults to now", - "title": "End Ts" - } - } - ], - "requestBody": null, - "searchText": "list deployments for a repo list deployments for a repo, identified by its internal `id` (the `{repo}`\npath segment), newest first.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get repos org repo deployments repos" - }, - { - "id": "list_repo_filter_options", - "method": "GET", - "path": "/repos/{org}/filter-options", - "summary": "List repo filter options", - "description": "List the distinct facet values (providers, VCS instances, and namespace\nvalues) across the organization's repos, scoped by the given filters.\n\nUsed to populate the repos faceted filters. Each facet reflects every\nfilter except its own dimension, so alternative values stay visible (e.g.\nthe returned `providers` list isn't narrowed by the `provider` filter\nitself). `namespace_values` cascades: it returns the values one level below\n`namespace`, so drilling into a namespace reveals the next level.\n\nDeclared before the \"/{org}/{repo_name}\" route so the literal\n\"filter-options\" segment is not captured as a repo name.", - "tags": ["Repos"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "provider", - "in": "query", - "required": false, - "description": "Scope to repos with this VCS provider.", - "schema": { - "anyOf": [ - { - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ], - "type": "string" - }, - {"type":"null"} - ], - "description": "Scope to repos with this VCS provider.", - "title": "Provider" - } - }, - { - "name": "vcs_instance", - "in": "query", - "required": false, - "description": "Scope to repos with this VCS instance/host.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Scope to repos with this VCS instance/host.", - "title": "Vcs Instance" - } - }, - { - "name": "namespace", - "in": "query", - "required": false, - "description": "Scope to repos nested under this '/'-separated namespace prefix, e.g. platform/backend. The returned namespace_values are the distinct values one level below this prefix.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Scope to repos nested under this '/'-separated namespace prefix, e.g. platform/backend. The returned namespace_values are the distinct values one level below this prefix.", - "title": "Namespace" - } - }, - { - "name": "tag", - "in": "query", - "required": false, - "description": "Scope to repos matching this tag key or key:value. Can be repeated.", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Scope to repos matching this tag key or key:value. Can be repeated.", - "title": "Tag" - } - } - ], - "requestBody": null, - "searchText": "list repo filter options list the distinct facet values (providers, vcs instances, and namespace\nvalues) across the organization's repos, scoped by the given filters.\n\nused to populate the repos faceted filters. each facet reflects every\nfilter except its own dimension, so alternative values stay visible (e.g.\nthe returned `providers` list isn't narrowed by the `provider` filter\nitself). `namespace_values` cascades: it returns the values one level below\n`namespace`, so drilling into a namespace reveals the next level.\n\ndeclared before the \"/{org}/{repo_name}\" route so the literal\n\"filter-options\" segment is not captured as a repo name. get repos org filter-options repos" - }, - { - "id": "list_repo_tag_choices", - "method": "GET", - "path": "/repos/{org}/tags", - "summary": "List repo tag choices", - "description": "List the distinct tag key/value pairs across the organization's repos.\n\nUsed to populate the repos tag filter. Declared before the \"/{org}/{repo_name}\"\nroute so the literal \"tags\" segment is not captured as a repo name.", - "tags": ["Repos"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "list repo tag choices list the distinct tag key/value pairs across the organization's repos.\n\nused to populate the repos tag filter. declared before the \"/{org}/{repo_name}\"\nroute so the literal \"tags\" segment is not captured as a repo name. get repos org tags repos" - }, - { - "id": "list_repos", - "method": "GET", - "path": "/repos/{org}", - "summary": "List repos", - "description": "List repos for an organization.\n\nRepos are paginated.\n- The response includes pagination information and the list of repos.\n- The list of repos is sorted by the repo name; sort_direction selects the\n direction (asc = A–Z, the default; desc = Z–A).\n- Optional filters: name (exact match), search (case-insensitive substring\n match on the name), provider (VCS provider), repo_id (external repo ID),\n vcs_instance (VCS host, exact match), namespace (namespace prefix), and\n tag (key or key:value, repeatable).\n- name and search are mutually exclusive; providing both returns a 400.\n- repo_id is the stronger identifier as names of repos can change. So if repo_id is provided, name is ignored.\n\nRepos are captured when attestations include a reference to a repo.\nThis happens automatically when using Kosli CLI v2.11.35 or higher.", - "tags": ["Repos"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page number", - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of repos per page", - "schema": { - "type": "integer", - "maximum": 50, - "minimum": 1, - "description": "Number of repos per page", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "name", - "in": "query", - "required": false, - "description": "Filter by repo name (exact match). This is ignored if repo_id is provided. Returns empty list if no match. Mutually exclusive with search.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by repo name (exact match). This is ignored if repo_id is provided. Returns empty list if no match. Mutually exclusive with search.", - "title": "Name" - } - }, - { - "name": "search", - "in": "query", - "required": false, - "description": "Filter by repo name (case-insensitive substring match). Mutually exclusive with name.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by repo name (case-insensitive substring match). Mutually exclusive with name.", - "title": "Search" - } - }, - { - "name": "provider", - "in": "query", - "required": false, - "description": "Filter by VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci).", - "schema": { - "anyOf": [ - { - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ], - "type": "string" - }, - {"type":"null"} - ], - "description": "Filter by VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci).", - "title": "Provider" - } - }, - { - "name": "repo_id", - "in": "query", - "required": false, - "description": "Filter by external repo ID (exact match). Returns empty list if no match.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by external repo ID (exact match). Returns empty list if no match.", - "title": "Repo Id" - } - }, - { - "name": "vcs_instance", - "in": "query", - "required": false, - "description": "Filter by VCS instance/host (exact match), e.g. gitlab.company.com.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by VCS instance/host (exact match), e.g. gitlab.company.com.", - "title": "Vcs Instance" - } - }, - { - "name": "namespace", - "in": "query", - "required": false, - "description": "Filter by namespace prefix, as a '/'-separated path, e.g. platform/backend. Matches repos nested anywhere under that path.", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter by namespace prefix, as a '/'-separated path, e.g. platform/backend. Matches repos nested anywhere under that path.", - "title": "Namespace" - } - }, - { - "name": "sort_direction", - "in": "query", - "required": false, - "description": "Sort direction by repo name: asc (A–Z, default) or desc (Z–A).", - "schema": { - "type": "string", - "enum": ["asc","desc"], - "title": "SortDirection", - "description": "Sort direction by repo name: asc (A–Z, default) or desc (Z–A).", - "default": "asc" - } - }, - { - "name": "tag", - "in": "query", - "required": false, - "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:security.", - "schema": { - "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], - "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:security.", - "title": "Tag" + "repo_info": { + "anyOf": [ + { + "properties": { + "name": {"type":"string","title":"Name"}, + "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, + "url": {"type":"string","title":"Url"}, + "description": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Description" + }, + "provider": { + "anyOf": [ + { + "type": "string", + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ] + }, + {"type":"null"} + ], + "title": "Provider" + }, + "namespace_path": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Namespace Path" + }, + "additional_info": { + "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], + "title": "Additional Info" + } + }, + "type": "object", + "required": ["name","url"], + "title": "RepoInfoPostInput" + }, + {"type":"null"} + ] + }, + "external_urls": { + "anyOf": [ + { + "patternProperties": { + "^[^=.]+$": { + "properties": { + "href": {"type":"string","title":"Href"}, + "fingerprint": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{64}$"}, + {"type":"null"} + ], + "title": "Fingerprint" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["href"], + "title": "ExternalAttachmentUrl" + } + }, + "type": "object" + }, + {"type":"null"} + ], + "title": "External Urls" + }, + "annotations": { + "anyOf": [ + {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, + {"type":"null"} + ], + "title": "Annotations" + }, + "user_data": { + "anyOf": [ + {"additionalProperties":true,"type":"object"}, + {"items":{},"type":"array"}, + {"type":"null"} + ], + "title": "User Data" + }, + "git_provider": { + "type": "string", + "enum": ["github","gitlab","bitbucket","azure"], + "title": "Git Provider" + }, + "pull_requests": { + "anyOf": [ + { + "items": { + "properties": { + "url": {"type":"string","title":"Url"}, + "state": {"type":"string","title":"State"}, + "merge_commit": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{40}$"}, + {"type":"string","const":""} + ], + "title": "Merge Commit" + }, + "approvers": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Approvers" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["url","state","merge_commit"], + "title": "FoundPullRequestV1" + }, + "type": "array" + }, + { + "items": { + "properties": { + "url": {"type":"string","title":"Url"}, + "state": {"type":"string","title":"State"}, + "author": {"type":"string","title":"Author"}, + "title": {"type":"string","title":"Title"}, + "created_at": {"type":"number","title":"Created At"}, + "merged_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Merged At" + }, + "head_ref": {"type":"string","title":"Head Ref"}, + "base_ref": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Base Ref" + }, + "merge_commit": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}], + "title": "Merge Commit" + }, + "approvers": { + "anyOf": [ + { + "items": { + "properties": { + "username": {"type":"string","title":"Username"}, + "state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "State" + }, + "timestamp": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Timestamp" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["username"], + "title": "PullRequestApprover" + }, + "type": "array" + }, + {"type":"null"} + ], + "title": "Approvers" + }, + "commits": { + "items": { + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Message" + }, + "author": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author" + }, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" + }, + "branch": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Branch" + }, + "timestamp": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Timestamp" + }, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [ + {"items":{"type":"string"},"type":"array"}, + {"type":"null"} + ], + "title": "Parents" + }, + "verified": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Verified" + }, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } + }, + "type": "object", + "required": ["sha1"], + "title": "GitCommit" + }, + "type": "array", + "title": "Commits" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "url", + "state", + "author", + "title", + "created_at", + "head_ref", + "commits" + ], + "title": "FoundPullRequestV2" + }, + "type": "array" + } + ], + "title": "Pull Requests" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["attestation_name","git_provider","pull_requests"], + "title": "PullRequestAttestationPostInput", + "examples": [ + { + "attestation_name": "pr", + "git_commit_info": { + "author": "Jon Smith ", + "branch": "main", + "message": "adding glorious commit", + "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", + "timestamp": 1750923680, + "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" + }, + "git_provider": "github", + "pull_requests": [ + { + "approvers": [{"author":"Jon Doe","state":"APPROVED","timestamp":1750923266}], + "author": "JonSmith", + "commits": [ + { + "author": "Jon Smith ", + "author_username": "JonSmith", + "branch": "glorious-branch", + "message": "Add glorious feature", + "sha": "f387a894992f7991489680696abf8b72bf7875f1", + "timestamp": 1750851568, + "url": "https://github.com/org/repo/commit/f387a894992f7991489680696abf8b72bf7875f1" + }, + { + "author": "Jon Smith ", + "author_username": "JonSmith", + "branch": "glorious-branch", + "message": "Update glorious feature", + "sha": "2d48854228633cca94f7f4a587b2172ebb01cf85", + "timestamp": 1750922905 + } + ], + "created_at": 1750851601, + "head_ref": "glorious-branch", + "merge_commit": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", + "merged_at": 1750923680, + "state": "MERGED", + "title": "Add glorious commit", + "url": "https://github.com/org/repo/pull/3497" + } + ], + "user_data": {} + } + ], + "description": "Attestation data in JSON format" + }, + "attachment_file": { + "anyOf": [ + {"type":"string","contentMediaType":"application/octet-stream"}, + {"type":"null"} + ], + "title": "Attachment File", + "description": "Optional attachment file (max size: 10MB)" + } + }, + "type": "object", + "required": ["data_json"], + "title": "Body_attest_pull_request" } } ], - "requestBody": null, - "searchText": "list repos list repos for an organization.\n\nrepos are paginated.\n- the response includes pagination information and the list of repos.\n- the list of repos is sorted by the repo name; sort_direction selects the\n direction (asc = a–z, the default; desc = z–a).\n- optional filters: name (exact match), search (case-insensitive substring\n match on the name), provider (vcs provider), repo_id (external repo id),\n vcs_instance (vcs host, exact match), namespace (namespace prefix), and\n tag (key or key:value, repeatable).\n- name and search are mutually exclusive; providing both returns a 400.\n- repo_id is the stronger identifier as names of repos can change. so if repo_id is provided, name is ignored.\n\nrepos are captured when attestations include a reference to a repo.\nthis happens automatically when using kosli cli v2.11.35 or higher. get repos org repos" + "searchText": "attest pull request add pull-request attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name pull_request attestation" }, { - "id": "list_service_account_api_keys", - "method": "GET", - "path": "/service-accounts/{org}/{name}/api-keys", - "summary": "List API keys for a service account", - "description": "List all active API keys for a service account.", - "tags": ["Service Accounts"], + "id": "attest_snyk", + "method": "POST", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/snyk", + "summary": "Attest Snyk scan", + "description": "Add Snyk attestation to a trail with an optional attachment file.", + "tags": ["Attestation"], "parameters": [ { - "name": "name", + "name": "flow_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Name"} + "schema": {"type":"string","title":"Flow Name"} }, { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "list api keys for a service account list all active api keys for a service account. get service-accounts org name api-keys service accounts" - }, - { - "id": "list_service_accounts", - "method": "GET", - "path": "/service-accounts/{org}", - "summary": "List service accounts in an organization", - "description": "List all service accounts in the organization.", - "tags": ["Service Accounts"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": null, - "searchText": "list service accounts in an organization list all service accounts in the organization. get service-accounts org service accounts" - }, - { - "id": "list_snapshots", - "method": "GET", - "path": "/snapshots/{org}/{env_name}", - "summary": "List snapshots", - "description": "Get list of snapshots for an environment.", - "tags": ["Snapshots"], - "parameters": [ - { - "name": "env_name", + "name": "trail_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Env Name"} + "schema": {"type":"string","title":"Trail Name"} }, { "name": "org", @@ -5405,220 +1751,388 @@ "required": true, "description": "", "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "The page number of response", - "schema": { - "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], - "description": "The page number of response", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "How many results to return per page of response", - "schema": { - "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], - "description": "How many results to return per page of response", - "default": 15, - "title": "Per Page" - } - }, - { - "name": "interval", - "in": "query", - "required": false, - "description": "Expression to specify the interval of snapshots to query.\nMust be two snapshot expressions separated by '..'\nie: '5..10', or '~5..NOW", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Expression to specify the interval of snapshots to query.\nMust be two snapshot expressions separated by '..'\nie: '5..10', or '~5..NOW", - "default": "1..NOW", - "title": "Interval" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "description": "Return results in reverse order. Expected values: True or False. Defaults to False.", - "schema": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "description": "Return results in reverse order. Expected values: True or False. Defaults to False.", - "default": false, - "title": "Reverse" - } } ], - "requestBody": null, - "searchText": "list snapshots get list of snapshots for an environment. get snapshots org env_name snapshots" - }, - { - "id": "list_system_attestation_types", - "method": "GET", - "path": "/attestations/system-attestation-types", - "summary": "List system attestation types", - "description": "List all registered system attestation types with their per-version attestation_data schemas.", - "tags": ["Attestation"], - "parameters": [], - "requestBody": null, - "searchText": "list system attestation types list all registered system attestation types with their per-version attestation_data schemas. get attestations system-attestation-types attestation" - }, - { - "id": "list_trails", - "method": "GET", - "path": "/trails/{org}/{flow_name}", - "summary": "List trails", - "description": "List Trails of a Flow.", - "tags": ["Trails"], - "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, + "requestBody": [ { - "name": "org", - "in": "path", + "name": "body", "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "The page number of response", - "schema": { - "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], - "description": "The page number of response", - "default": 1, - "title": "Page" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "How many results to return per page of response", + "description": "Request body (multipart/form-data)", "schema": { - "anyOf": [{"type":"integer","maximum":100,"minimum":1},{"type":"null"}], - "description": "How many results to return per page of response", - "title": "Per Page" + "properties": { + "data_json": { + "allOf": [ + { + "if": { + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts","artifact_fingerprint"] + }, + "then": {"properties":{"target_artifacts":{"maxItems":1}}} + }, + { + "if": { + "not": {"required":["artifact_fingerprint"]}, + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts"] + }, + "then": {"required":["git_commit_info"]} + } + ], + "properties": { + "attestation_name": { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-_,]+$", + "title": "Attestation Name" + }, + "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "artifact_fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Artifact Fingerprint" + }, + "target_artifacts": { + "anyOf": [ + {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, + {"type":"null"} + ], + "title": "Target Artifacts" + }, + "git_commit_info": { + "anyOf": [ + { + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, + "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" + }, + "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, + "timestamp": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Timestamp" + }, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Parents" + }, + "verified": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Verified" + }, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } + }, + "type": "object", + "required": ["sha1"], + "title": "GitCommit" + }, + {"type":"null"} + ] + }, + "repo_info": { + "anyOf": [ + { + "properties": { + "name": {"type":"string","title":"Name"}, + "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, + "url": {"type":"string","title":"Url"}, + "description": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Description" + }, + "provider": { + "anyOf": [ + { + "type": "string", + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ] + }, + {"type":"null"} + ], + "title": "Provider" + }, + "namespace_path": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Namespace Path" + }, + "additional_info": { + "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], + "title": "Additional Info" + } + }, + "type": "object", + "required": ["name","url"], + "title": "RepoInfoPostInput" + }, + {"type":"null"} + ] + }, + "external_urls": { + "anyOf": [ + { + "patternProperties": { + "^[^=.]+$": { + "properties": { + "href": {"type":"string","title":"Href"}, + "fingerprint": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{64}$"}, + {"type":"null"} + ], + "title": "Fingerprint" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["href"], + "title": "ExternalAttachmentUrl" + } + }, + "type": "object" + }, + {"type":"null"} + ], + "title": "External Urls" + }, + "annotations": { + "anyOf": [ + {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, + {"type":"null"} + ], + "title": "Annotations" + }, + "user_data": { + "anyOf": [ + {"additionalProperties":true,"type":"object"}, + {"items":{},"type":"array"}, + {"type":"null"} + ], + "title": "User Data" + }, + "snyk_results": { + "properties": { + "schema_version": {"type":"integer","title":"Schema Version","default":1}, + "tool": { + "properties": { + "name": {"type":"string","title":"Name"}, + "version": {"type":"string","title":"Version"} + }, + "additionalProperties": false, + "type": "object", + "required": ["name","version"], + "title": "SnykTool" + }, + "results": { + "items": { + "properties": { + "low_count": {"type":"integer","title":"Low Count"}, + "medium_count": {"type":"integer","title":"Medium Count"}, + "high_count": {"type":"integer","title":"High Count"}, + "low": { + "anyOf": [ + { + "items": { + "properties": { + "id": {"type":"string","title":"Id"}, + "message": {"type":"string","title":"Message"}, + "locations": { + "items": { + "properties": { + "uri": {"type":"string","title":"Uri"}, + "lines": {"type":"string","title":"Lines"} + }, + "type": "object", + "required": ["uri","lines"], + "title": "IssueLocation" + }, + "type": "array", + "title": "Locations", + "default": [] + }, + "priority_score": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Priority Score" + } + }, + "type": "object", + "required": ["id","message"], + "title": "FoundIssue" + }, + "type": "array" + }, + {"type":"null"} + ], + "title": "Low" + }, + "medium": { + "anyOf": [ + { + "items": { + "properties": { + "id": {"type":"string","title":"Id"}, + "message": {"type":"string","title":"Message"}, + "locations": { + "items": { + "properties": { + "uri": {"type":"string","title":"Uri"}, + "lines": {"type":"string","title":"Lines"} + }, + "type": "object", + "required": ["uri","lines"], + "title": "IssueLocation" + }, + "type": "array", + "title": "Locations", + "default": [] + }, + "priority_score": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Priority Score" + } + }, + "type": "object", + "required": ["id","message"], + "title": "FoundIssue" + }, + "type": "array" + }, + {"type":"null"} + ], + "title": "Medium" + }, + "high": { + "anyOf": [ + { + "items": { + "properties": { + "id": {"type":"string","title":"Id"}, + "message": {"type":"string","title":"Message"}, + "locations": { + "items": { + "properties": { + "uri": {"type":"string","title":"Uri"}, + "lines": {"type":"string","title":"Lines"} + }, + "type": "object", + "required": ["uri","lines"], + "title": "IssueLocation" + }, + "type": "array", + "title": "Locations", + "default": [] + }, + "priority_score": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Priority Score" + } + }, + "type": "object", + "required": ["id","message"], + "title": "FoundIssue" + }, + "type": "array" + }, + {"type":"null"} + ], + "title": "High" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["low_count","medium_count","high_count"], + "title": "ProjectScanResult" + }, + "type": "array", + "title": "Results" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["tool","results"], + "title": "SnykResultsSummary" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["attestation_name","snyk_results"], + "title": "SnykAttestationPostInput", + "examples": [ + { + "attestation_name": "snyk", + "git_commit_info": { + "author": "Jon Smith ", + "branch": "main", + "message": "adding glorious commit", + "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", + "timestamp": 1750923680, + "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" + }, + "snyk_results": { + "results": [ + {"high":[],"high_count":0,"low":[],"low_count":0,"medium":[],"medium_count":0} + ], + "schema_version": 1, + "tool": {"name":"SnykCode","version":"1.0.0"} + }, + "user_data": {} + } + ], + "description": "Attestation data in JSON format" + }, + "attachment_file": { + "anyOf": [ + {"type":"string","contentMediaType":"application/octet-stream"}, + {"type":"null"} + ], + "title": "Attachment File", + "description": "Optional attachment file (max size: 10MB)" + } + }, + "type": "object", + "required": ["data_json"], + "title": "Body_attest_snyk" } } ], - "requestBody": null, - "searchText": "list trails list trails of a flow. get trails org flow_name trails" + "searchText": "attest snyk scan add snyk attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name snyk attestation" }, { - "id": "list_trails_for_org", - "method": "GET", - "path": "/trails/{org}", - "summary": "List trails for organization", - "description": "Get a paginated list of trails for an organization based on filters provided as query parameters.", - "tags": ["Trails"], + "id": "attest_sonar", + "method": "POST", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/sonar", + "summary": "Attest Sonar scan", + "description": "Add Sonar attestation to a trail with an optional attachment file.", + "tags": ["Attestation"], "parameters": [ { - "name": "org", + "name": "flow_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Org"} - }, - { - "name": "flow", - "in": "query", - "required": false, - "description": "The name of the flow to filter trails by", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The name of the flow to filter trails by", - "title": "Flow" - } - }, - { - "name": "flow_tag", - "in": "query", - "required": false, - "description": "Filter trails by flows that have this tag (format: key=value, e.g., team=backend)", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "Filter trails by flows that have this tag (format: key=value, e.g., team=backend)", - "title": "Flow Tag" - } - }, - { - "name": "fingerprint", - "in": "query", - "required": false, - "description": "The fingerprint of the artifact reported to the trail or trails", - "schema": { - "anyOf": [{"type":"string"},{"type":"null"}], - "description": "The fingerprint of the artifact reported to the trail or trails", - "title": "Fingerprint" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "The page number of response", - "schema": { - "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], - "description": "The page number of response", - "default": 1, - "title": "Page" - } + "schema": {"type":"string","title":"Flow Name"} }, { - "name": "per_page", - "in": "query", - "required": false, - "description": "How many results to return per page of response", - "schema": { - "anyOf": [{"type":"integer","maximum":100,"minimum":1},{"type":"null"}], - "description": "How many results to return per page of response", - "default": 20, - "title": "Per Page" - } - } - ], - "requestBody": null, - "searchText": "list trails for organization get a paginated list of trails for an organization based on filters provided as query parameters. get trails org trails" - }, - { - "id": "patch_tags", - "method": "PATCH", - "path": "/tags/{org}/{resource_type}/{resource_id}", - "summary": "Update tags", - "description": "Patch tags for resource.", - "tags": ["Tags"], - "parameters": [ - { - "name": "resource_id", + "name": "trail_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Resource Id"} - }, - { - "name": "resource_type", - "in": "path", - "required": true, - "description": "The type of resource to tag. Singular and plural forms are accepted. Supported types are:\n- `flow` / `flows`\n- `environment` / `environments` (also `env`)\n- `repo` / `repos`\n- `control` / `controls`", - "schema": { - "type": "string", - "description": "The type of resource to tag. Singular and plural forms are accepted. Supported types are:\n- `flow` / `flows`\n- `environment` / `environments` (also `env`)\n- `repo` / `repos`\n- `control` / `controls`", - "title": "Resource Type" - } + "schema": {"type":"string","title":"Trail Name"} }, { "name": "org", @@ -5632,86 +2146,294 @@ { "name": "body", "required": true, - "description": "Request body (application/json)", + "description": "Request body (multipart/form-data)", "schema": { "properties": { - "set_tags": { - "anyOf": [ + "data_json": { + "allOf": [ { - "patternProperties": {"^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~]*$":{"type":"string"}}, - "type": "object" + "if": { + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts","artifact_fingerprint"] + }, + "then": {"properties":{"target_artifacts":{"maxItems":1}}} + }, + { + "if": { + "not": {"required":["artifact_fingerprint"]}, + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts"] + }, + "then": {"required":["git_commit_info"]} + } + ], + "properties": { + "attestation_name": { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-_,]+$", + "title": "Attestation Name" + }, + "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "artifact_fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Artifact Fingerprint" + }, + "target_artifacts": { + "anyOf": [ + {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, + {"type":"null"} + ], + "title": "Target Artifacts" + }, + "git_commit_info": { + "anyOf": [ + { + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, + "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" + }, + "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, + "timestamp": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Timestamp" + }, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Parents" + }, + "verified": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Verified" + }, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } + }, + "type": "object", + "required": ["sha1"], + "title": "GitCommit" + }, + {"type":"null"} + ] + }, + "repo_info": { + "anyOf": [ + { + "properties": { + "name": {"type":"string","title":"Name"}, + "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, + "url": {"type":"string","title":"Url"}, + "description": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Description" + }, + "provider": { + "anyOf": [ + { + "type": "string", + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ] + }, + {"type":"null"} + ], + "title": "Provider" + }, + "namespace_path": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Namespace Path" + }, + "additional_info": { + "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], + "title": "Additional Info" + } + }, + "type": "object", + "required": ["name","url"], + "title": "RepoInfoPostInput" + }, + {"type":"null"} + ] }, - {"type":"null"} + "external_urls": { + "anyOf": [ + { + "patternProperties": { + "^[^=.]+$": { + "properties": { + "href": {"type":"string","title":"Href"}, + "fingerprint": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{64}$"}, + {"type":"null"} + ], + "title": "Fingerprint" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["href"], + "title": "ExternalAttachmentUrl" + } + }, + "type": "object" + }, + {"type":"null"} + ], + "title": "External Urls" + }, + "annotations": { + "anyOf": [ + {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, + {"type":"null"} + ], + "title": "Annotations" + }, + "user_data": { + "anyOf": [ + {"additionalProperties":true,"type":"object"}, + {"items":{},"type":"array"}, + {"type":"null"} + ], + "title": "User Data" + }, + "sonar_results": { + "properties": { + "serverUrl": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serverurl"}, + "taskId": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taskid"}, + "status": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}, + "analysedAt": {"type":"string","title":"Analysedat"}, + "revision": {"type":"string","title":"Revision"}, + "changedAt": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changedat"}, + "project": { + "properties": { + "name": {"type":"string","title":"Name","default":""}, + "key": {"type":"string","title":"Key"}, + "url": {"type":"string","title":"Url"} + }, + "additionalProperties": true, + "type": "object", + "required": ["key","url"], + "title": "SonarProject" + }, + "qualityGate": { + "anyOf": [ + { + "properties": { + "name": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}, + "status": {"type":"string","title":"Status"}, + "conditions": { + "items": { + "properties": { + "metric": {"type":"string","title":"Metric"}, + "errorThreshold": {"type":"string","title":"Errorthreshold"}, + "operator": {"type":"string","title":"Operator"}, + "status": {"type":"string","title":"Status"}, + "value": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Value" + }, + "onLeakPeriod": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Onleakperiod" + } + }, + "additionalProperties": true, + "type": "object", + "required": ["metric","errorThreshold","operator","status"], + "title": "QualityGateCondition" + }, + "type": "array", + "title": "Conditions" + } + }, + "additionalProperties": true, + "type": "object", + "required": ["status","conditions"], + "title": "QualityGate" + }, + {"type":"null"} + ] + } + }, + "additionalProperties": true, + "type": "object", + "required": ["analysedAt","revision","project"], + "title": "SonarResults" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["attestation_name","sonar_results"], + "title": "SonarAttestationPostInput", + "examples": [ + { + "attestation_name": "sonar", + "git_commit_info": { + "author": "Jon Smith ", + "branch": "main", + "message": "adding glorious commit", + "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", + "timestamp": 1750923680, + "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" + }, + "sonar_results": { + "analysedAt": "1724052982", + "project": {"key":"xxx","name":"","url":"https://foo.com"}, + "qualityGate": { + "conditions": [ + {"errorThreshold":"xx","metric":"xx","operator":"xx","status":"OK"} + ], + "name": "gate-1", + "status": "OK" + }, + "revision": "649a645f2c138b7c626f2d9a33b4f3baaad1e213" + }, + "user_data": {} + } ], - "title": "Set Tags", - "description": "Dictionary of key-value tags to be added or updated" - }, - "remove_tags": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Remove Tags", - "description": "List of tag keys to be removed" - } - }, - "additionalProperties": false, - "type": "object", - "title": "TagPatchInput", - "examples": [{"remove_tags":["key_to_delete"],"set_tags":{"key1":"value1"}}] - } - } - ], - "searchText": "update tags patch tags for resource. patch tags org resource_type resource_id tags" - }, - { - "id": "post_control", - "method": "POST", - "path": "/controls/{org}", - "summary": "Create a control", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], - "parameters": [ - { - "name": "org", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Org"} - } - ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (application/json)", - "schema": { - "properties": { - "identifier": { - "type": "string", - "maxLength": 256, - "pattern": "^[a-zA-Z0-9\\-._~]+$", - "title": "Identifier" + "description": "Attestation data in JSON format" }, - "name": {"type":"string","title":"Name"}, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "links": { - "anyOf": [{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}], - "title": "Links" + "attachment_file": { + "anyOf": [ + {"type":"string","contentMediaType":"application/octet-stream"}, + {"type":"null"} + ], + "title": "Attachment File", + "description": "Optional attachment file (max size: 10MB)" } }, - "additionalProperties": false, "type": "object", - "required": ["identifier","name"], - "title": "ControlPostInput" + "required": ["data_json"], + "title": "Body_attest_sonar" } } ], - "searchText": "create a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. post controls org controls" + "searchText": "attest sonar scan add sonar attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name sonar attestation" }, { - "id": "post_custom_attestation", + "id": "attest_system", "method": "POST", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/custom", - "summary": "Attest custom", - "description": "Add custom attestation to a trail with an optional attachment file.", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/system", + "summary": "Attest system", + "description": "Add a system attestation to a trail.", "tags": ["Attestation"], "parameters": [ { @@ -5905,37 +2627,21 @@ {"additionalProperties":true,"type":"object"}, {"items":{},"type":"array"}, {"type":"null"} - ], - "title": "User Data" - }, - "type_name": {"type":"string","title":"Type Name"}, - "attestation_data": { - "type": "string", - "contentMediaType": "application/json", - "contentSchema": {}, - "title": "Attestation Data" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["attestation_name","type_name","attestation_data"], - "title": "CustomAttestationPostInput", - "examples": [ - { - "attestation_data": {"key":"value"}, - "attestation_name": "custom", - "git_commit_info": { - "author": "Jon Smith ", - "branch": "main", - "message": "adding glorious commit", - "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", - "timestamp": 1750923680, - "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" - }, - "type_name": "custom_type", - "user_data": {} + ], + "title": "User Data" + }, + "type_name": {"type":"string","enum":["decision"],"title":"Type Name"}, + "attestation_data": { + "type": "string", + "contentMediaType": "application/json", + "contentSchema": {}, + "title": "Attestation Data" } - ], + }, + "additionalProperties": true, + "type": "object", + "required": ["attestation_name","type_name","attestation_data"], + "title": "SystemAttestationPostInput", "description": "Attestation data in JSON format" }, "attachment_file": { @@ -5949,20 +2655,27 @@ }, "type": "object", "required": ["data_json"], - "title": "Body_post_custom_attestation" + "title": "Body_attest_system" } } ], - "searchText": "attest custom add custom attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name custom attestation" + "searchText": "attest system add a system attestation to a trail. post attestations org flow_name trail trail_name system attestation" }, { - "id": "post_custom_attestation_type", + "id": "create_artifact", "method": "POST", - "path": "/custom-attestation-types/{org}", - "summary": "Create or update custom attestation type", - "description": "Create or update a custom attestation type for an org.", - "tags": ["Custom Attestation Types"], + "path": "/artifacts/{org}/{flow_name}", + "summary": "Report artifact", + "description": "Create an artifact for organization.", + "tags": ["Artifacts"], "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, { "name": "org", "in": "path", @@ -5975,125 +2688,223 @@ { "name": "body", "required": true, - "description": "Request body (multipart/form-data)", + "description": "Request body (application/json)", "schema": { + "allOf": [ + {"anyOf":[{"required":["git_commit"]},{"required":["git_commit_info"]}]}, + { + "if": {"required":["trail_name","template_reference_name"]}, + "then": {"not":{"required":["template"]}} + } + ], "properties": { - "data_json": { - "properties": { - "name": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_~]*$", - "title": "Name", - "examples": ["my-type","source_code_review","CCF-00320-No_Passwords_In_Code"] + "trail_name": { + "anyOf": [ + {"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9\\-_.~]*$"}, + {"type":"null"} + ], + "title": "Trail Name" + }, + "template_reference_name": { + "anyOf": [ + {"type":"string","maxLength":255,"pattern":"^[a-zA-Z0-9\\-_]+$"}, + {"type":"null"} + ], + "title": "Template Reference Name" + }, + "fingerprint": {"type":"string","pattern":"^[a-f0-9]{64}$","title":"Fingerprint"}, + "filename": {"type":"string","minLength":1,"title":"Filename"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "git_commit": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}], + "title": "Git Commit" + }, + "git_commit_info": { + "anyOf": [ + { + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, + "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" + }, + "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, + "timestamp": {"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"}, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Parents" + }, + "verified": {"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"}, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } + }, + "type": "object", + "required": ["sha1"], + "title": "GitCommit" }, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "evaluator": { - "anyOf": [ - { - "properties": { - "content_type": { + {"type":"null"} + ] + }, + "repo_info": { + "anyOf": [ + { + "properties": { + "name": {"type":"string","title":"Name"}, + "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, + "url": {"type":"string","title":"Url"}, + "description": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Description" + }, + "provider": { + "anyOf": [ + { "type": "string", - "const": "jq", - "title": "Content Type", - "default": "jq" + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ] }, - "rules": {"items":{"type":"string"},"type":"array","title":"Rules"} - }, - "type": "object", - "required": ["rules"], - "title": "JQEvaluator" + {"type":"null"} + ], + "title": "Provider" }, - { - "properties": { - "content_type": { - "type": "string", - "const": "default", - "title": "Content Type", - "default": "default" - } - }, - "type": "object", - "title": "DefaultEvaluator" + "namespace_path": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Namespace Path" }, - {"type":"null"} - ], - "title": "Evaluator", - "default": {"content_type":"default"} + "additional_info": { + "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], + "title": "Additional Info" + } + }, + "type": "object", + "required": ["name","url"], + "title": "RepoInfoPostInput" }, - "summary": { - "anyOf": [ - { - "items": { - "properties": { - "name": {"type":"string","title":"Name"}, - "expression": {"type":"string","title":"Expression"} - }, - "additionalProperties": false, - "type": "object", - "required": ["name","expression"], - "title": "SummaryExpression", - "description": "A named JQ expression that extracts a display value from attestation data." + {"type":"null"} + ] + }, + "commits_list": { + "anyOf": [ + { + "items": { + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, + "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" }, - "type": "array" + "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, + "timestamp": {"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"}, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Parents" + }, + "verified": {"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"}, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } }, - {"type":"null"} - ], - "title": "Summary" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["name"], - "title": "CustomAttestationTypePostInput", - "examples": [ + "type": "object", + "required": ["sha1"], + "title": "GitCommit" + }, + "type": "array" + }, + {"type":"null"} + ], + "title": "Commits List" + }, + "repo_url": { + "anyOf": [{"type":"string"},{"type":"string","const":""},{"type":"null"}], + "title": "Repo Url" + }, + "is_compliant": {"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Compliant"}, + "build_url": {"type":"string","title":"Build Url"}, + "commit_url": {"type":"string","title":"Commit Url"}, + "template": { + "anyOf": [ + {"type":"string"}, + {"items":{"type":"string"},"type":"array"}, + {"type":"null"} + ], + "title": "Template" + }, + "external_urls": { + "anyOf": [ { - "description": "A person that is over 21 year", - "evaluator": {"content_type":"jq","rules":[".age > 21"]}, - "name": "person-over-21", - "summary": [{"expression":".age","name":"Age"}] - } + "patternProperties": { + "^[^=.]+$": { + "properties": { + "href": {"type":"string","title":"Href"}, + "fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Fingerprint" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["href"], + "title": "ExternalAttachmentUrl" + } + }, + "type": "object" + }, + {"type":"null"} ], - "description": "Custom attestation description in JSON format" + "title": "External Urls" }, - "type_schema": { + "annotations": { "anyOf": [ - {"type":"string","contentMediaType":"application/octet-stream"}, + {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, {"type":"null"} ], - "title": "Type Schema", - "description": "Optional attestation schema file" + "title": "Annotations" + }, + "user_data": { + "anyOf": [ + {"additionalProperties":true,"type":"object"}, + {"items":{},"type":"array"}, + {"type":"null"} + ], + "title": "User Data" } }, "type": "object", - "required": ["data_json"], - "title": "Body_post_custom_attestation_type" + "required": ["fingerprint","filename","build_url","commit_url"], + "title": "CreateArtifact" } } ], - "searchText": "create or update custom attestation type create or update a custom attestation type for an org. post custom-attestation-types org custom attestation types" + "searchText": "report artifact create an artifact for organization. post artifacts org flow_name artifacts" }, { - "id": "post_generic_attestation", + "id": "create_control", "method": "POST", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/generic", - "summary": "Attest generic", - "description": "Add Generic attestation to a trail with an optional attachment file.", - "tags": ["Attestation"], + "path": "/controls/{org}", + "summary": "Create a control", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, { "name": "org", "in": "path", @@ -6102,245 +2913,43 @@ "schema": {"type":"string","title":"Org"} } ], - "requestBody": [ - { - "name": "body", - "required": true, - "description": "Request body (multipart/form-data)", - "schema": { - "properties": { - "data_json": { - "allOf": [ - { - "if": { - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts","artifact_fingerprint"] - }, - "then": {"properties":{"target_artifacts":{"maxItems":1}}} - }, - { - "if": { - "not": {"required":["artifact_fingerprint"]}, - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts"] - }, - "then": {"required":["git_commit_info"]} - } - ], - "properties": { - "attestation_name": { - "type": "string", - "pattern": "^[a-zA-Z0-9\\-_,]+$", - "title": "Attestation Name" - }, - "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "artifact_fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Artifact Fingerprint" - }, - "target_artifacts": { - "anyOf": [ - {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, - {"type":"null"} - ], - "title": "Target Artifacts" - }, - "git_commit_info": { - "anyOf": [ - { - "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, - "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, - "timestamp": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Timestamp" - }, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Parents" - }, - "verified": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Verified" - }, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } - }, - "type": "object", - "required": ["sha1"], - "title": "GitCommit" - }, - {"type":"null"} - ] - }, - "repo_info": { - "anyOf": [ - { - "properties": { - "name": {"type":"string","title":"Name"}, - "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, - "url": {"type":"string","title":"Url"}, - "description": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Description" - }, - "provider": { - "anyOf": [ - { - "type": "string", - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ] - }, - {"type":"null"} - ], - "title": "Provider" - }, - "namespace_path": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Namespace Path" - }, - "additional_info": { - "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], - "title": "Additional Info" - } - }, - "type": "object", - "required": ["name","url"], - "title": "RepoInfoPostInput" - }, - {"type":"null"} - ] - }, - "external_urls": { - "anyOf": [ - { - "patternProperties": { - "^[^=.]+$": { - "properties": { - "href": {"type":"string","title":"Href"}, - "fingerprint": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{64}$"}, - {"type":"null"} - ], - "title": "Fingerprint" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["href"], - "title": "ExternalAttachmentUrl" - } - }, - "type": "object" - }, - {"type":"null"} - ], - "title": "External Urls" - }, - "annotations": { - "anyOf": [ - {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, - {"type":"null"} - ], - "title": "Annotations" - }, - "user_data": { - "anyOf": [ - {"additionalProperties":true,"type":"object"}, - {"items":{},"type":"array"}, - {"type":"null"} - ], - "title": "User Data" - }, - "is_compliant": {"type":"boolean","title":"Is Compliant"} - }, - "additionalProperties": false, - "type": "object", - "required": ["attestation_name","is_compliant"], - "title": "GenericAttestationPostInput", - "examples": [ - { - "annotations": {"key":"value"}, - "artifact_fingerprint": "089eeef9ef2ba07f142d93bb172eab3f23586b4cb40af75175ce140ab9a88c9a", - "attestation_name": "manual-test", - "description": "this is a glorious attestation", - "external_urls": {"github":"https://github.com/org/repo/actions/123"}, - "git_commit_info": { - "author": "Jon Smith ", - "branch": "main", - "message": "adding glorious commit", - "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", - "timestamp": 1750923680, - "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" - }, - "is_compliant": true, - "origin_url": "https://github.com/actions/123", - "user_data": {} - } - ], - "description": "Attestation data in JSON format" + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "identifier": { + "type": "string", + "maxLength": 256, + "pattern": "^[a-zA-Z0-9\\-._~]+$", + "title": "Identifier" }, - "attachment_file": { - "anyOf": [ - {"type":"string","contentMediaType":"application/octet-stream"}, - {"type":"null"} - ], - "title": "Attachment File", - "description": "Optional attachment file (max size: 10MB)" + "name": {"type":"string","title":"Name"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "links": { + "anyOf": [{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}], + "title": "Links" } }, + "additionalProperties": false, "type": "object", - "required": ["data_json"], - "title": "Body_post_generic_attestation" + "required": ["identifier","name"], + "title": "ControlPostInput" } } ], - "searchText": "attest generic add generic attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name generic attestation" + "searchText": "create a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. post controls org controls" }, { - "id": "post_jira_attestation", + "id": "create_evaluation", "method": "POST", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/jira", - "summary": "Attest Jira issue", - "description": "Add Jira attestation to a trail with an optional attachment file.", - "tags": ["Attestation"], + "path": "/evaluations/{org}", + "summary": "Create an evaluation", + "description": "**Beta** — the Server-side evaluation feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Evaluations"], "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, { "name": "org", "in": "path", @@ -6353,261 +2962,84 @@ { "name": "body", "required": true, - "description": "Request body (multipart/form-data)", + "description": "Request body (application/json)", "schema": { "properties": { - "data_json": { - "allOf": [ - { - "if": { - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts","artifact_fingerprint"] - }, - "then": {"properties":{"target_artifacts":{"maxItems":1}}} - }, - { - "if": { - "not": {"required":["artifact_fingerprint"]}, - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts"] - }, - "then": {"required":["git_commit_info"]} - } - ], + "context": { "properties": { - "attestation_name": { - "type": "string", - "pattern": "^[a-zA-Z0-9\\-_,]+$", - "title": "Attestation Name" - }, - "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "artifact_fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Artifact Fingerprint" - }, - "target_artifacts": { - "anyOf": [ - {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, - {"type":"null"} - ], - "title": "Target Artifacts" - }, - "git_commit_info": { - "anyOf": [ - { - "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, - "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, - "timestamp": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Timestamp" - }, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Parents" - }, - "verified": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Verified" - }, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } - }, - "type": "object", - "required": ["sha1"], - "title": "GitCommit" - }, - {"type":"null"} - ] - }, - "repo_info": { - "anyOf": [ - { - "properties": { - "name": {"type":"string","title":"Name"}, - "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, - "url": {"type":"string","title":"Url"}, - "description": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Description" - }, - "provider": { - "anyOf": [ - { - "type": "string", - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ] - }, - {"type":"null"} - ], - "title": "Provider" - }, - "namespace_path": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Namespace Path" - }, - "additional_info": { - "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], - "title": "Additional Info" - } - }, - "type": "object", - "required": ["name","url"], - "title": "RepoInfoPostInput" - }, - {"type":"null"} - ] - }, - "external_urls": { - "anyOf": [ - { - "patternProperties": { - "^[^=.]+$": { - "properties": { - "href": {"type":"string","title":"Href"}, - "fingerprint": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{64}$"}, - {"type":"null"} - ], - "title": "Fingerprint" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["href"], - "title": "ExternalAttachmentUrl" - } - }, - "type": "object" - }, - {"type":"null"} - ], - "title": "External Urls" - }, - "annotations": { - "anyOf": [ - {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, - {"type":"null"} - ], - "title": "Annotations" - }, - "user_data": { - "anyOf": [ - {"additionalProperties":true,"type":"object"}, - {"items":{},"type":"array"}, - {"type":"null"} - ], - "title": "User Data" - }, - "jira_results": { + "trails": { "items": { "properties": { - "issue_id": {"type":"string","title":"Issue Id"}, - "issue_url": {"type":"string","title":"Issue Url"}, - "issue_exists": {"type":"boolean","title":"Issue Exists"}, - "issue_fields": { - "additionalProperties": true, - "type": "object", - "title": "Issue Fields" + "flow": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", + "title": "Flow", + "description": "Name of the flow the trail belongs to" + }, + "trail": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_.~]*$", + "title": "Trail", + "description": "Name of the trail to evaluate" } }, "additionalProperties": false, "type": "object", - "required": ["issue_id","issue_url","issue_exists"], - "title": "JiraItem" + "required": ["flow","trail"], + "title": "TrailReferenceInput" }, "type": "array", - "title": "Jira Results" + "maxItems": 100, + "minItems": 1, + "title": "Trails", + "description": "The trails to evaluate, all resolved at one instant. A flow and trail named more than once is evaluated once. Order carries no meaning: a policy addresses a trail by its flow_name and trail_name, never by position." } }, "additionalProperties": false, "type": "object", - "required": ["attestation_name","jira_results"], - "title": "JiraAttestationPostInput", - "examples": [ - { - "attestation_name": "jira", - "git_commit_info": { - "author": "Jon Smith ", - "branch": "main", - "message": "adding glorious commit", - "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", - "timestamp": 1750923680, - "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" - }, - "jira_results": [ - { - "issue_exists": true, - "issue_id": "ML-50", - "issue_url": "https://your-org.atlassian.net/browse/ML-50" - } - ], - "user_data": {} - } - ], - "description": "Attestation data in JSON format" + "required": ["trails"], + "title": "EvaluationContextInput" + }, + "policy": { + "properties": { + "files": { + "additionalProperties": {"type":"string"}, + "type": "object", + "maxProperties": 100, + "minProperties": 1, + "title": "Files", + "description": "Rego bundle as relative path to source; a single file is one entry" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["files"], + "title": "InlinePolicyInput" }, - "attachment_file": { - "anyOf": [ - {"type":"string","contentMediaType":"application/octet-stream"}, - {"type":"null"} - ], - "title": "Attachment File", - "description": "Optional attachment file (max size: 10MB)" + "params": { + "additionalProperties": true, + "type": "object", + "title": "Params", + "description": "Values the policy reads as `data.params`, not enforced against it" } }, + "additionalProperties": false, "type": "object", - "required": ["data_json"], - "title": "Body_post_jira_attestation" + "required": ["context","policy"], + "title": "EvaluationPostInput" } } ], - "searchText": "attest jira issue add jira attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name jira attestation" + "searchText": "create an evaluation **beta** — the server-side evaluation feature is in beta. requests from organizations without it enabled receive `403 forbidden`. post evaluations org evaluations" }, { - "id": "post_junit_attestation", + "id": "create_or_update_custom_attestation_type", "method": "POST", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/junit", - "summary": "Attest JUnit test results", - "description": "Add JUnit attestation to a trail with an optional attachment file.", - "tags": ["Attestation"], + "path": "/custom-attestation-types/{org}", + "summary": "Create or update custom attestation type", + "description": "Create or update a custom attestation type for an org.", + "tags": ["Custom Attestation Types"], "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, { "name": "org", "in": "path", @@ -6624,260 +3056,348 @@ "schema": { "properties": { "data_json": { - "allOf": [ - { - "if": { - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts","artifact_fingerprint"] - }, - "then": {"properties":{"target_artifacts":{"maxItems":1}}} - }, - { - "if": { - "not": {"required":["artifact_fingerprint"]}, - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts"] - }, - "then": {"required":["git_commit_info"]} - } - ], "properties": { - "attestation_name": { + "name": { "type": "string", - "pattern": "^[a-zA-Z0-9\\-_,]+$", - "title": "Attestation Name" + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_~]*$", + "title": "Name", + "examples": ["my-type","source_code_review","CCF-00320-No_Passwords_In_Code"] }, - "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "artifact_fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Artifact Fingerprint" - }, - "target_artifacts": { - "anyOf": [ - {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, - {"type":"null"} - ], - "title": "Target Artifacts" - }, - "git_commit_info": { + "evaluator": { "anyOf": [ { "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, - "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, - "timestamp": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Timestamp" - }, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Parents" - }, - "verified": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Verified" + "content_type": { + "type": "string", + "const": "jq", + "title": "Content Type", + "default": "jq" }, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } + "rules": {"items":{"type":"string"},"type":"array","title":"Rules"} }, "type": "object", - "required": ["sha1"], - "title": "GitCommit" + "required": ["rules"], + "title": "JQEvaluator" }, - {"type":"null"} - ] - }, - "repo_info": { - "anyOf": [ { "properties": { - "name": {"type":"string","title":"Name"}, - "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, - "url": {"type":"string","title":"Url"}, - "description": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Description" - }, - "provider": { - "anyOf": [ - { - "type": "string", - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ] - }, - {"type":"null"} - ], - "title": "Provider" - }, - "namespace_path": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Namespace Path" - }, - "additional_info": { - "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], - "title": "Additional Info" + "content_type": { + "type": "string", + "const": "default", + "title": "Content Type", + "default": "default" } }, "type": "object", - "required": ["name","url"], - "title": "RepoInfoPostInput" + "title": "DefaultEvaluator" }, {"type":"null"} - ] + ], + "title": "Evaluator", + "default": {"content_type":"default"} }, - "external_urls": { + "summary": { "anyOf": [ { - "patternProperties": { - "^[^=.]+$": { - "properties": { - "href": {"type":"string","title":"Href"}, - "fingerprint": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{64}$"}, - {"type":"null"} - ], - "title": "Fingerprint" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["href"], - "title": "ExternalAttachmentUrl" - } + "items": { + "properties": { + "name": {"type":"string","title":"Name"}, + "expression": {"type":"string","title":"Expression"} + }, + "additionalProperties": false, + "type": "object", + "required": ["name","expression"], + "title": "SummaryExpression", + "description": "A named JQ expression that extracts a display value from attestation data." }, - "type": "object" + "type": "array" }, {"type":"null"} ], - "title": "External Urls" - }, - "annotations": { - "anyOf": [ - {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, - {"type":"null"} - ], - "title": "Annotations" - }, - "user_data": { - "anyOf": [ - {"additionalProperties":true,"type":"object"}, - {"items":{},"type":"array"}, - {"type":"null"} - ], - "title": "User Data" - }, - "junit_results": { - "items": { - "properties": { - "name": {"type":"string","title":"Name"}, - "failures": {"type":"integer","title":"Failures"}, - "errors": {"type":"integer","title":"Errors"}, - "skipped": {"type":"integer","title":"Skipped"}, - "total": {"type":"integer","title":"Total"}, - "duration": {"type":"number","title":"Duration"}, - "timestamp": {"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"} - }, - "additionalProperties": false, - "type": "object", - "required": ["name","failures","errors","skipped","total","duration"], - "title": "JUnitResult" - }, - "type": "array", - "minItems": 1, - "title": "Junit Results" + "title": "Summary" } }, "additionalProperties": false, - "type": "object", - "required": ["attestation_name","junit_results"], - "title": "JUnitAttestationPostInput", - "examples": [ - { - "attestation_name": "junit", - "git_commit_info": { - "author": "Jon Smith ", - "branch": "main", - "message": "adding glorious commit", - "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", - "timestamp": 1750923680, - "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" - }, - "junit_results": [ - { - "duration": 2.5, - "errors": 0, - "failures": 0, - "name": "test suite", - "skipped": 1, - "total": 5 - } - ], - "user_data": {} + "type": "object", + "required": ["name"], + "title": "CustomAttestationTypePostInput", + "examples": [ + { + "description": "A person that is over 21 year", + "evaluator": {"content_type":"jq","rules":[".age > 21"]}, + "name": "person-over-21", + "summary": [{"expression":".age","name":"Age"}] } ], - "description": "Attestation data in JSON format" + "description": "Custom attestation description in JSON format" }, - "attachment_file": { + "type_schema": { "anyOf": [ {"type":"string","contentMediaType":"application/octet-stream"}, {"type":"null"} ], - "title": "Attachment File", - "description": "Optional attachment file (max size: 10MB)" + "title": "Type Schema", + "description": "Optional attestation schema file" } }, "type": "object", "required": ["data_json"], - "title": "Body_post_junit_attestation" + "title": "Body_create_or_update_custom_attestation_type" } } ], - "searchText": "attest junit test results add junit attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name junit attestation" + "searchText": "create or update custom attestation type create or update a custom attestation type for an org. post custom-attestation-types org custom attestation types" }, { - "id": "post_override_attestation", - "method": "POST", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/override", - "summary": "Override attestation", - "description": "Override an attestation in a trail.", - "tags": ["Attestation"], + "id": "create_or_update_environment", + "method": "PUT", + "path": "/environments/{org}", + "summary": "Create or update environment", + "description": "Create or update an Environment for an organization.", + "tags": ["Environments"], "parameters": [ { - "name": "flow_name", + "name": "org", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ { - "name": "trail_name", + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "name": {"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_]*$","title":"Name"}, + "type": { + "type": "string", + "enum": [ + "K8S", + "ECS", + "S3", + "lambda", + "server", + "docker", + "azure-apps", + "cloud-run", + "logical" + ], + "title": "Type" + }, + "description": {"type":"string","title":"Description"}, + "include_scaling": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Include Scaling", + "description": "This field is deprecated and will be removed in a future version. Scaling events are no longer recorded, so this field is ignored.", + "deprecated": true + }, + "require_provenance": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Require Provenance", + "description": "This field is deprecated and will be removed in a future version. Use policies instead.", + "deprecated": true + }, + "included_environments": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Included Environments" + }, + "policies": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Policies" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["name","type","description"], + "title": "CreateEnvironmentPutInput" + } + } + ], + "searchText": "create or update environment create or update an environment for an organization. put environments org environments" + }, + { + "id": "create_or_update_environment_action", + "method": "PUT", + "path": "/actions/{org}/environments", + "summary": "Create or update environment action", + "description": "Create or Update an environment action for an org.", + "tags": ["Actions"], + "parameters": [ + { + "name": "org", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "name": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~/]*$", + "title": "Name", + "examples": ["production-action"] + }, + "targets": { + "items": { + "anyOf": [ + { + "properties": { + "type": {"type":"string","const":"SLACK","title":"Type","default":"SLACK"}, + "last_success_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Success At" + }, + "last_failure_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Failure At" + }, + "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, + "context": { + "anyOf": [ + { + "properties": { + "channel_id": {"type":"string","title":"Channel Id"}, + "channel_name": {"type":"string","title":"Channel Name"}, + "team_id": {"type":"string","title":"Team Id"} + }, + "additionalProperties": false, + "type": "object", + "required": ["channel_id","channel_name","team_id"], + "title": "SlackAppContext" + }, + {"type":"null"} + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": ["webhook"], + "title": "SlackActionTarget" + }, + { + "properties": { + "type": {"type":"string","const":"WEBHOOK","title":"Type","default":"WEBHOOK"}, + "last_success_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Success At" + }, + "last_failure_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Failure At" + }, + "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, + "payload_version": { + "type": "string", + "const": "1.0", + "title": "Payload Version", + "default": "1.0" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["webhook"], + "title": "WebhookActionTarget" + }, + { + "properties": { + "type": {"type":"string","const":"EMAIL","title":"Type","default":"EMAIL"}, + "last_success_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Success At" + }, + "last_failure_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Failure At" + }, + "emails": { + "items": {"type":"string","format":"email"}, + "type": "array", + "title": "Emails" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["emails"], + "title": "EmailActionTarget" + }, + { + "properties": { + "type": {"type":"string","enum":["SLACK","EMAIL","WEBHOOK"],"title":"Type"}, + "config": {"additionalProperties":true,"type":"object","title":"Config"}, + "context": { + "anyOf": [ + { + "properties": { + "channel_id": {"type":"string","title":"Channel Id"}, + "channel_name": {"type":"string","title":"Channel Name"}, + "team_id": {"type":"string","title":"Team Id"} + }, + "additionalProperties": false, + "type": "object", + "required": ["channel_id","channel_name","team_id"], + "title": "SlackAppContext" + }, + {"type":"null"} + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": ["type","config"], + "title": "NestedConfigActionTarget", + "description": "The pre-v2 target shape, with the type's own fields nested under `config`.\n\nStill sent by the Slack app and by older callers, so it stays part of the\npublished contract instead of being accepted as an untyped object." + } + ] + }, + "type": "array", + "title": "Targets" + }, + "type": {"type":"string","const":"env","title":"Type","default":"env"}, + "environments": {"items":{"type":"string"},"type":"array","title":"Environments"}, + "triggers": { + "items": { + "type": "string", + "enum": [ + "ON_STARTED_ARTIFACT", + "ON_EXITED_ARTIFACT", + "ON_SCALED_ARTIFACT", + "ON_ALLOWED_ARTIFACT", + "ON_NON_COMPLIANT_ENV", + "ON_COMPLIANT_ENV" + ] + }, + "type": "array", + "title": "Triggers" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["name","targets","environments","triggers"], + "title": "EnvActionPutInput" + } + } + ], + "searchText": "create or update environment action create or update an environment action for an org. put actions org environments actions" + }, + { + "id": "create_or_update_environment_notification", + "method": "PUT", + "path": "/organizations/{org}/environments_notifications", + "summary": "Create or update environment notification", + "description": "Create or Update an environments-notification for an org.", + "tags": ["Organizations"], + "parameters": [ { "name": "org", "in": "path", @@ -6892,208 +3412,163 @@ "required": true, "description": "Request body (application/json)", "schema": { - "allOf": [ - { - "if": { - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts","artifact_fingerprint"] - }, - "then": {"properties":{"target_artifacts":{"maxItems":1}}} - }, - { - "if": { - "not": {"required":["artifact_fingerprint"]}, - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts"] - }, - "then": {"required":["git_commit_info"]} - } - ], "properties": { - "attestation_name": { + "name": { "type": "string", - "pattern": "^[a-zA-Z0-9\\-_,]+$", - "title": "Attestation Name" - }, - "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "artifact_fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Artifact Fingerprint" - }, - "target_artifacts": { - "anyOf": [ - {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, - {"type":"null"} - ], - "title": "Target Artifacts" + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~/]*$", + "title": "Name", + "examples": ["production-action"] }, - "git_commit_info": { - "anyOf": [ - { - "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, - "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, - "timestamp": {"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"}, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Parents" + "targets": { + "items": { + "anyOf": [ + { + "properties": { + "type": {"type":"string","const":"SLACK","title":"Type","default":"SLACK"}, + "last_success_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Success At" + }, + "last_failure_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Failure At" + }, + "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, + "context": { + "anyOf": [ + { + "properties": { + "channel_id": {"type":"string","title":"Channel Id"}, + "channel_name": {"type":"string","title":"Channel Name"}, + "team_id": {"type":"string","title":"Team Id"} + }, + "additionalProperties": false, + "type": "object", + "required": ["channel_id","channel_name","team_id"], + "title": "SlackAppContext" + }, + {"type":"null"} + ] + } }, - "verified": {"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"}, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } + "additionalProperties": false, + "type": "object", + "required": ["webhook"], + "title": "SlackActionTarget" }, - "type": "object", - "required": ["sha1"], - "title": "GitCommit" - }, - {"type":"null"} - ] - }, - "repo_info": { - "anyOf": [ - { - "properties": { - "name": {"type":"string","title":"Name"}, - "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, - "url": {"type":"string","title":"Url"}, - "description": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Description" - }, - "provider": { - "anyOf": [ - { - "type": "string", - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ] - }, - {"type":"null"} - ], - "title": "Provider" - }, - "namespace_path": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Namespace Path" + { + "properties": { + "type": {"type":"string","const":"WEBHOOK","title":"Type","default":"WEBHOOK"}, + "last_success_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Success At" + }, + "last_failure_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Failure At" + }, + "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, + "payload_version": { + "type": "string", + "const": "1.0", + "title": "Payload Version", + "default": "1.0" + } }, - "additional_info": { - "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], - "title": "Additional Info" - } + "additionalProperties": false, + "type": "object", + "required": ["webhook"], + "title": "WebhookActionTarget" }, - "type": "object", - "required": ["name","url"], - "title": "RepoInfoPostInput" - }, - {"type":"null"} - ] - }, - "external_urls": { - "anyOf": [ - { - "patternProperties": { - "^[^=.]+$": { - "properties": { - "href": {"type":"string","title":"Href"}, - "fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Fingerprint" - } + { + "properties": { + "type": {"type":"string","const":"EMAIL","title":"Type","default":"EMAIL"}, + "last_success_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Success At" }, - "additionalProperties": false, - "type": "object", - "required": ["href"], - "title": "ExternalAttachmentUrl" - } + "last_failure_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Failure At" + }, + "emails": { + "items": {"type":"string","format":"email"}, + "type": "array", + "title": "Emails" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["emails"], + "title": "EmailActionTarget" }, - "type": "object" - }, - {"type":"null"} - ], - "title": "External Urls" - }, - "annotations": { - "anyOf": [ - {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, - {"type":"null"} - ], - "title": "Annotations" - }, - "user_data": { - "anyOf": [ - {"additionalProperties":true,"type":"object"}, - {"items":{},"type":"array"}, - {"type":"null"} - ], - "title": "User Data" + { + "properties": { + "type": {"type":"string","enum":["SLACK","EMAIL","WEBHOOK"],"title":"Type"}, + "config": {"additionalProperties":true,"type":"object","title":"Config"}, + "context": { + "anyOf": [ + { + "properties": { + "channel_id": {"type":"string","title":"Channel Id"}, + "channel_name": {"type":"string","title":"Channel Name"}, + "team_id": {"type":"string","title":"Team Id"} + }, + "additionalProperties": false, + "type": "object", + "required": ["channel_id","channel_name","team_id"], + "title": "SlackAppContext" + }, + {"type":"null"} + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": ["type","config"], + "title": "NestedConfigActionTarget", + "description": "The pre-v2 target shape, with the type's own fields nested under `config`.\n\nStill sent by the Slack app and by older callers, so it stays part of the\npublished contract instead of being accepted as an untyped object." + } + ] + }, + "type": "array", + "title": "Targets" }, - "reason": {"type":"string","title":"Reason"}, - "new_compliance_status": {"type":"boolean","title":"New Compliance Status"}, - "original_attestation_type": { - "anyOf": [ - {"type":"string","enum":["generic","junit","snyk","pull_request","jira","sonar"]}, - {"type":"string","pattern":"^custom:.*$"}, - {"type":"string","pattern":"^system:.*$"} - ], - "title": "Original Attestation Type" + "type": {"type":"string","const":"env","title":"Type","default":"env"}, + "environments": {"items":{"type":"string"},"type":"array","title":"Environments"}, + "triggers": { + "items": { + "type": "string", + "enum": [ + "ON_STARTED_ARTIFACT", + "ON_EXITED_ARTIFACT", + "ON_SCALED_ARTIFACT", + "ON_ALLOWED_ARTIFACT", + "ON_NON_COMPLIANT_ENV", + "ON_COMPLIANT_ENV" + ] + }, + "type": "array", + "title": "Triggers" } }, "additionalProperties": false, "type": "object", - "required": [ - "attestation_name", - "reason", - "new_compliance_status", - "original_attestation_type" - ], - "title": "OverrideAttestationPostInput" + "required": ["name","targets","environments","triggers"], + "title": "EnvActionPutInput" } } ], - "searchText": "override attestation override an attestation in a trail. post attestations org flow_name trail trail_name override attestation" + "searchText": "create or update environment notification create or update an environments-notification for an org. put organizations org environments_notifications organizations" }, { - "id": "post_pull_request_attestation", - "method": "POST", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/pull_request", - "summary": "Attest pull request", - "description": "Add Pull-Request attestation to a trail with an optional attachment file.", - "tags": ["Attestation"], + "id": "create_or_update_flow_action", + "method": "PUT", + "path": "/actions/{org}/flows", + "summary": "Create or update flow action", + "description": "Create or Update a flow action for an org.", + "tags": ["Actions"], "parameters": [ - { - "name": "flow_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Flow Name"} - }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, { "name": "org", "in": "path", @@ -7106,397 +3581,391 @@ { "name": "body", "required": true, - "description": "Request body (multipart/form-data)", + "description": "Request body (application/json)", "schema": { "properties": { - "data_json": { - "allOf": [ - { - "if": { - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts","artifact_fingerprint"] - }, - "then": {"properties":{"target_artifacts":{"maxItems":1}}} - }, - { - "if": { - "not": {"required":["artifact_fingerprint"]}, - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts"] - }, - "then": {"required":["git_commit_info"]} - } - ], - "properties": { - "attestation_name": { - "type": "string", - "pattern": "^[a-zA-Z0-9\\-_,]+$", - "title": "Attestation Name" - }, - "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "artifact_fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Artifact Fingerprint" - }, - "target_artifacts": { - "anyOf": [ - {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, - {"type":"null"} - ], - "title": "Target Artifacts" - }, - "git_commit_info": { - "anyOf": [ - { - "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, - "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, - "timestamp": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Timestamp" - }, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Parents" - }, - "verified": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Verified" - }, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } + "name": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~/]*$", + "title": "Name", + "examples": ["release-action"] + }, + "targets": { + "items": { + "anyOf": [ + { + "properties": { + "type": {"type":"string","const":"SLACK","title":"Type","default":"SLACK"}, + "last_success_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Success At" }, - "type": "object", - "required": ["sha1"], - "title": "GitCommit" - }, - {"type":"null"} - ] - }, - "repo_info": { - "anyOf": [ - { - "properties": { - "name": {"type":"string","title":"Name"}, - "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, - "url": {"type":"string","title":"Url"}, - "description": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Description" - }, - "provider": { - "anyOf": [ - { - "type": "string", - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ] - }, - {"type":"null"} - ], - "title": "Provider" - }, - "namespace_path": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Namespace Path" - }, - "additional_info": { - "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], - "title": "Additional Info" - } + "last_failure_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Failure At" }, - "type": "object", - "required": ["name","url"], - "title": "RepoInfoPostInput" - }, - {"type":"null"} - ] - }, - "external_urls": { - "anyOf": [ - { - "patternProperties": { - "^[^=.]+$": { - "properties": { - "href": {"type":"string","title":"Href"}, - "fingerprint": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{64}$"}, - {"type":"null"} - ], - "title": "Fingerprint" - } + "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, + "context": { + "anyOf": [ + { + "properties": { + "channel_id": {"type":"string","title":"Channel Id"}, + "channel_name": {"type":"string","title":"Channel Name"}, + "team_id": {"type":"string","title":"Team Id"} + }, + "additionalProperties": false, + "type": "object", + "required": ["channel_id","channel_name","team_id"], + "title": "SlackAppContext" }, - "additionalProperties": false, - "type": "object", - "required": ["href"], - "title": "ExternalAttachmentUrl" - } + {"type":"null"} + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": ["webhook"], + "title": "SlackActionTarget" + }, + { + "properties": { + "type": {"type":"string","const":"WEBHOOK","title":"Type","default":"WEBHOOK"}, + "last_success_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Success At" }, - "type": "object" + "last_failure_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Failure At" + }, + "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, + "payload_version": { + "type": "string", + "const": "1.0", + "title": "Payload Version", + "default": "1.0" + } }, - {"type":"null"} - ], - "title": "External Urls" - }, - "annotations": { - "anyOf": [ - {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, - {"type":"null"} - ], - "title": "Annotations" - }, - "user_data": { - "anyOf": [ - {"additionalProperties":true,"type":"object"}, - {"items":{},"type":"array"}, - {"type":"null"} - ], - "title": "User Data" - }, - "git_provider": { - "type": "string", - "enum": ["github","gitlab","bitbucket","azure"], - "title": "Git Provider" - }, - "pull_requests": { - "anyOf": [ - { - "items": { - "properties": { - "url": {"type":"string","title":"Url"}, - "state": {"type":"string","title":"State"}, - "merge_commit": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{40}$"}, - {"type":"string","const":""} - ], - "title": "Merge Commit" - }, - "approvers": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Approvers" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["url","state","merge_commit"], - "title": "FoundPullRequestV1" + "additionalProperties": false, + "type": "object", + "required": ["webhook"], + "title": "WebhookActionTarget" + }, + { + "properties": { + "type": {"type":"string","const":"EMAIL","title":"Type","default":"EMAIL"}, + "last_success_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Success At" }, - "type": "array" + "last_failure_at": { + "anyOf": [{"type":"number"},{"type":"null"}], + "title": "Last Failure At" + }, + "emails": { + "items": {"type":"string","format":"email"}, + "type": "array", + "title": "Emails" + } }, - { - "items": { - "properties": { - "url": {"type":"string","title":"Url"}, - "state": {"type":"string","title":"State"}, - "author": {"type":"string","title":"Author"}, - "title": {"type":"string","title":"Title"}, - "created_at": {"type":"number","title":"Created At"}, - "merged_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Merged At" - }, - "head_ref": {"type":"string","title":"Head Ref"}, - "base_ref": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Base Ref" - }, - "merge_commit": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}], - "title": "Merge Commit" - }, - "approvers": { - "anyOf": [ - { - "items": { - "properties": { - "username": {"type":"string","title":"Username"}, - "state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "State" - }, - "timestamp": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Timestamp" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["username"], - "title": "PullRequestApprover" - }, - "type": "array" - }, - {"type":"null"} - ], - "title": "Approvers" - }, - "commits": { - "items": { - "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Message" - }, - "author": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author" - }, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Branch" - }, - "timestamp": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Timestamp" - }, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [ - {"items":{"type":"string"},"type":"array"}, - {"type":"null"} - ], - "title": "Parents" - }, - "verified": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Verified" - }, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } - }, - "type": "object", - "required": ["sha1"], - "title": "GitCommit" + "additionalProperties": false, + "type": "object", + "required": ["emails"], + "title": "EmailActionTarget" + }, + { + "properties": { + "type": {"type":"string","enum":["SLACK","EMAIL","WEBHOOK"],"title":"Type"}, + "config": {"additionalProperties":true,"type":"object","title":"Config"}, + "context": { + "anyOf": [ + { + "properties": { + "channel_id": {"type":"string","title":"Channel Id"}, + "channel_name": {"type":"string","title":"Channel Name"}, + "team_id": {"type":"string","title":"Team Id"} }, - "type": "array", - "title": "Commits" - } - }, - "additionalProperties": false, - "type": "object", - "required": [ - "url", - "state", - "author", - "title", - "created_at", - "head_ref", - "commits" - ], - "title": "FoundPullRequestV2" - }, - "type": "array" - } - ], - "title": "Pull Requests" + "additionalProperties": false, + "type": "object", + "required": ["channel_id","channel_name","team_id"], + "title": "SlackAppContext" + }, + {"type":"null"} + ] + } + }, + "additionalProperties": false, + "type": "object", + "required": ["type","config"], + "title": "NestedConfigActionTarget", + "description": "The pre-v2 target shape, with the type's own fields nested under `config`.\n\nStill sent by the Slack app and by older callers, so it stays part of the\npublished contract instead of being accepted as an untyped object." + } + ] + }, + "type": "array", + "title": "Targets" + }, + "type": {"type":"string","const":"flow","title":"Type","default":"flow"}, + "flows": {"items":{"type":"string"},"type":"array","title":"Flows"}, + "triggers": { + "items": { + "type": "string", + "enum": [ + "ON_STARTED_TRAIL", + "ON_ATTESTED_PROVENANCE", + "ON_ATTESTATION", + "ON_APPROVAL", + "ON_RELEASE" + ] + }, + "type": "array", + "title": "Triggers" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["name","targets","flows","triggers"], + "title": "FlowActionPutInput" + } + } + ], + "searchText": "create or update flow action create or update a flow action for an org. put actions org flows actions" + }, + { + "id": "create_or_update_flow_with_template", + "method": "PUT", + "path": "/flows/{org}/template_file", + "summary": "Create or update flow with template", + "description": "Create or update a flow for an organization.", + "tags": ["Flows"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (multipart/form-data)", + "schema": { + "properties": { + "data_json": { + "properties": { + "name": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", + "title": "Name" + }, + "description": {"type":"string","title":"Description"}, + "visibility": { + "anyOf": [{"type":"string","enum":["public","private"]},{"type":"null"}], + "title": "Visibility" + } + }, + "type": "object", + "required": ["name","description"], + "title": "CreateFlow", + "description": "Flow metadata in JSON format" + }, + "template_file": { + "anyOf": [ + {"type":"string","contentMediaType":"application/octet-stream"}, + {"type":"null"} + ], + "title": "Template File", + "description": "The flow template file (max size: 10MB)" + } + }, + "type": "object", + "required": ["data_json"], + "title": "Body_create_or_update_flow_with_template" + } + } + ], + "searchText": "create or update flow with template create or update a flow for an organization. put flows org template_file flows" + }, + { + "id": "create_or_update_policy", + "method": "PUT", + "path": "/policies/{org}", + "summary": "Create or update policy", + "description": "Create or update a Policy in an organization.", + "tags": ["Policies"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (multipart/form-data)", + "schema": { + "properties": { + "payload": { + "properties": { + "name": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~]*$", + "title": "Name", + "examples": ["production-policy"] + }, + "description": { + "type": "string", + "title": "Description", + "default": "", + "examples": ["some description"] + }, + "type": {"type":"string","const":"env","title":"Type","default":"env"}, + "comment": { + "type": "string", + "title": "Comment", + "default": "", + "examples": ["describe what you changed"] } }, "additionalProperties": false, "type": "object", - "required": ["attestation_name","git_provider","pull_requests"], - "title": "PullRequestAttestationPostInput", + "required": ["name"], + "title": "PolicyPutInput", "examples": [ { - "attestation_name": "pr", - "git_commit_info": { - "author": "Jon Smith ", - "branch": "main", - "message": "adding glorious commit", - "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", - "timestamp": 1750923680, - "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" - }, - "git_provider": "github", - "pull_requests": [ - { - "approvers": [{"author":"Jon Doe","state":"APPROVED","timestamp":1750923266}], - "author": "JonSmith", - "commits": [ - { - "author": "Jon Smith ", - "author_username": "JonSmith", - "branch": "glorious-branch", - "message": "Add glorious feature", - "sha": "f387a894992f7991489680696abf8b72bf7875f1", - "timestamp": 1750851568, - "url": "https://github.com/org/repo/commit/f387a894992f7991489680696abf8b72bf7875f1" - }, - { - "author": "Jon Smith ", - "author_username": "JonSmith", - "branch": "glorious-branch", - "message": "Update glorious feature", - "sha": "2d48854228633cca94f7f4a587b2172ebb01cf85", - "timestamp": 1750922905 - } - ], - "created_at": 1750851601, - "head_ref": "glorious-branch", - "merge_commit": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", - "merged_at": 1750923680, - "state": "MERGED", - "title": "Add glorious commit", - "url": "https://github.com/org/repo/pull/3497" - } - ], - "user_data": {} + "comment": "Initial version", + "description": "Production environment policy", + "name": "production-policy", + "type": "env" } ], - "description": "Attestation data in JSON format" + "description": "Policy metadata in JSON format" }, - "attachment_file": { + "policy_file": { "anyOf": [ {"type":"string","contentMediaType":"application/octet-stream"}, {"type":"null"} ], - "title": "Attachment File", - "description": "Optional attachment file (max size: 10MB)" + "title": "Policy File", + "description": "The YAML policy file to upload (max size: 10MB)" } }, "type": "object", - "required": ["data_json"], - "title": "Body_post_pull_request_attestation" + "required": ["payload"], + "title": "Body_create_or_update_policy" } } ], - "searchText": "attest pull request add pull-request attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name pull_request attestation" + "searchText": "create or update policy create or update a policy in an organization. put policies org policies" }, { - "id": "post_snyk_attestation", + "id": "create_service_account", "method": "POST", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/snyk", - "summary": "Attest Snyk scan", - "description": "Add Snyk attestation to a trail with an optional attachment file.", - "tags": ["Attestation"], + "path": "/service-accounts/{org}", + "summary": "Create a service account", + "description": "Create a new service account in the organization. API keys are minted\nseparately via the `/{name}/api-keys` endpoint.", + "tags": ["Service Accounts"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-]+$", + "title": "Name" + }, + "description": { + "anyOf": [{"type":"string","maxLength":512},{"type":"null"}], + "title": "Description" + }, + "privilege": { + "type": "string", + "enum": ["admin","member","snapshotter","reader"], + "title": "Privilege", + "default": "reader" + } + }, + "type": "object", + "required": ["name"], + "title": "ServiceAccountPostInput" + } + } + ], + "searchText": "create a service account create a new service account in the organization. api keys are minted\nseparately via the `/{name}/api-keys` endpoint. post service-accounts org service accounts" + }, + { + "id": "create_service_account_api_key", + "method": "POST", + "path": "/service-accounts/{org}/{name}/api-keys", + "summary": "Create an API key for a service account", + "description": "Create a new API key for a service account. The key value is only returned once.", + "tags": ["Service Accounts"], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "description": {"type":"string","maxLength":256,"minLength":1,"title":"Description"}, + "expires_at": { + "anyOf": [{"type":"integer","maximum":4102444800},{"type":"null"}], + "title": "Expires At", + "description": "Unix timestamp for key expiry. Must not be in the past. Omit or pass 0 for the maximum; every key expires at most 365 days from creation." + } + }, + "type": "object", + "required": ["description"], + "title": "ApiKeyPostInput" + } + } + ], + "searchText": "create an api key for a service account create a new api key for a service account. the key value is only returned once. post service-accounts org name api-keys service accounts" + }, + { + "id": "create_trail", + "method": "PUT", + "path": "/trails/{org}/{flow_name}", + "summary": "Begin trail", + "description": "Add a Trail to a Flow.", + "tags": ["Trails"], "parameters": [ { "name": "flow_name", @@ -7505,13 +3974,6 @@ "description": "", "schema": {"type":"string","title":"Flow Name"} }, - { - "name": "trail_name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Trail Name"} - }, { "name": "org", "in": "path", @@ -7528,42 +3990,9 @@ "schema": { "properties": { "data_json": { - "allOf": [ - { - "if": { - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts","artifact_fingerprint"] - }, - "then": {"properties":{"target_artifacts":{"maxItems":1}}} - }, - { - "if": { - "not": {"required":["artifact_fingerprint"]}, - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts"] - }, - "then": {"required":["git_commit_info"]} - } - ], "properties": { - "attestation_name": { - "type": "string", - "pattern": "^[a-zA-Z0-9\\-_,]+$", - "title": "Attestation Name" - }, - "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, + "name": {"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9\\-_.~]*$","title":"Name"}, "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "artifact_fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Artifact Fingerprint" - }, - "target_artifacts": { - "anyOf": [ - {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, - {"type":"null"} - ], - "title": "Target Artifacts" - }, "git_commit_info": { "anyOf": [ { @@ -7650,6 +4079,7 @@ {"type":"null"} ] }, + "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, "external_urls": { "anyOf": [ { @@ -7677,13 +4107,6 @@ ], "title": "External Urls" }, - "annotations": { - "anyOf": [ - {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, - {"type":"null"} - ], - "title": "Annotations" - }, "user_data": { "anyOf": [ {"additionalProperties":true,"type":"object"}, @@ -7691,215 +4114,1236 @@ {"type":"null"} ], "title": "User Data" - }, - "snyk_results": { - "properties": { - "schema_version": {"type":"integer","title":"Schema Version","default":1}, - "tool": { - "properties": { - "name": {"type":"string","title":"Name"}, - "version": {"type":"string","title":"Version"} - }, - "additionalProperties": false, - "type": "object", - "required": ["name","version"], - "title": "SnykTool" - }, - "results": { - "items": { - "properties": { - "low_count": {"type":"integer","title":"Low Count"}, - "medium_count": {"type":"integer","title":"Medium Count"}, - "high_count": {"type":"integer","title":"High Count"}, - "low": { - "anyOf": [ - { - "items": { - "properties": { - "id": {"type":"string","title":"Id"}, - "message": {"type":"string","title":"Message"}, - "locations": { - "items": { - "properties": { - "uri": {"type":"string","title":"Uri"}, - "lines": {"type":"string","title":"Lines"} - }, - "type": "object", - "required": ["uri","lines"], - "title": "IssueLocation" - }, - "type": "array", - "title": "Locations", - "default": [] - }, - "priority_score": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Priority Score" - } - }, - "type": "object", - "required": ["id","message"], - "title": "FoundIssue" - }, - "type": "array" - }, - {"type":"null"} - ], - "title": "Low" - }, - "medium": { - "anyOf": [ - { - "items": { - "properties": { - "id": {"type":"string","title":"Id"}, - "message": {"type":"string","title":"Message"}, - "locations": { - "items": { - "properties": { - "uri": {"type":"string","title":"Uri"}, - "lines": {"type":"string","title":"Lines"} - }, - "type": "object", - "required": ["uri","lines"], - "title": "IssueLocation" - }, - "type": "array", - "title": "Locations", - "default": [] - }, - "priority_score": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Priority Score" - } - }, - "type": "object", - "required": ["id","message"], - "title": "FoundIssue" - }, - "type": "array" - }, - {"type":"null"} - ], - "title": "Medium" - }, - "high": { - "anyOf": [ - { - "items": { - "properties": { - "id": {"type":"string","title":"Id"}, - "message": {"type":"string","title":"Message"}, - "locations": { - "items": { - "properties": { - "uri": {"type":"string","title":"Uri"}, - "lines": {"type":"string","title":"Lines"} - }, - "type": "object", - "required": ["uri","lines"], - "title": "IssueLocation" - }, - "type": "array", - "title": "Locations", - "default": [] - }, - "priority_score": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Priority Score" - } - }, - "type": "object", - "required": ["id","message"], - "title": "FoundIssue" - }, - "type": "array" - }, - {"type":"null"} - ], - "title": "High" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["low_count","medium_count","high_count"], - "title": "ProjectScanResult" - }, - "type": "array", - "title": "Results" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["tool","results"], - "title": "SnykResultsSummary" } }, - "additionalProperties": false, "type": "object", - "required": ["attestation_name","snyk_results"], - "title": "SnykAttestationPostInput", - "examples": [ - { - "attestation_name": "snyk", - "git_commit_info": { - "author": "Jon Smith ", - "branch": "main", - "message": "adding glorious commit", - "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", - "timestamp": 1750923680, - "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" - }, - "snyk_results": { - "results": [ - {"high":[],"high_count":0,"low":[],"low_count":0,"medium":[],"medium_count":0} - ], - "schema_version": 1, - "tool": {"name":"SnykCode","version":"1.0.0"} - }, - "user_data": {} - } + "required": ["name"], + "title": "CreateTrail", + "description": "Trail metadata in JSON format" + }, + "template_file": { + "anyOf": [ + {"type":"string","contentMediaType":"application/octet-stream"}, + {"type":"null"} ], - "description": "Attestation data in JSON format" + "title": "Template File", + "description": "Optional flow template file (max size: 10MB)" + } + }, + "type": "object", + "required": ["data_json"], + "title": "Body_create_trail" + } + } + ], + "searchText": "begin trail add a trail to a flow. put trails org flow_name trails" + }, + { + "id": "delete_action", + "method": "DELETE", + "path": "/actions/{org}/{action_number}", + "summary": "Delete an action", + "description": "Delete a specific action for an org.", + "tags": ["Actions"], + "parameters": [ + { + "name": "action_number", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"integer","title":"Action Number"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "delete an action delete a specific action for an org. delete actions org action_number actions" + }, + { + "id": "delete_environment_notification", + "method": "DELETE", + "path": "/organizations/{org}/environments_notifications/{notification_number}", + "summary": "Delete environment notification", + "description": "Delete a specific environments-notification for an org.", + "tags": ["Organizations"], + "parameters": [ + { + "name": "notification_number", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"integer","title":"Notification Number"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "delete environment notification delete a specific environments-notification for an org. delete organizations org environments_notifications notification_number organizations" + }, + { + "id": "delete_service_account", + "method": "DELETE", + "path": "/service-accounts/{org}/{name}", + "summary": "Delete a service account", + "description": "Remove a service account from the organization.", + "tags": ["Service Accounts"], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^[a-zA-Z0-9\\-]+$", + "title": "Name" + } + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "delete a service account remove a service account from the organization. delete service-accounts org name service accounts" + }, + { + "id": "delete_service_account_api_key", + "method": "DELETE", + "path": "/service-accounts/{org}/{name}/api-keys/{key_id}", + "summary": "Revoke an API key for a service account", + "description": "Revoke an API key for a service account.", + "tags": ["Service Accounts"], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Name"} + }, + { + "name": "key_id", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Key Id"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "revoke an api key for a service account revoke an api key for a service account. delete service-accounts org name api-keys key_id service accounts" + }, + { + "id": "detach_environment_policy", + "method": "DELETE", + "path": "/environments/{org}/{env_name}/policies", + "summary": "Detach policy from environment", + "description": "Detach a Policy from an environment.", + "tags": ["Environments"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "policy_names": { + "items": {"type":"string"}, + "type": "array", + "title": "Policy Names", + "description": "List of policy names to attach/detach" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["policy_names"], + "title": "AttachPoliciesPutInput" + } + } + ], + "searchText": "detach policy from environment detach a policy from an environment. delete environments org env_name policies environments" + }, + { + "id": "download_artifact_audit_package", + "method": "GET", + "path": "/artifacts/{org}/{flow_name}/{fingerprint}/audit_package", + "summary": "Get artifact audit package", + "description": "Get audit package for an artifact.", + "tags": ["Artifacts"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", + "title": "Flow Name" + } + }, + { + "name": "fingerprint", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","pattern":"^[a-f0-9]{5,64}$","title":"Fingerprint"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get artifact audit package get audit package for an artifact. get artifacts org flow_name fingerprint audit_package artifacts" + }, + { + "id": "download_trail_audit_package", + "method": "GET", + "path": "/trails/{org}/{flow_name}/{trail_name}/audit_package", + "summary": "Download trail audit package", + "description": "Download the full trail audit package (same content as the app “Download Full Audit Package”).", + "tags": ["Trails"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "trail_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "download trail audit package download the full trail audit package (same content as the app “download full audit package”). get trails org flow_name trail_name audit_package trails" + }, + { + "id": "download_trail_audit_pdf", + "method": "GET", + "path": "/trails/{org}/{flow_name}/{trail_name}/audit_pdf", + "summary": "Download trail audit PDF", + "description": "Download only the trail PDF report (same as `trail-page.pdf` inside the full audit package).", + "tags": ["Trails"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "trail_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "download trail audit pdf download only the trail pdf report (same as `trail-page.pdf` inside the full audit package). get trails org flow_name trail_name audit_pdf trails" + }, + { + "id": "get_action", + "method": "GET", + "path": "/actions/{org}/{action_number}", + "summary": "Get action", + "description": "Get a specific action for an org.", + "tags": ["Actions"], + "parameters": [ + { + "name": "action_number", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"integer","title":"Action Number"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get action get a specific action for an org. get actions org action_number actions" + }, + { + "id": "get_artifact_attestation", + "method": "GET", + "path": "/attestations/{org}/{flow_name}/artifact/{fingerprint}/{attestation_name}", + "summary": "Get artifact attestation", + "description": "", + "tags": ["Attestation"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "fingerprint", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","pattern":"^[a-f0-9]{5,64}$","title":"Fingerprint"} + }, + { + "name": "attestation_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Attestation Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get artifact attestation get attestations org flow_name artifact fingerprint attestation_name attestation" + }, + { + "id": "get_artifact_by_fingerprint", + "method": "GET", + "path": "/artifacts/{org}/{flow_name}/fingerprint/{fingerprint}", + "summary": "Get artifact by fingerprint", + "description": "Get artifact by fingerprint.", + "tags": ["Artifacts"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", + "title": "Flow Name" + } + }, + { + "name": "fingerprint", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","pattern":"^[a-f0-9]{5,64}$","title":"Fingerprint"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "trail", + "in": "query", + "required": false, + "description": "The name of the trail the artifact was reported to.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The name of the trail the artifact was reported to.", + "title": "Trail" + } + }, + { + "name": "attestation_id", + "in": "query", + "required": false, + "description": "Internal artifact attestation id.", + "schema": { + "anyOf": [ + { + "type": "string", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{8}$" }, - "attachment_file": { - "anyOf": [ - {"type":"string","contentMediaType":"application/octet-stream"}, - {"type":"null"} - ], - "title": "Attachment File", - "description": "Optional attachment file (max size: 10MB)" - } - }, - "type": "object", - "required": ["data_json"], - "title": "Body_post_snyk_attestation" + {"type":"null"} + ], + "description": "Internal artifact attestation id.", + "title": "Attestation Id" + } + } + ], + "requestBody": null, + "searchText": "get artifact by fingerprint get artifact by fingerprint. get artifacts org flow_name fingerprint fingerprint artifacts" + }, + { + "id": "get_attestation_evidence", + "method": "GET", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/attestation/{attestation_id}/evidence", + "summary": "Get attestation evidence file", + "description": "Download the evidence file attached to an attestation.", + "tags": ["Attestation"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "trail_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, + { + "name": "attestation_id", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Attestation Id"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get attestation evidence file download the evidence file attached to an attestation. get attestations org flow_name trail trail_name attestation attestation_id evidence attestation" + }, + { + "id": "get_build_statistics", + "method": "GET", + "path": "/builds/{org}/statistics", + "summary": "Build frequency statistics", + "description": "Build-frequency series for a repo within a time window.\n\nReturns one timestamp per build (deduplicated by fingerprint) plus the\nresolved window bounds and a count. Daily bucketing and the median are\ncomputed client-side.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", + "tags": ["Builds"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "repo_id", + "in": "query", + "required": false, + "description": "Filter by external VCS repo ID", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by external VCS repo ID", + "title": "Repo Id" + } + }, + { + "name": "repo_name", + "in": "query", + "required": false, + "description": "Filter by repo name (e.g. 'cyber-dojo/differ')", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by repo name (e.g. 'cyber-dojo/differ')", + "title": "Repo Name" + } + }, + { + "name": "repo_inner_id", + "in": "query", + "required": false, + "description": "Filter by the repo's internal id (the `id` in the repo response). The stable identifier: unaffected by repo renames or a missing external VCS id.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by the repo's internal id (the `id` in the repo response). The stable identifier: unaffected by repo renames or a missing external VCS id.", + "title": "Repo Inner Id" + } + }, + { + "name": "start_ts", + "in": "query", + "required": false, + "description": "Include builds created at or after this timestamp. Defaults to 28 days before end_ts", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include builds created at or after this timestamp. Defaults to 28 days before end_ts", + "title": "Start Ts" + } + }, + { + "name": "end_ts", + "in": "query", + "required": false, + "description": "Include builds created at or before this timestamp. Defaults to now", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include builds created at or before this timestamp. Defaults to now", + "title": "End Ts" + } + } + ], + "requestBody": null, + "searchText": "build frequency statistics build-frequency series for a repo within a time window.\n\nreturns one timestamp per build (deduplicated by fingerprint) plus the\nresolved window bounds and a count. daily bucketing and the median are\ncomputed client-side.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get builds org statistics builds" + }, + { + "id": "get_control", + "method": "GET", + "path": "/controls/{org}/{identifier}", + "summary": "Get a control", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Identifier"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier controls" + }, + { + "id": "get_control_coverage", + "method": "GET", + "path": "/controls/{org}/{identifier}/coverage", + "summary": "Environment coverage for a control", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Identifier"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of environments per page", + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Number of environments per page", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "description": "Filter environments by name (case-insensitive substring)", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter environments by name (case-insensitive substring)", + "title": "Search" + } + }, + { + "name": "covered", + "in": "query", + "required": false, + "description": "Filter by coverage state: true (covered) or false (not covered)", + "schema": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "description": "Filter by coverage state: true (covered) or false (not covered)", + "title": "Covered" + } + } + ], + "requestBody": null, + "searchText": "environment coverage for a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier coverage controls" + }, + { + "id": "get_control_decision", + "method": "GET", + "path": "/controls/{org}/{identifier}/decisions/{decision_id}", + "summary": "Get a single decision for a control", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Identifier"} + }, + { + "name": "decision_id", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Decision Id"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get a single decision for a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier decisions decision_id controls" + }, + { + "id": "get_control_version", + "method": "GET", + "path": "/controls/{org}/{identifier}/versions/{version_number}", + "summary": "Get a specific version of a control", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Identifier"} + }, + { + "name": "version_number", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"integer","title":"Version Number"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get a specific version of a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier versions version_number controls" + }, + { + "id": "get_custom_attestation_type", + "method": "GET", + "path": "/custom-attestation-types/{org}/{custom_attestation_type_name}", + "summary": "Get custom attestation type", + "description": "Get a custom attestation type.", + "tags": ["Custom Attestation Types"], + "parameters": [ + { + "name": "custom_attestation_type_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Custom Attestation Type Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "version", + "in": "query", + "required": false, + "description": "Version of the custom attestation type", + "schema": { + "anyOf": [{"type":"integer"},{"type":"null"}], + "description": "Version of the custom attestation type", + "title": "Version" + } + } + ], + "requestBody": null, + "searchText": "get custom attestation type get a custom attestation type. get custom-attestation-types org custom_attestation_type_name custom attestation types" + }, + { + "id": "get_deployment", + "method": "GET", + "path": "/deployments/{org}/{env_name}/{fingerprint}", + "summary": "Get Deployment", + "description": "Get a single deployment by environment and fingerprint.", + "tags": ["Deployments"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "fingerprint", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Fingerprint"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get deployment get a single deployment by environment and fingerprint. get deployments org env_name fingerprint deployments" + }, + { + "id": "get_deployment_frequency", + "method": "GET", + "path": "/environments/{org}/{env_name}/deployment_frequency", + "summary": "Get deployment frequency", + "description": "Get deployment frequency for a specific flow in an environment.", + "tags": ["Environments"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "flow_id", + "in": "query", + "required": false, + "description": "The id of the flow to get deployment frequency", + "schema": { + "type": "string", + "description": "The id of the flow to get deployment frequency", + "title": "Flow Id" + } + } + ], + "requestBody": null, + "searchText": "get deployment frequency get deployment frequency for a specific flow in an environment. get environments org env_name deployment_frequency environments" + }, + { + "id": "get_environment", + "method": "GET", + "path": "/environments/{org}/{env_name}", + "summary": "Get environment", + "description": "Get an environment for an organization.", + "tags": ["Environments"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get environment get an environment for an organization. get environments org env_name environments" + }, + { + "id": "get_environment_audit_log", + "method": "GET", + "path": "/environments/{org}/{env_name}/auditlog", + "summary": "Get environment audit log", + "description": "Get audit log (as a CSV file) for an environment.", + "tags": ["Environments"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "from_timestamp", + "in": "query", + "required": false, + "description": "From timestamp filter. Takes a UNIX timestamp. e.g. from_timestamp=1675167540", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "From timestamp filter. Takes a UNIX timestamp. e.g. from_timestamp=1675167540", + "title": "From Timestamp" + } + }, + { + "name": "to_timestamp", + "in": "query", + "required": false, + "description": "To timestamp filter. Takes a UNIX timestamp. e.g. from_timestamp=1675167540", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "To timestamp filter. Takes a UNIX timestamp. e.g. from_timestamp=1675167540", + "title": "To Timestamp" + } + }, + { + "name": "event_types", + "in": "query", + "required": false, + "description": "Event types filter. Can be one of started, exited, changed. e.g. event_types=started,exited", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Event types filter. Can be one of started, exited, changed. e.g. event_types=started,exited", + "title": "Event Types" + } + }, + { + "name": "flow_names", + "in": "query", + "required": false, + "description": "Flow names filter as comma separated list. Use 'no provenance' to include artifacts without provenance.e.g. flow_names=server,web,no provenance", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Flow names filter as comma separated list. Use 'no provenance' to include artifacts without provenance.e.g. flow_names=server,web,no provenance", + "title": "Flow Names" + } + }, + { + "name": "repo_names", + "in": "query", + "required": false, + "description": "Repo names filter as comma separated list. e.g. repo_names=repo1,repo2", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Repo names filter as comma separated list. e.g. repo_names=repo1,repo2", + "title": "Repo Names" + } + } + ], + "requestBody": null, + "searchText": "get environment audit log get audit log (as a csv file) for an environment. get environments org env_name auditlog environments" + }, + { + "id": "get_environment_diff", + "method": "GET", + "path": "/env-diff/{org}", + "summary": "Get environment diff", + "description": "Get diff between to snapshots", + "tags": ["EnvDiff"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "snappish1", + "in": "query", + "required": true, + "description": "Expression to specify the snapshot 1 for comparison.\nMust contain environment name.\nAdd '#N' to specify exact snapshot number N.\nAdd '~N' to get N-th behind the latest snapshot.\nExamples: staging, staging#10, staging~2", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Expression to specify the snapshot 1 for comparison.\nMust contain environment name.\nAdd '#N' to specify exact snapshot number N.\nAdd '~N' to get N-th behind the latest snapshot.\nExamples: staging, staging#10, staging~2", + "title": "Snappish1" + } + }, + { + "name": "snappish2", + "in": "query", + "required": true, + "description": "Expression to specify the snapshot 2 for comparison.\nMust contain environment name.\nAdd '#N' to specify exact snapshot number N.\n'Add '~N' to get N-th behind the latest snapshot.\nExamples: staging, staging#10, staging~2", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Expression to specify the snapshot 2 for comparison.\nMust contain environment name.\nAdd '#N' to specify exact snapshot number N.\n'Add '~N' to get N-th behind the latest snapshot.\nExamples: staging, staging#10, staging~2", + "title": "Snappish2" + } + } + ], + "requestBody": null, + "searchText": "get environment diff get diff between to snapshots get env-diff org envdiff" + }, + { + "id": "get_environment_notification", + "method": "GET", + "path": "/organizations/{org}/environments_notifications/{notification_number}", + "summary": "Get environment notification", + "description": "Get a specific environments-notification for an org.", + "tags": ["Organizations"], + "parameters": [ + { + "name": "notification_number", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"integer","title":"Notification Number"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get environment notification get a specific environments-notification for an org. get organizations org environments_notifications notification_number organizations" + }, + { + "id": "get_environment_policy_schema_v1", + "method": "GET", + "path": "/schemas/environment-policy/v1", + "summary": "Environment policy schema v1", + "description": "Return the JSON Schema for the environment policy YAML format (v1).", + "tags": ["Schemas"], + "parameters": [], + "requestBody": null, + "searchText": "environment policy schema v1 return the json schema for the environment policy yaml format (v1). get schemas environment-policy v1 schemas" + }, + { + "id": "get_evaluation", + "method": "GET", + "path": "/evaluations/{org}/{evaluation_id}", + "summary": "Get an evaluation", + "description": "**Beta** — the Server-side evaluation feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Evaluations"], + "parameters": [ + { + "name": "evaluation_id", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Evaluation Id"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get an evaluation **beta** — the server-side evaluation feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get evaluations org evaluation_id evaluations" + }, + { + "id": "get_flow", + "method": "GET", + "path": "/flows/{org}/{flow_name}", + "summary": "Get flow", + "description": "Get a flow for an organization.", + "tags": ["Flows"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get flow get a flow for an organization. get flows org flow_name flows" + }, + { + "id": "get_flow_template_schema_v1", + "method": "GET", + "path": "/schemas/flow-template/v1", + "summary": "Flow template schema v1", + "description": "Return the JSON Schema for the flow template YAML format (v1).", + "tags": ["Schemas"], + "parameters": [], + "requestBody": null, + "searchText": "flow template schema v1 return the json schema for the flow template yaml format (v1). get schemas flow-template v1 schemas" + }, + { + "id": "get_latest_artifact_commit", + "method": "GET", + "path": "/artifacts/{org}/{flow_name}/{fingerprint}/latest_commit", + "summary": "Get latest artifact commit", + "description": "Get the latest git commit of the artifact.", + "tags": ["Artifacts"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", + "title": "Flow Name" + } + }, + { + "name": "fingerprint", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","pattern":"^[a-f0-9]{5,64}$","title":"Fingerprint"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "branch", + "in": "query", + "required": false, + "description": "The branch to get the commit from", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The branch to get the commit from", + "title": "Branch" } } ], - "searchText": "attest snyk scan add snyk attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name snyk attestation" + "requestBody": null, + "searchText": "get latest artifact commit get the latest git commit of the artifact. get artifacts org flow_name fingerprint latest_commit artifacts" }, { - "id": "post_sonar_attestation", - "method": "POST", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/sonar", - "summary": "Attest Sonar scan", - "description": "Add Sonar attestation to a trail with an optional attachment file.", - "tags": ["Attestation"], + "id": "get_organization", + "method": "GET", + "path": "/organizations/{org}", + "summary": "Get organization", + "description": "Get a specific org.", + "tags": ["Organizations"], "parameters": [ { - "name": "flow_name", + "name": "org", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Flow Name"} + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get organization get a specific org. get organizations org organizations" + }, + { + "id": "get_policy", + "method": "GET", + "path": "/policies/{org}/{policy_name}", + "summary": "Get policy", + "description": "Get a Policy in an organization.", + "tags": ["Policies"], + "parameters": [ + { + "name": "policy_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Policy Name"} }, { - "name": "trail_name", + "name": "org", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Trail Name"} + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get policy get a policy in an organization. get policies org policy_name policies" + }, + { + "id": "get_repo", + "method": "GET", + "path": "/repos/{org}/{repo_name}", + "summary": "Get a repo", + "description": "Get a repo by name, or unambiguously by its internal `id`.\n\nReturns the repo's details, including its internal `id`, which is required to\ntag the repo via the generic tags endpoint (PATCH /tags/{org}/repo/{id}).\n\nIf multiple repos share the same name across different VCS providers and\nneither `id` nor `provider` is given, returns a 400 listing the providers to\nchoose from.", + "tags": ["Repos"], + "parameters": [ + { + "name": "repo_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Repo Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "provider", + "in": "query", + "required": false, + "description": "VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci). Required when multiple repos share the same name across providers.", + "schema": { + "anyOf": [ + { + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ], + "type": "string" + }, + {"type":"null"} + ], + "description": "VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci). Required when multiple repos share the same name across providers.", + "title": "Provider" + } + }, + { + "name": "id", + "in": "query", + "required": false, + "description": "The repo's internal id (returned as `id` in the repo response). If given, this unambiguously identifies the repo and 'provider' is ignored.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The repo's internal id (returned as `id` in the repo response). If given, this unambiguously identifies the repo and 'provider' is ignored.", + "title": "Id" + } + } + ], + "requestBody": null, + "searchText": "get a repo get a repo by name, or unambiguously by its internal `id`.\n\nreturns the repo's details, including its internal `id`, which is required to\ntag the repo via the generic tags endpoint (patch /tags/{org}/repo/{id}).\n\nif multiple repos share the same name across different vcs providers and\nneither `id` nor `provider` is given, returns a 400 listing the providers to\nchoose from. get repos org repo_name repos" + }, + { + "id": "get_repo_deployment_statistics", + "method": "GET", + "path": "/repos/{org}/{repo}/deployment-statistics", + "summary": "Deployment frequency and lead-time statistics for a repo", + "description": "Per-environment deployment-frequency and lead-time series for a repo,\nidentified by its internal `id` (the `{repo}` path segment).\n\nReturns one entry per non-logical environment the repo has been deployed to\n(respecting the env filter), each with its raw `deployed_at` and\n`lead_time_seconds` series plus the shared window bounds. Daily bucketing,\nmedian and percentiles are computed client-side.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", + "tags": ["Repos"], + "parameters": [ + { + "name": "repo", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Repo"} }, { "name": "org", @@ -7907,300 +5351,2657 @@ "required": true, "description": "", "schema": {"type":"string","title":"Org"} + }, + { + "name": "env", + "in": "query", + "required": false, + "description": "Filter by environment name. Repeat to select several; omit for all environments the repo has been deployed to.", + "schema": { + "type": "array", + "items": {"type":"string"}, + "description": "Filter by environment name. Repeat to select several; omit for all environments the repo has been deployed to.", + "default": [], + "title": "Env" + } + }, + { + "name": "start_ts", + "in": "query", + "required": false, + "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", + "title": "Start Ts" + } + }, + { + "name": "end_ts", + "in": "query", + "required": false, + "description": "Include deployments at or before this timestamp. Defaults to now", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include deployments at or before this timestamp. Defaults to now", + "title": "End Ts" + } } ], - "requestBody": [ + "requestBody": null, + "searchText": "deployment frequency and lead-time statistics for a repo per-environment deployment-frequency and lead-time series for a repo,\nidentified by its internal `id` (the `{repo}` path segment).\n\nreturns one entry per non-logical environment the repo has been deployed to\n(respecting the env filter), each with its raw `deployed_at` and\n`lead_time_seconds` series plus the shared window bounds. daily bucketing,\nmedian and percentiles are computed client-side.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get repos org repo deployment-statistics repos" + }, + { + "id": "get_repo_live_artifacts", + "method": "GET", + "path": "/repos/{org}/live-artifacts/{repo_name}", + "summary": "Get live artifacts for a repo", + "description": "Get the live status of artifacts from a repository across all environments.\n\nReturns a `RepoLiveStatusResponse` object that includes:\n- `_embedded.environments`: environments that currently have running artifacts from this repo\n- `_embedded.artifacts`: the corresponding artifacts for those environments\n- `live_artifacts`: a flattened view of currently running artifacts, including each artifact's\n compliance status, fingerprint, commit SHA, and start timestamp.\n\nRepo names are not unique within an org, so pass `id` to resolve an exact repo.\nOtherwise, if multiple repos share the same name across different VCS providers, use the\n`provider` parameter to disambiguate; without either, the most recently created match is used.", + "tags": ["Repos"], + "parameters": [ { - "name": "body", + "name": "repo_name", + "in": "path", "required": true, - "description": "Request body (multipart/form-data)", + "description": "", + "schema": {"type":"string","title":"Repo Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "provider", + "in": "query", + "required": false, + "description": "VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci). Required when multiple repos share the same name across providers.", "schema": { - "properties": { - "data_json": { - "allOf": [ - { - "if": { - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts","artifact_fingerprint"] - }, - "then": {"properties":{"target_artifacts":{"maxItems":1}}} - }, - { - "if": { - "not": {"required":["artifact_fingerprint"]}, - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts"] - }, - "then": {"required":["git_commit_info"]} - } + "anyOf": [ + { + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" ], - "properties": { - "attestation_name": { - "type": "string", - "pattern": "^[a-zA-Z0-9\\-_,]+$", - "title": "Attestation Name" - }, - "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "artifact_fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Artifact Fingerprint" - }, - "target_artifacts": { - "anyOf": [ - {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, - {"type":"null"} - ], - "title": "Target Artifacts" - }, - "git_commit_info": { - "anyOf": [ - { - "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, - "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, - "timestamp": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Timestamp" - }, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Parents" - }, - "verified": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Verified" - }, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } - }, - "type": "object", - "required": ["sha1"], - "title": "GitCommit" - }, - {"type":"null"} - ] - }, - "repo_info": { - "anyOf": [ - { - "properties": { - "name": {"type":"string","title":"Name"}, - "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, - "url": {"type":"string","title":"Url"}, - "description": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Description" - }, - "provider": { - "anyOf": [ - { - "type": "string", - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ] - }, - {"type":"null"} - ], - "title": "Provider" - }, - "namespace_path": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Namespace Path" - }, - "additional_info": { - "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], - "title": "Additional Info" - } - }, - "type": "object", - "required": ["name","url"], - "title": "RepoInfoPostInput" - }, - {"type":"null"} - ] - }, - "external_urls": { - "anyOf": [ - { - "patternProperties": { - "^[^=.]+$": { - "properties": { - "href": {"type":"string","title":"Href"}, - "fingerprint": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{64}$"}, - {"type":"null"} - ], - "title": "Fingerprint" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["href"], - "title": "ExternalAttachmentUrl" - } - }, - "type": "object" - }, - {"type":"null"} - ], - "title": "External Urls" - }, - "annotations": { - "anyOf": [ - {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, - {"type":"null"} - ], - "title": "Annotations" - }, - "user_data": { - "anyOf": [ - {"additionalProperties":true,"type":"object"}, - {"items":{},"type":"array"}, - {"type":"null"} - ], - "title": "User Data" - }, - "sonar_results": { - "properties": { - "serverUrl": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Serverurl"}, - "taskId": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Taskid"}, - "status": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}, - "analysedAt": {"type":"string","title":"Analysedat"}, - "revision": {"type":"string","title":"Revision"}, - "changedAt": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changedat"}, - "project": { - "properties": { - "name": {"type":"string","title":"Name","default":""}, - "key": {"type":"string","title":"Key"}, - "url": {"type":"string","title":"Url"} - }, - "additionalProperties": true, - "type": "object", - "required": ["key","url"], - "title": "SonarProject" - }, - "qualityGate": { - "anyOf": [ - { - "properties": { - "name": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}, - "status": {"type":"string","title":"Status"}, - "conditions": { - "items": { - "properties": { - "metric": {"type":"string","title":"Metric"}, - "errorThreshold": {"type":"string","title":"Errorthreshold"}, - "operator": {"type":"string","title":"Operator"}, - "status": {"type":"string","title":"Status"}, - "value": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Value" - }, - "onLeakPeriod": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Onleakperiod" - } - }, - "additionalProperties": true, - "type": "object", - "required": ["metric","errorThreshold","operator","status"], - "title": "QualityGateCondition" - }, - "type": "array", - "title": "Conditions" - } - }, - "additionalProperties": true, - "type": "object", - "required": ["status","conditions"], - "title": "QualityGate" - }, - {"type":"null"} - ] - } - }, - "additionalProperties": true, - "type": "object", - "required": ["analysedAt","revision","project"], - "title": "SonarResults" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["attestation_name","sonar_results"], - "title": "SonarAttestationPostInput", - "examples": [ - { - "attestation_name": "sonar", - "git_commit_info": { - "author": "Jon Smith ", - "branch": "main", - "message": "adding glorious commit", - "sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6", - "timestamp": 1750923680, - "url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6" - }, - "sonar_results": { - "analysedAt": "1724052982", - "project": {"key":"xxx","name":"","url":"https://foo.com"}, - "qualityGate": { - "conditions": [ - {"errorThreshold":"xx","metric":"xx","operator":"xx","status":"OK"} - ], - "name": "gate-1", - "status": "OK" - }, - "revision": "649a645f2c138b7c626f2d9a33b4f3baaad1e213" - }, - "user_data": {} - } + "type": "string" + }, + {"type":"null"} + ], + "description": "VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci). Required when multiple repos share the same name across providers.", + "title": "Provider" + } + }, + { + "name": "id", + "in": "query", + "required": false, + "description": "The repo's internal id (returned as `id` in the repo response). If given, this unambiguously identifies the repo and 'provider' is ignored.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The repo's internal id (returned as `id` in the repo response). If given, this unambiguously identifies the repo and 'provider' is ignored.", + "title": "Id" + } + } + ], + "requestBody": null, + "searchText": "get live artifacts for a repo get the live status of artifacts from a repository across all environments.\n\nreturns a `repolivestatusresponse` object that includes:\n- `_embedded.environments`: environments that currently have running artifacts from this repo\n- `_embedded.artifacts`: the corresponding artifacts for those environments\n- `live_artifacts`: a flattened view of currently running artifacts, including each artifact's\n compliance status, fingerprint, commit sha, and start timestamp.\n\nrepo names are not unique within an org, so pass `id` to resolve an exact repo.\notherwise, if multiple repos share the same name across different vcs providers, use the\n`provider` parameter to disambiguate; without either, the most recently created match is used. get repos org live-artifacts repo_name repos" + }, + { + "id": "get_service_account", + "method": "GET", + "path": "/service-accounts/{org}/{name}", + "summary": "Get a service account", + "description": "Get a single service account by name.", + "tags": ["Service Accounts"], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^[a-zA-Z0-9\\-]+$", + "title": "Name" + } + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get a service account get a single service account by name. get service-accounts org name service accounts" + }, + { + "id": "get_service_account_api_key", + "method": "GET", + "path": "/service-accounts/{org}/{name}/api-keys/{key_id}", + "summary": "Get an API key for a service account", + "description": "Get a single active API key for a service account.", + "tags": ["Service Accounts"], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Name"} + }, + { + "name": "key_id", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Key Id"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get an api key for a service account get a single active api key for a service account. get service-accounts org name api-keys key_id service accounts" + }, + { + "id": "get_snapshot", + "method": "GET", + "path": "/snapshots/{org}/{env_name}/{snapshot_expression}", + "summary": "Get snapshot", + "description": "Get a snapshot for an environment.\n\n`snapshot_expression` can be specified as follows:\n- `N`: the Nth snapshot, counting from 1. Negative values count from the latest snapshot i.e. -1 is the latest snapshot.\n example: 42\n- `~N`: the Nth snapshot behind the latest, at the time of the request\n example: ~5\n- `@{YYYY-MM-DDTHH:MM:SS}`: the snapshot at specific moment in time in UTC\n example: @{2023-10-02T12:00:00}\n- `@{N..ago}`: the snapshot at a time relative to the time of the request. N is a positive integer.\n example: @{2.hours.ago}\n- `@{now}`: the snapshot at the time of the request\n example: @{now}", + "tags": ["Snapshots"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "snapshot_expression", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Snapshot Expression"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get snapshot get a snapshot for an environment.\n\n`snapshot_expression` can be specified as follows:\n- `n`: the nth snapshot, counting from 1. negative values count from the latest snapshot i.e. -1 is the latest snapshot.\n example: 42\n- `~n`: the nth snapshot behind the latest, at the time of the request\n example: ~5\n- `@{yyyy-mm-ddthh:mm:ss}`: the snapshot at specific moment in time in utc\n example: @{2023-10-02t12:00:00}\n- `@{n..ago}`: the snapshot at a time relative to the time of the request. n is a positive integer.\n example: @{2.hours.ago}\n- `@{now}`: the snapshot at the time of the request\n example: @{now} get snapshots org env_name snapshot_expression snapshots" + }, + { + "id": "get_trail", + "method": "GET", + "path": "/trails/{org}/{flow_name}/{trail_name}", + "summary": "Get trail", + "description": "Get a Trail for a Flow in an organization.", + "tags": ["Trails"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "trail_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get trail get a trail for a flow in an organization. get trails org flow_name trail_name trails" + }, + { + "id": "get_trail_attestation", + "method": "GET", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/{attestation_name}", + "summary": "Get trail attestation", + "description": "", + "tags": ["Attestation"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "trail_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, + { + "name": "attestation_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Attestation Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get trail attestation get attestations org flow_name trail trail_name attestation_name attestation" + }, + { + "id": "get_trail_moment", + "method": "GET", + "path": "/trails/{org}/{flow_name}/{trail_name}/moments/{moment_expression}", + "summary": "Get trail moment", + "description": "**Beta** — the Server-side evaluation feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Trails"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "trail_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, + { + "name": "moment_expression", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Moment Expression"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "get trail moment **beta** — the server-side evaluation feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get trails org flow_name trail_name moments moment_expression trails" + }, + { + "id": "get_user_default_org", + "method": "GET", + "path": "/user/default-org", + "summary": "Get default organization", + "description": "Get the default org for the current user.", + "tags": ["User"], + "parameters": [], + "requestBody": null, + "searchText": "get default organization get the default org for the current user. get user default-org user" + }, + { + "id": "join_logical_environment", + "method": "PUT", + "path": "/environments/{org}/{env_name}/join", + "summary": "Add environment to logical environment", + "description": "Join the given physical environment to this Logical environment", + "tags": ["Environments"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "physical_env_name": { + "type": "string", + "title": "Physical Env Name", + "description": "Physical environment name" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["physical_env_name"], + "title": "JoinPhysicalToLogicalPutInput" + } + } + ], + "searchText": "add environment to logical environment join the given physical environment to this logical environment put environments org env_name join environments" + }, + { + "id": "list_actions", + "method": "GET", + "path": "/actions/{org}", + "summary": "List actions", + "description": "List actions for an org.", + "tags": ["Actions"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "list actions list actions for an org. get actions org actions" + }, + { + "id": "list_allowlist", + "method": "GET", + "path": "/allowlists/{org}", + "summary": "List allowlist", + "description": "List Allowlist records in an organization.", + "tags": ["Allowlists"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "list allowlist list allowlist records in an organization. get allowlists org allowlists" + }, + { + "id": "list_artifacts", + "method": "GET", + "path": "/artifacts/{org}", + "summary": "List artifacts", + "description": "List artifacts in organization. Can be filtered by flow name or repo name.\n\n- The result is paginated.\n- The list of artifacts is sorted by creation time in descending order.", + "tags": ["Artifacts"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "flow_name", + "in": "query", + "required": false, + "description": "The name of the flow to list artifacts from", + "schema": { + "anyOf": [{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$"},{"type":"null"}], + "description": "The name of the flow to list artifacts from", + "title": "Flow Name" + } + }, + { + "name": "repo_name", + "in": "query", + "required": false, + "description": "The name of the repo to list artifacts from", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The name of the repo to list artifacts from", + "title": "Repo Name" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of response", + "schema": { + "type": "integer", + "description": "The page number of response", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many artifacts to return per page of response", + "schema": { + "type": "integer", + "description": "How many artifacts to return per page of response", + "default": 15, + "title": "Per Page" + } + } + ], + "requestBody": null, + "searchText": "list artifacts list artifacts in organization. can be filtered by flow name or repo name.\n\n- the result is paginated.\n- the list of artifacts is sorted by creation time in descending order. get artifacts org artifacts" + }, + { + "id": "list_artifacts_by_commit_sha", + "method": "GET", + "path": "/artifacts/{org}/{flow_name}/commit_sha/{commit_sha}", + "summary": "Get artifacts by commit SHA", + "description": "Get artifact by commit sha.", + "tags": ["Artifacts"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", + "title": "Flow Name" + } + }, + { + "name": "commit_sha", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Commit Sha"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "trail", + "in": "query", + "required": false, + "description": "The name of the trail the artifact was reported to.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The name of the trail the artifact was reported to.", + "title": "Trail" + } + } + ], + "requestBody": null, + "searchText": "get artifacts by commit sha get artifact by commit sha. get artifacts org flow_name commit_sha commit_sha artifacts" + }, + { + "id": "list_attestations", + "method": "GET", + "path": "/attestations/{org}", + "summary": "List attestations", + "description": "Get a paginated list of attestations for an organization based on filters\nprovided as query parameters.", + "tags": ["Attestation"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "attestation_id", + "in": "query", + "required": false, + "description": "The attestation ID to search for", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The attestation ID to search for", + "title": "Attestation Id" + } + }, + { + "name": "name", + "in": "query", + "required": false, + "description": "Filter by exact attestation name. Cannot be combined with name_regex.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by exact attestation name. Cannot be combined with name_regex.", + "title": "Name" + } + }, + { + "name": "name_regex", + "in": "query", + "required": false, + "description": "Filter by attestation name (substring regex match)", + "schema": { + "anyOf": [{"type":"string","maxLength":256},{"type":"null"}], + "description": "Filter by attestation name (substring regex match)", + "title": "Name Regex" + } + }, + { + "name": "flow", + "in": "query", + "required": false, + "description": "Filter by flow name. Repeat the parameter to match several flows.", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by flow name. Repeat the parameter to match several flows.", + "title": "Flow" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter by attestation type. Use built-in types (e.g. 'junit', 'decision') or 'custom:' for custom types. Repeat the parameter to match several types.", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by attestation type. Use built-in types (e.g. 'junit', 'decision') or 'custom:' for custom types. Repeat the parameter to match several types.", + "title": "Type" + } + }, + { + "name": "is_compliant", + "in": "query", + "required": false, + "description": "Filter by compliance state. Omit to include both compliant and non-compliant.", + "schema": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "description": "Filter by compliance state. Omit to include both compliant and non-compliant.", + "title": "Is Compliant" + } + }, + { + "name": "from_timestamp", + "in": "query", + "required": false, + "description": "From timestamp filter. Example: ?from_timestamp=1675167540", + "schema": { + "anyOf": [{"type":"integer"},{"type":"null"}], + "description": "From timestamp filter. Example: ?from_timestamp=1675167540", + "title": "From Timestamp" + } + }, + { + "name": "to_timestamp", + "in": "query", + "required": false, + "description": "To timestamp filter. Example: ?to_timestamp=1675167540", + "schema": { + "anyOf": [{"type":"integer"},{"type":"null"}], + "description": "To timestamp filter. Example: ?to_timestamp=1675167540", + "title": "To Timestamp" + } + }, + { + "name": "after", + "in": "query", + "required": false, + "description": "Cursor for the next page. Use the token from a previous response's _links.next; omit for the first page.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Cursor for the next page. Use the token from a previous response's _links.next; omit for the first page.", + "title": "After" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many results to return per page of response (max 100)", + "schema": { + "anyOf": [{"type":"integer","maximum":100,"minimum":1},{"type":"null"}], + "description": "How many results to return per page of response (max 100)", + "default": 20, + "title": "Per Page" + } + } + ], + "requestBody": null, + "searchText": "list attestations get a paginated list of attestations for an organization based on filters\nprovided as query parameters. get attestations org attestation" + }, + { + "id": "list_attestations_for_criteria", + "method": "GET", + "path": "/attestations/{org}/list_attestations_for_criteria", + "summary": "List attestations for criteria", + "description": "List attestations matching a search criteria within an organization.\n\nThis endpoint returns a dictionary mapping commit SHAs to lists of attestations.\nEach attestation contains metadata about compliance, timing, and type-specific data.\n\n`commit_list` is required; it scopes the search to a specific set of commits.\n`attestation_type`, `attestation_name`, and `flow_name` further narrow results\nwithin that commit set but cannot be used on their own.\n\n## Usage Examples\n\n### Get all attestations for a list of commits\n```\nGET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6\n```\n\n### Narrow by flow and attestation type\n```\nGET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&flow_name=production-flow&attestation_type=snyk\n```\n\n### Narrow by attestation name\n```\nGET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_name=manual-test\n```\n\n### Narrow by custom attestation type\n```\nGET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_type=custom:security-scan\n```", + "tags": ["Attestation"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "flow_name", + "in": "query", + "required": false, + "description": "The flow name to search for attestations in", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The flow name to search for attestations in", + "title": "Flow Name" + } + }, + { + "name": "commit_list", + "in": "query", + "required": false, + "description": "The commit list that the attestations are associated with", + "schema": { + "anyOf": [ + {"type":"array","items":{"type":"string","pattern":"^[a-f0-9]{40}$"}}, + {"type":"null"} + ], + "description": "The commit list that the attestations are associated with", + "title": "Commit List" + } + }, + { + "name": "attestation_name", + "in": "query", + "required": false, + "description": "The attestation name to search for", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The attestation name to search for", + "title": "Attestation Name" + } + }, + { + "name": "attestation_id", + "in": "query", + "required": false, + "description": "The attestation ID to search for. Not yet supported on this endpoint — currently ignored.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The attestation ID to search for. Not yet supported on this endpoint — currently ignored.", + "title": "Attestation Id" + } + }, + { + "name": "attestation_type", + "in": "query", + "required": false, + "description": "The attestation type to search for. Use built-in types (e.g., 'junit'), a system type name (e.g., 'decision') or 'custom:' for custom types.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The attestation type to search for. Use built-in types (e.g., 'junit'), a system type name (e.g., 'decision') or 'custom:' for custom types.", + "title": "Attestation Type" + } + } + ], + "requestBody": null, + "searchText": "list attestations for criteria list attestations matching a search criteria within an organization.\n\nthis endpoint returns a dictionary mapping commit shas to lists of attestations.\neach attestation contains metadata about compliance, timing, and type-specific data.\n\n`commit_list` is required; it scopes the search to a specific set of commits.\n`attestation_type`, `attestation_name`, and `flow_name` further narrow results\nwithin that commit set but cannot be used on their own.\n\n## usage examples\n\n### get all attestations for a list of commits\n```\nget /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6\n```\n\n### narrow by flow and attestation type\n```\nget /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&flow_name=production-flow&attestation_type=snyk\n```\n\n### narrow by attestation name\n```\nget /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_name=manual-test\n```\n\n### narrow by custom attestation type\n```\nget /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_type=custom:security-scan\n``` get attestations org list_attestations_for_criteria attestation" + }, + { + "id": "list_audit_log", + "method": "GET", + "path": "/membership-audit-log/{org}", + "summary": "List membership/role change history for an org", + "description": "", + "tags": ["Audit Log"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of events per page", + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Number of events per page", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "description": "Filter by affected user or actor (name substring)", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by affected user or actor (name substring)", + "title": "Search" + } + }, + { + "name": "event_type", + "in": "query", + "required": false, + "description": "Filter by event type: added, changed, or removed", + "schema": { + "anyOf": [ + {"type":"string","enum":["added","changed","removed"],"title":"AuditEventType"}, + {"type":"null"} + ], + "description": "Filter by event type: added, changed, or removed", + "title": "Event Type" + } + }, + { + "name": "role", + "in": "query", + "required": false, + "description": "Filter by new role. Can be repeated.", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by new role. Can be repeated.", + "title": "Role" + } + }, + { + "name": "source", + "in": "query", + "required": false, + "description": "Filter by source (app/scim/invitation/script). Repeatable.", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by source (app/scim/invitation/script). Repeatable.", + "title": "Source" + } + }, + { + "name": "from_timestamp", + "in": "query", + "required": false, + "description": "Only events at or after this unix timestamp", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Only events at or after this unix timestamp", + "title": "From Timestamp" + } + }, + { + "name": "to_timestamp", + "in": "query", + "required": false, + "description": "Only events at or before this unix timestamp", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Only events at or before this unix timestamp", + "title": "To Timestamp" + } + }, + { + "name": "sort_by", + "in": "query", + "required": false, + "description": "Column to sort by", + "schema": { + "type": "string", + "enum": ["when","user","role","changed_by","source"], + "title": "AuditSortBy", + "description": "Column to sort by", + "default": "when" + } + }, + { + "name": "sort_dir", + "in": "query", + "required": false, + "description": "Sort direction", + "schema": { + "type": "string", + "enum": ["asc","desc"], + "title": "SortDir", + "description": "Sort direction", + "default": "desc" + } + } + ], + "requestBody": null, + "searchText": "list membership/role change history for an org get membership-audit-log org audit log" + }, + { + "id": "list_builds", + "method": "GET", + "path": "/builds/{org}", + "summary": "List Builds", + "description": "List builds for an organization.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", + "tags": ["Builds"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of builds per page", + "schema": { + "type": "integer", + "maximum": 50, + "minimum": 0, + "description": "Number of builds per page", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "repo_id", + "in": "query", + "required": false, + "description": "Filter by external VCS repo ID", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by external VCS repo ID", + "title": "Repo Id" + } + }, + { + "name": "repo_name", + "in": "query", + "required": false, + "description": "Filter by repo name (e.g. 'cyber-dojo/differ')", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by repo name (e.g. 'cyber-dojo/differ')", + "title": "Repo Name" + } + }, + { + "name": "repo_inner_id", + "in": "query", + "required": false, + "description": "Filter by the repo's internal id (the `id` in the repo response). The stable identifier: unaffected by repo renames or a missing external VCS id.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by the repo's internal id (the `id` in the repo response). The stable identifier: unaffected by repo renames or a missing external VCS id.", + "title": "Repo Inner Id" + } + }, + { + "name": "start_ts", + "in": "query", + "required": false, + "description": "Include builds created at or after this timestamp. Defaults to 28 days before end_ts", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include builds created at or after this timestamp. Defaults to 28 days before end_ts", + "title": "Start Ts" + } + }, + { + "name": "end_ts", + "in": "query", + "required": false, + "description": "Include builds created at or before this timestamp. Defaults to now", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include builds created at or before this timestamp. Defaults to now", + "title": "End Ts" + } + } + ], + "requestBody": null, + "searchText": "list builds list builds for an organization.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get builds org builds" + }, + { + "id": "list_control_decisions", + "method": "GET", + "path": "/controls/{org}/{identifier}/decisions", + "summary": "List decisions for a control", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Identifier"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of decisions per page", + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Number of decisions per page", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "is_compliant", + "in": "query", + "required": false, + "description": "Filter by compliance status", + "schema": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "description": "Filter by compliance status", + "title": "Is Compliant" + } + }, + { + "name": "from_timestamp", + "in": "query", + "required": false, + "description": "Filter decisions recorded at or after this Unix timestamp", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Filter decisions recorded at or after this Unix timestamp", + "title": "From Timestamp" + } + }, + { + "name": "to_timestamp", + "in": "query", + "required": false, + "description": "Filter decisions recorded at or before this Unix timestamp", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Filter decisions recorded at or before this Unix timestamp", + "title": "To Timestamp" + } + }, + { + "name": "flow_id", + "in": "query", + "required": false, + "description": "Filter decisions to these flows. Can be repeated, e.g. flow_id=&flow_id=", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter decisions to these flows. Can be repeated, e.g. flow_id=&flow_id=", + "title": "Flow Id" + } + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "description": "Sort by decision time: desc (newest first) or asc (oldest first)", + "schema": { + "type": "string", + "enum": ["asc","desc"], + "title": "SortDirection", + "description": "Sort by decision time: desc (newest first) or asc (oldest first)", + "default": "desc" + } + } + ], + "requestBody": null, + "searchText": "list decisions for a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier decisions controls" + }, + { + "id": "list_control_tag_choices", + "method": "GET", + "path": "/controls/{org}/tags", + "summary": "List distinct tag key/value pairs for an org's controls", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "list distinct tag key/value pairs for an org's controls **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org tags controls" + }, + { + "id": "list_control_versions", + "method": "GET", + "path": "/controls/{org}/{identifier}/versions", + "summary": "List versions of a control", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Identifier"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of versions per page", + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Number of versions per page", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "description": "Sort direction by version number", + "schema": { + "type": "string", + "enum": ["asc","desc"], + "title": "SortDirection", + "description": "Sort direction by version number", + "default": "desc" + } + } + ], + "requestBody": null, + "searchText": "list versions of a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org identifier versions controls" + }, + { + "id": "list_controls", + "method": "GET", + "path": "/controls/{org}", + "summary": "List controls", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of controls per page", + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Number of controls per page", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "description": "Sort direction", + "schema": { + "type": "string", + "enum": ["asc","desc"], + "title": "SortDirection", + "description": "Sort direction", + "default": "asc" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "description": "Filter by name or identifier (case-insensitive substring match on either field)", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by name or identifier (case-insensitive substring match on either field)", + "title": "Search" + } + }, + { + "name": "tag", + "in": "query", + "required": false, + "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=framework or tag=framework:finos-sdlc", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=framework or tag=framework:finos-sdlc", + "title": "Tag" + } + }, + { + "name": "archived", + "in": "query", + "required": false, + "description": "Return archived controls when true", + "schema": { + "type": "boolean", + "description": "Return archived controls when true", + "default": false, + "title": "Archived" + } + } + ], + "requestBody": null, + "searchText": "list controls **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get controls org controls" + }, + { + "id": "list_custom_attestation_types", + "method": "GET", + "path": "/custom-attestation-types/{org}", + "summary": "List custom attestation types", + "description": "List all custom attestation types for an org.", + "tags": ["Custom Attestation Types"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "list custom attestation types list all custom attestation types for an org. get custom-attestation-types org custom attestation types" + }, + { + "id": "list_deployments", + "method": "GET", + "path": "/deployments/{org}", + "summary": "List Deployments", + "description": "List deployments for an organization.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", + "tags": ["Deployments"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of deployments per page", + "schema": { + "type": "integer", + "maximum": 50, + "minimum": 0, + "description": "Number of deployments per page", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "repo_name", + "in": "query", + "required": false, + "description": "Filter by repo name (e.g. 'kosli-dev/server')", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by repo name (e.g. 'kosli-dev/server')", + "title": "Repo Name" + } + }, + { + "name": "env_name", + "in": "query", + "required": false, + "description": "Filter by environment name", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by environment name", + "title": "Env Name" + } + }, + { + "name": "start_ts", + "in": "query", + "required": false, + "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", + "title": "Start Ts" + } + }, + { + "name": "end_ts", + "in": "query", + "required": false, + "description": "Include deployments at or before this timestamp. Defaults to now", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include deployments at or before this timestamp. Defaults to now", + "title": "End Ts" + } + } + ], + "requestBody": null, + "searchText": "list deployments list deployments for an organization.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get deployments org deployments" + }, + { + "id": "list_environment_deployments", + "method": "GET", + "path": "/environments/{org}/{env_name}/deployments", + "summary": "List deployments for an environment", + "description": "List deployments for a single environment within a time range, newest first.", + "tags": ["Environments"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "from", + "in": "query", + "required": false, + "description": "Start of time range, ISO-8601 (Default: 30 days ago)", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Start of time range, ISO-8601 (Default: 30 days ago)", + "title": "From" + } + }, + { + "name": "to", + "in": "query", + "required": false, + "description": "End of time range, ISO-8601 (Default: now)", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "End of time range, ISO-8601 (Default: now)", + "title": "To" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "page_size", + "in": "query", + "required": false, + "description": "Deployments per page", + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Deployments per page", + "default": 50, + "title": "Page Size" + } + } + ], + "requestBody": null, + "searchText": "list deployments for an environment list deployments for a single environment within a time range, newest first. get environments org env_name deployments environments" + }, + { + "id": "list_environment_events", + "method": "GET", + "path": "/environments/{org}/{env_name}/events", + "summary": "List environment events", + "description": "Get events log for an environment.\n\n**Response Headers:**\n\n* `X-Total-Count`: Total number of events available\n* `X-Per-Page`: Number of events per page\n* `X-Current-Page`: Current page number\n* `X-Total-Pages`: Total number of pages\n* `Link`: Pagination links (first, prev, next, last) when applicable\n\n**Pagination Links Format:**\n```\n; rel=\"first\",\n; rel=\"prev\",\n; rel=\"next\",\n; rel=\"last\"\n```\n\n**Note:** The Link header is only included when there are multiple pages.", + "tags": ["Environments"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "interval", + "in": "query", + "required": false, + "description": "Deprecated, use 'start' and 'end' instead. Expression to specify the interval of snapshots to query.\nMust be two snapshot expressions separated by '..'\nie: '5..10', or '~5..NOW'", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Deprecated, use 'start' and 'end' instead. Expression to specify the interval of snapshots to query.\nMust be two snapshot expressions separated by '..'\nie: '5..10', or '~5..NOW'", + "deprecated": true, + "title": "Interval" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of response.", + "schema": { + "type": "integer", + "minimum": 1, + "description": "The page number of response.", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many results to return per page of response. min: 1, max: 100", + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many results to return per page of response. min: 1, max: 100", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "description": "Return results in reverse order. Expected values: True or False. Defaults to False.", + "schema": { + "type": "boolean", + "description": "Return results in reverse order. Expected values: True or False. Defaults to False.", + "default": false, + "title": "Reverse" + } + }, + { + "name": "repo_name", + "in": "query", + "required": false, + "description": "Filter events by repo name. Can be repeated for multiple repos, e.g. repo_name=repo1&repo_name=repo2", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter events by repo name. Can be repeated for multiple repos, e.g. repo_name=repo1&repo_name=repo2", + "title": "Repo Name" + } + }, + { + "name": "start_ts", + "in": "query", + "required": false, + "description": "The start of the interval as a UNIX timestamp. When provided, this takes precedence over the 'start' parameter. e.g. start_ts=1719638400", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "The start of the interval as a UNIX timestamp. When provided, this takes precedence over the 'start' parameter. e.g. start_ts=1719638400", + "title": "Start Ts" + } + }, + { + "name": "end_ts", + "in": "query", + "required": false, + "description": "The end of the interval as a UNIX timestamp. When provided, this takes precedence over the 'end' parameter. e.g. end_ts=1719638400", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "The end of the interval as a UNIX timestamp. When provided, this takes precedence over the 'end' parameter. e.g. end_ts=1719638400", + "title": "End Ts" + } + }, + { + "name": "start", + "in": "query", + "required": false, + "description": "The start of the interval to query. Can be a positive snapshot index (1, 2, etc.), negative snapshot index (-1 for latest, -2 for second latest, etc.), or time reference ['NOW', '1hour', '1h', '2days', '30mins'].", + "schema": { + "type": "string", + "description": "The start of the interval to query. Can be a positive snapshot index (1, 2, etc.), negative snapshot index (-1 for latest, -2 for second latest, etc.), or time reference ['NOW', '1hour', '1h', '2days', '30mins'].", + "default": "1", + "title": "Start" + } + }, + { + "name": "end", + "in": "query", + "required": false, + "description": "The end of the interval to query. Can be a positive snapshot index (1, 2, etc.), negative snapshot index (-1 for latest, -2 for second latest, etc.), or time reference ['NOW', '1hour', '1h', '2days', '30mins'].", + "schema": { + "type": "string", + "description": "The end of the interval to query. Can be a positive snapshot index (1, 2, etc.), negative snapshot index (-1 for latest, -2 for second latest, etc.), or time reference ['NOW', '1hour', '1h', '2days', '30mins'].", + "default": "NOW", + "title": "End" + } + } + ], + "requestBody": null, + "searchText": "list environment events get events log for an environment.\n\n**response headers:**\n\n* `x-total-count`: total number of events available\n* `x-per-page`: number of events per page\n* `x-current-page`: current page number\n* `x-total-pages`: total number of pages\n* `link`: pagination links (first, prev, next, last) when applicable\n\n**pagination links format:**\n```\n; rel=\"first\",\n; rel=\"prev\",\n; rel=\"next\",\n; rel=\"last\"\n```\n\n**note:** the link header is only included when there are multiple pages. get environments org env_name events environments" + }, + { + "id": "list_environment_notifications", + "method": "GET", + "path": "/organizations/{org}/environments_notifications", + "summary": "List environment notifications", + "description": "List environments-notifications for an org.", + "tags": ["Organizations"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "list environment notifications list environments-notifications for an org. get organizations org environments_notifications organizations" + }, + { + "id": "list_environments", + "method": "GET", + "path": "/environments/{org}", + "summary": "List environments", + "description": "List environments of an organization.", + "tags": ["Environments"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], + "description": "Page number", + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of environments per page", + "schema": { + "anyOf": [{"type":"integer","maximum":50,"minimum":1},{"type":"null"}], + "description": "Number of environments per page", + "title": "Per Page" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "description": "Sort field", + "schema": { + "type": "string", + "enum": ["name","last_modified_at","last_changed_at"], + "title": "EnvironmentSortField", + "description": "Sort field", + "default": "name" + } + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "description": "Sort direction", + "schema": { + "type": "string", + "enum": ["asc","desc"], + "title": "SortDirection", + "description": "Sort direction", + "default": "asc" + } + }, + { + "name": "space_id", + "in": "query", + "required": false, + "description": "Filter by space ID. Can be repeated for OR semantics, e.g. space_id=a&space_id=b", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by space ID. Can be repeated for OR semantics, e.g. space_id=a&space_id=b", + "title": "Space Id" + } + }, + { + "name": "name", + "in": "query", + "required": false, + "description": "Filter by name (case-insensitive substring match)", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by name (case-insensitive substring match)", + "title": "Name" + } + }, + { + "name": "type", + "in": "query", + "required": false, + "description": "Filter by environment type. Can be repeated, e.g. type=K8S&type=ECS", + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "K8S", + "ECS", + "S3", + "lambda", + "server", + "docker", + "azure-apps", + "cloud-run", + "logical" + ], + "title": "EnvironmentTypeFilter" + } + }, + {"type":"null"} + ], + "description": "Filter by environment type. Can be repeated, e.g. type=K8S&type=ECS", + "title": "Type" + } + }, + { + "name": "tag", + "in": "query", + "required": false, + "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:platform", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:platform", + "title": "Tag" + } + } + ], + "requestBody": null, + "searchText": "list environments list environments of an organization. get environments org environments" + }, + { + "id": "list_evaluations", + "method": "GET", + "path": "/evaluations/{org}", + "summary": "List evaluations", + "description": "**Beta** — the Server-side evaluation feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Evaluations"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "after", + "in": "query", + "required": false, + "description": "Cursor for the next page of older evaluations. Use the token from a response's _links.next; omit for the newest page.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Cursor for the next page of older evaluations. Use the token from a response's _links.next; omit for the newest page.", + "title": "After" + } + }, + { + "name": "before", + "in": "query", + "required": false, + "description": "Cursor for the previous page of newer evaluations. Use the token from a response's _links.prev. Cannot be combined with after.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Cursor for the previous page of newer evaluations. Use the token from a response's _links.prev. Cannot be combined with after.", + "title": "Before" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many evaluations to return per page (max 100)", + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many evaluations to return per page (max 100)", + "default": 20, + "title": "Per Page" + } + } + ], + "requestBody": null, + "searchText": "list evaluations **beta** — the server-side evaluation feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get evaluations org evaluations" + }, + { + "id": "list_flow_attestations", + "method": "GET", + "path": "/attestations/{org}/{flow_name}", + "summary": "List flow attestations", + "description": "Get all attestations for a flow for a given time span.", + "tags": ["Attestation"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of response", + "schema": { + "anyOf": [{"type":"integer"},{"type":"null"}], + "description": "The page number of response", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many results to return per page of response", + "schema": { + "anyOf": [{"type":"integer"},{"type":"null"}], + "description": "How many results to return per page of response", + "default": 20, + "title": "Per Page" + } + }, + { + "name": "from_timestamp", + "in": "query", + "required": false, + "description": "From timestamp filter. Example: ?from_timestamp=1675167540", + "schema": { + "anyOf": [{"type":"integer"},{"type":"null"}], + "description": "From timestamp filter. Example: ?from_timestamp=1675167540", + "title": "From Timestamp" + } + }, + { + "name": "to_timestamp", + "in": "query", + "required": false, + "description": "To timestamp filter. Example: ?to_timestamp=1675167540", + "schema": { + "anyOf": [{"type":"integer"},{"type":"null"}], + "description": "To timestamp filter. Example: ?to_timestamp=1675167540", + "title": "To Timestamp" + } + } + ], + "requestBody": null, + "searchText": "list flow attestations get all attestations for a flow for a given time span. get attestations org flow_name attestation" + }, + { + "id": "list_flows", + "method": "GET", + "path": "/flows/{org}", + "summary": "List flows", + "description": "List flows for an organization.", + "tags": ["Flows"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "search_by_name", + "in": "query", + "required": false, + "description": "Return flows that contain the given string in their name. Matched literally, so '-prod' finds the flows whose name ends in '-prod'.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Return flows that contain the given string in their name. Matched literally, so '-prod' finds the flows whose name ends in '-prod'.", + "title": "Search By Name" + } + }, + { + "name": "case_sensitive", + "in": "query", + "required": false, + "description": "Whether the search_by_name filter is case sensitive. Defaults to true.", + "schema": { + "type": "boolean", + "description": "Whether the search_by_name filter is case sensitive. Defaults to true.", + "default": true, + "title": "Case Sensitive" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of response", + "schema": { + "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], + "description": "The page number of response", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many results to return per page. When omitted, all flows are returned as a plain list (no pagination envelope).", + "schema": { + "anyOf": [{"type":"integer","maximum":100,"minimum":1},{"type":"null"}], + "description": "How many results to return per page. When omitted, all flows are returned as a plain list (no pagination envelope).", + "title": "Per Page" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "description": "Sort field", + "schema": { + "type": "string", + "enum": ["name","latest_activity"], + "title": "FlowSortField", + "description": "Sort field", + "default": "name" + } + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "description": "Sort direction", + "schema": { + "type": "string", + "enum": ["asc","desc"], + "title": "SortDirection", + "description": "Sort direction", + "default": "asc" + } + }, + { + "name": "space_id", + "in": "query", + "required": false, + "description": "Filter by space ID. Can be repeated for OR semantics, e.g. space_id=a&space_id=b", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by space ID. Can be repeated for OR semantics, e.g. space_id=a&space_id=b", + "title": "Space Id" + } + }, + { + "name": "tag", + "in": "query", + "required": false, + "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:platform", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:platform", + "title": "Tag" + } + } + ], + "requestBody": null, + "searchText": "list flows list flows for an organization. get flows org flows" + }, + { + "id": "list_policies", + "method": "GET", + "path": "/policies/{org}", + "summary": "List policies", + "description": "List Policies in an organization.", + "tags": ["Policies"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "list policies list policies in an organization. get policies org policies" + }, + { + "id": "list_repo_deployments", + "method": "GET", + "path": "/repos/{org}/{repo}/deployments", + "summary": "List deployments for a repo", + "description": "List deployments for a repo, identified by its internal `id` (the `{repo}`\npath segment), newest first.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts.", + "tags": ["Repos"], + "parameters": [ + { + "name": "repo", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Repo"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of deployments per page", + "schema": { + "type": "integer", + "maximum": 50, + "minimum": 0, + "description": "Number of deployments per page", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "env", + "in": "query", + "required": false, + "description": "Filter by environment name. Repeat to select several; omit for all environments the repo has been deployed to.", + "schema": { + "type": "array", + "items": {"type":"string"}, + "description": "Filter by environment name. Repeat to select several; omit for all environments the repo has been deployed to.", + "default": [], + "title": "Env" + } + }, + { + "name": "start_ts", + "in": "query", + "required": false, + "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include deployments at or after this timestamp. Defaults to 28 days before end_ts", + "title": "Start Ts" + } + }, + { + "name": "end_ts", + "in": "query", + "required": false, + "description": "Include deployments at or before this timestamp. Defaults to now", + "schema": { + "anyOf": [{"type":"number"},{"type":"null"}], + "description": "Include deployments at or before this timestamp. Defaults to now", + "title": "End Ts" + } + } + ], + "requestBody": null, + "searchText": "list deployments for a repo list deployments for a repo, identified by its internal `id` (the `{repo}`\npath segment), newest first.\n\n- end_ts defaults to now.\n- start_ts defaults to 28 days before end_ts. get repos org repo deployments repos" + }, + { + "id": "list_repo_filter_options", + "method": "GET", + "path": "/repos/{org}/filter-options", + "summary": "List repo filter options", + "description": "List the distinct facet values (providers, VCS instances, and namespace\nvalues) across the organization's repos, scoped by the given filters.\n\nUsed to populate the repos faceted filters. Each facet reflects every\nfilter except its own dimension, so alternative values stay visible (e.g.\nthe returned `providers` list isn't narrowed by the `provider` filter\nitself). `namespace_values` cascades: it returns the values one level below\n`namespace`, so drilling into a namespace reveals the next level.\n\nDeclared before the \"/{org}/{repo_name}\" route so the literal\n\"filter-options\" segment is not captured as a repo name.", + "tags": ["Repos"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "provider", + "in": "query", + "required": false, + "description": "Scope to repos with this VCS provider.", + "schema": { + "anyOf": [ + { + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ], + "type": "string" + }, + {"type":"null"} + ], + "description": "Scope to repos with this VCS provider.", + "title": "Provider" + } + }, + { + "name": "vcs_instance", + "in": "query", + "required": false, + "description": "Scope to repos with this VCS instance/host.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Scope to repos with this VCS instance/host.", + "title": "Vcs Instance" + } + }, + { + "name": "namespace", + "in": "query", + "required": false, + "description": "Scope to repos nested under this '/'-separated namespace prefix, e.g. platform/backend. The returned namespace_values are the distinct values one level below this prefix.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Scope to repos nested under this '/'-separated namespace prefix, e.g. platform/backend. The returned namespace_values are the distinct values one level below this prefix.", + "title": "Namespace" + } + }, + { + "name": "tag", + "in": "query", + "required": false, + "description": "Scope to repos matching this tag key or key:value. Can be repeated.", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Scope to repos matching this tag key or key:value. Can be repeated.", + "title": "Tag" + } + } + ], + "requestBody": null, + "searchText": "list repo filter options list the distinct facet values (providers, vcs instances, and namespace\nvalues) across the organization's repos, scoped by the given filters.\n\nused to populate the repos faceted filters. each facet reflects every\nfilter except its own dimension, so alternative values stay visible (e.g.\nthe returned `providers` list isn't narrowed by the `provider` filter\nitself). `namespace_values` cascades: it returns the values one level below\n`namespace`, so drilling into a namespace reveals the next level.\n\ndeclared before the \"/{org}/{repo_name}\" route so the literal\n\"filter-options\" segment is not captured as a repo name. get repos org filter-options repos" + }, + { + "id": "list_repo_tag_choices", + "method": "GET", + "path": "/repos/{org}/tags", + "summary": "List repo tag choices", + "description": "List the distinct tag key/value pairs across the organization's repos.\n\nUsed to populate the repos tag filter. Declared before the \"/{org}/{repo_name}\"\nroute so the literal \"tags\" segment is not captured as a repo name.", + "tags": ["Repos"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "list repo tag choices list the distinct tag key/value pairs across the organization's repos.\n\nused to populate the repos tag filter. declared before the \"/{org}/{repo_name}\"\nroute so the literal \"tags\" segment is not captured as a repo name. get repos org tags repos" + }, + { + "id": "list_repos", + "method": "GET", + "path": "/repos/{org}", + "summary": "List repos", + "description": "List repos for an organization.\n\nRepos are paginated.\n- The response includes pagination information and the list of repos.\n- The list of repos is sorted by the repo name; sort_direction selects the\n direction (asc = A–Z, the default; desc = Z–A).\n- Optional filters: name (exact match), search (case-insensitive substring\n match on the name), provider (VCS provider), repo_id (external repo ID),\n vcs_instance (VCS host, exact match), namespace (namespace prefix), and\n tag (key or key:value, repeatable).\n- name and search are mutually exclusive; providing both returns a 400.\n- repo_id is the stronger identifier as names of repos can change. So if repo_id is provided, name is ignored.\n\nRepos are captured when attestations include a reference to a repo.\nThis happens automatically when using Kosli CLI v2.11.35 or higher.", + "tags": ["Repos"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "Page number", + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of repos per page", + "schema": { + "type": "integer", + "maximum": 50, + "minimum": 1, + "description": "Number of repos per page", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "name", + "in": "query", + "required": false, + "description": "Filter by repo name (exact match). This is ignored if repo_id is provided. Returns empty list if no match. Mutually exclusive with search.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by repo name (exact match). This is ignored if repo_id is provided. Returns empty list if no match. Mutually exclusive with search.", + "title": "Name" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "description": "Filter by repo name (case-insensitive substring match). Mutually exclusive with name.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by repo name (case-insensitive substring match). Mutually exclusive with name.", + "title": "Search" + } + }, + { + "name": "provider", + "in": "query", + "required": false, + "description": "Filter by VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci).", + "schema": { + "anyOf": [ + { + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" ], - "description": "Attestation data in JSON format" + "type": "string" }, - "attachment_file": { - "anyOf": [ - {"type":"string","contentMediaType":"application/octet-stream"}, - {"type":"null"} - ], - "title": "Attachment File", - "description": "Optional attachment file (max size: 10MB)" - } - }, - "type": "object", - "required": ["data_json"], - "title": "Body_post_sonar_attestation" + {"type":"null"} + ], + "description": "Filter by VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci).", + "title": "Provider" + } + }, + { + "name": "repo_id", + "in": "query", + "required": false, + "description": "Filter by external repo ID (exact match). Returns empty list if no match.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by external repo ID (exact match). Returns empty list if no match.", + "title": "Repo Id" + } + }, + { + "name": "vcs_instance", + "in": "query", + "required": false, + "description": "Filter by VCS instance/host (exact match), e.g. gitlab.company.com.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by VCS instance/host (exact match), e.g. gitlab.company.com.", + "title": "Vcs Instance" + } + }, + { + "name": "namespace", + "in": "query", + "required": false, + "description": "Filter by namespace prefix, as a '/'-separated path, e.g. platform/backend. Matches repos nested anywhere under that path.", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter by namespace prefix, as a '/'-separated path, e.g. platform/backend. Matches repos nested anywhere under that path.", + "title": "Namespace" + } + }, + { + "name": "sort_direction", + "in": "query", + "required": false, + "description": "Sort direction by repo name: asc (A–Z, default) or desc (Z–A).", + "schema": { + "type": "string", + "enum": ["asc","desc"], + "title": "SortDirection", + "description": "Sort direction by repo name: asc (A–Z, default) or desc (Z–A).", + "default": "asc" + } + }, + { + "name": "tag", + "in": "query", + "required": false, + "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:security.", + "schema": { + "anyOf": [{"type":"array","items":{"type":"string"}},{"type":"null"}], + "description": "Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:security.", + "title": "Tag" + } + } + ], + "requestBody": null, + "searchText": "list repos list repos for an organization.\n\nrepos are paginated.\n- the response includes pagination information and the list of repos.\n- the list of repos is sorted by the repo name; sort_direction selects the\n direction (asc = a–z, the default; desc = z–a).\n- optional filters: name (exact match), search (case-insensitive substring\n match on the name), provider (vcs provider), repo_id (external repo id),\n vcs_instance (vcs host, exact match), namespace (namespace prefix), and\n tag (key or key:value, repeatable).\n- name and search are mutually exclusive; providing both returns a 400.\n- repo_id is the stronger identifier as names of repos can change. so if repo_id is provided, name is ignored.\n\nrepos are captured when attestations include a reference to a repo.\nthis happens automatically when using kosli cli v2.11.35 or higher. get repos org repos" + }, + { + "id": "list_service_account_api_keys", + "method": "GET", + "path": "/service-accounts/{org}/{name}/api-keys", + "summary": "List API keys for a service account", + "description": "List all active API keys for a service account.", + "tags": ["Service Accounts"], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "list api keys for a service account list all active api keys for a service account. get service-accounts org name api-keys service accounts" + }, + { + "id": "list_service_accounts", + "method": "GET", + "path": "/service-accounts/{org}", + "summary": "List service accounts in an organization", + "description": "List all service accounts in the organization.", + "tags": ["Service Accounts"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "list service accounts in an organization list all service accounts in the organization. get service-accounts org service accounts" + }, + { + "id": "list_snapshots", + "method": "GET", + "path": "/snapshots/{org}/{env_name}", + "summary": "List snapshots", + "description": "Get list of snapshots for an environment.", + "tags": ["Snapshots"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of response", + "schema": { + "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], + "description": "The page number of response", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many results to return per page of response", + "schema": { + "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], + "description": "How many results to return per page of response", + "default": 15, + "title": "Per Page" + } + }, + { + "name": "interval", + "in": "query", + "required": false, + "description": "Expression to specify the interval of snapshots to query.\nMust be two snapshot expressions separated by '..'\nie: '5..10', or '~5..NOW", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Expression to specify the interval of snapshots to query.\nMust be two snapshot expressions separated by '..'\nie: '5..10', or '~5..NOW", + "default": "1..NOW", + "title": "Interval" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "description": "Return results in reverse order. Expected values: True or False. Defaults to False.", + "schema": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "description": "Return results in reverse order. Expected values: True or False. Defaults to False.", + "default": false, + "title": "Reverse" } } ], - "searchText": "attest sonar scan add sonar attestation to a trail with an optional attachment file. post attestations org flow_name trail trail_name sonar attestation" + "requestBody": null, + "searchText": "list snapshots get list of snapshots for an environment. get snapshots org env_name snapshots" + }, + { + "id": "list_system_attestation_types", + "method": "GET", + "path": "/attestations/system-attestation-types", + "summary": "List system attestation types", + "description": "List all registered system attestation types with their per-version attestation_data schemas.", + "tags": ["Attestation"], + "parameters": [], + "requestBody": null, + "searchText": "list system attestation types list all registered system attestation types with their per-version attestation_data schemas. get attestations system-attestation-types attestation" + }, + { + "id": "list_trail_moments", + "method": "GET", + "path": "/trails/{org}/{flow_name}/{trail_name}/moments", + "summary": "List trail moments", + "description": "**Beta** — the Server-side evaluation feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Trails"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "trail_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Trail Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of response", + "schema": { + "type": "integer", + "minimum": 1, + "description": "The page number of response", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many results to return per page of response", + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "How many results to return per page of response", + "default": 10, + "title": "Per Page" + } + } + ], + "requestBody": null, + "searchText": "list trail moments **beta** — the server-side evaluation feature is in beta. requests from organizations without it enabled receive `403 forbidden`. get trails org flow_name trail_name moments trails" + }, + { + "id": "list_trails", + "method": "GET", + "path": "/trails/{org}/{flow_name}", + "summary": "List trails", + "description": "List Trails of a Flow.", + "tags": ["Trails"], + "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of response", + "schema": { + "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], + "description": "The page number of response", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many results to return per page of response", + "schema": { + "anyOf": [{"type":"integer","maximum":100,"minimum":1},{"type":"null"}], + "description": "How many results to return per page of response", + "title": "Per Page" + } + } + ], + "requestBody": null, + "searchText": "list trails list trails of a flow. get trails org flow_name trails" + }, + { + "id": "list_trails_for_org", + "method": "GET", + "path": "/trails/{org}", + "summary": "List trails for organization", + "description": "Get a paginated list of trails for an organization based on filters provided as query parameters.", + "tags": ["Trails"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + }, + { + "name": "flow", + "in": "query", + "required": false, + "description": "The name of the flow to filter trails by", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The name of the flow to filter trails by", + "title": "Flow" + } + }, + { + "name": "flow_tag", + "in": "query", + "required": false, + "description": "Filter trails by flows that have this tag (format: key=value, e.g., team=backend)", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "Filter trails by flows that have this tag (format: key=value, e.g., team=backend)", + "title": "Flow Tag" + } + }, + { + "name": "fingerprint", + "in": "query", + "required": false, + "description": "The fingerprint of the artifact reported to the trail or trails", + "schema": { + "anyOf": [{"type":"string"},{"type":"null"}], + "description": "The fingerprint of the artifact reported to the trail or trails", + "title": "Fingerprint" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "The page number of response", + "schema": { + "anyOf": [{"type":"integer","minimum":1},{"type":"null"}], + "description": "The page number of response", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "How many results to return per page of response", + "schema": { + "anyOf": [{"type":"integer","maximum":100,"minimum":1},{"type":"null"}], + "description": "How many results to return per page of response", + "default": 20, + "title": "Per Page" + } + } + ], + "requestBody": null, + "searchText": "list trails for organization get a paginated list of trails for an organization based on filters provided as query parameters. get trails org trails" }, { - "id": "post_system_attestation", + "id": "override_attestation", "method": "POST", - "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/system", - "summary": "Attest system", - "description": "Add a system attestation to a trail.", + "path": "/attestations/{org}/{flow_name}/trail/{trail_name}/override", + "summary": "Override attestation", + "description": "Override an attestation in a trail.", "tags": ["Attestation"], "parameters": [ { @@ -8229,219 +8030,202 @@ { "name": "body", "required": true, - "description": "Request body (multipart/form-data)", + "description": "Request body (application/json)", "schema": { + "allOf": [ + { + "if": { + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts","artifact_fingerprint"] + }, + "then": {"properties":{"target_artifacts":{"maxItems":1}}} + }, + { + "if": { + "not": {"required":["artifact_fingerprint"]}, + "properties": {"target_artifacts":{"minItems":1}}, + "required": ["target_artifacts"] + }, + "then": {"required":["git_commit_info"]} + } + ], "properties": { - "data_json": { - "allOf": [ + "attestation_name": { + "type": "string", + "pattern": "^[a-zA-Z0-9\\-_,]+$", + "title": "Attestation Name" + }, + "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "artifact_fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Artifact Fingerprint" + }, + "target_artifacts": { + "anyOf": [ + {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, + {"type":"null"} + ], + "title": "Target Artifacts" + }, + "git_commit_info": { + "anyOf": [ { - "if": { - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts","artifact_fingerprint"] + "properties": { + "sha1": {"type":"string","title":"Sha1"}, + "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, + "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, + "author_username": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Author Username" + }, + "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, + "timestamp": {"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timestamp"}, + "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, + "parents": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Parents" + }, + "verified": {"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Verified"}, + "signature_state": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Signature State" + } }, - "then": {"properties":{"target_artifacts":{"maxItems":1}}} + "type": "object", + "required": ["sha1"], + "title": "GitCommit" }, + {"type":"null"} + ] + }, + "repo_info": { + "anyOf": [ { - "if": { - "not": {"required":["artifact_fingerprint"]}, - "properties": {"target_artifacts":{"minItems":1}}, - "required": ["target_artifacts"] - }, - "then": {"required":["git_commit_info"]} - } - ], - "properties": { - "attestation_name": { - "type": "string", - "pattern": "^[a-zA-Z0-9\\-_,]+$", - "title": "Attestation Name" - }, - "origin_url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url"}, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "artifact_fingerprint": { - "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], - "title": "Artifact Fingerprint" - }, - "target_artifacts": { - "anyOf": [ - {"items":{"type":"string","pattern":"^[a-zA-Z0-9\\-_,]+$"},"type":"array"}, - {"type":"null"} - ], - "title": "Target Artifacts" - }, - "git_commit_info": { - "anyOf": [ - { - "properties": { - "sha1": {"type":"string","title":"Sha1"}, - "message": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}, - "author": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"}, - "author_username": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Author Username" - }, - "branch": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}, - "timestamp": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Timestamp" - }, - "url": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}, - "parents": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Parents" - }, - "verified": { - "anyOf": [{"type":"boolean"},{"type":"null"}], - "title": "Verified" + "properties": { + "name": {"type":"string","title":"Name"}, + "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, + "url": {"type":"string","title":"Url"}, + "description": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Description" + }, + "provider": { + "anyOf": [ + { + "type": "string", + "enum": [ + "github", + "gitlab", + "bitbucket", + "bitbucket_cloud", + "bitbucket_dc", + "azure-devops", + "azure_devops_services", + "azure_devops_server", + "circleci", + "git", + "subversion" + ] }, - "signature_state": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Signature State" - } - }, - "type": "object", - "required": ["sha1"], - "title": "GitCommit" + {"type":"null"} + ], + "title": "Provider" }, - {"type":"null"} - ] + "namespace_path": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Namespace Path" + }, + "additional_info": { + "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], + "title": "Additional Info" + } + }, + "type": "object", + "required": ["name","url"], + "title": "RepoInfoPostInput" }, - "repo_info": { - "anyOf": [ - { + {"type":"null"} + ] + }, + "external_urls": { + "anyOf": [ + { + "patternProperties": { + "^[^=.]+$": { "properties": { - "name": {"type":"string","title":"Name"}, - "id": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}, - "url": {"type":"string","title":"Url"}, - "description": { - "anyOf": [{"type":"string"},{"type":"null"}], - "title": "Description" - }, - "provider": { - "anyOf": [ - { - "type": "string", - "enum": [ - "github", - "gitlab", - "bitbucket", - "bitbucket_cloud", - "bitbucket_dc", - "azure-devops", - "azure_devops_services", - "azure_devops_server", - "circleci", - "git", - "subversion" - ] - }, - {"type":"null"} - ], - "title": "Provider" - }, - "namespace_path": { - "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], - "title": "Namespace Path" - }, - "additional_info": { - "anyOf": [{"additionalProperties":true,"type":"object"},{"type":"null"}], - "title": "Additional Info" + "href": {"type":"string","title":"Href"}, + "fingerprint": { + "anyOf": [{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"null"}], + "title": "Fingerprint" } }, + "additionalProperties": false, "type": "object", - "required": ["name","url"], - "title": "RepoInfoPostInput" - }, - {"type":"null"} - ] - }, - "external_urls": { - "anyOf": [ - { - "patternProperties": { - "^[^=.]+$": { - "properties": { - "href": {"type":"string","title":"Href"}, - "fingerprint": { - "anyOf": [ - {"type":"string","pattern":"^[a-f0-9]{64}$"}, - {"type":"null"} - ], - "title": "Fingerprint" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["href"], - "title": "ExternalAttachmentUrl" - } - }, - "type": "object" - }, - {"type":"null"} - ], - "title": "External Urls" - }, - "annotations": { - "anyOf": [ - {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, - {"type":"null"} - ], - "title": "Annotations" - }, - "user_data": { - "anyOf": [ - {"additionalProperties":true,"type":"object"}, - {"items":{},"type":"array"}, - {"type":"null"} - ], - "title": "User Data" + "required": ["href"], + "title": "ExternalAttachmentUrl" + } + }, + "type": "object" }, - "type_name": {"type":"string","enum":["decision"],"title":"Type Name"}, - "attestation_data": { - "type": "string", - "contentMediaType": "application/json", - "contentSchema": {}, - "title": "Attestation Data" - } - }, - "additionalProperties": true, - "type": "object", - "required": ["attestation_name","type_name","attestation_data"], - "title": "SystemAttestationPostInput", - "description": "Attestation data in JSON format" + {"type":"null"} + ], + "title": "External Urls" }, - "attachment_file": { + "annotations": { "anyOf": [ - {"type":"string","contentMediaType":"application/octet-stream"}, + {"patternProperties":{"^[A-Za-z0-9_]+$":{"type":"string"}},"type":"object"}, {"type":"null"} ], - "title": "Attachment File", - "description": "Optional attachment file (max size: 10MB)" + "title": "Annotations" + }, + "user_data": { + "anyOf": [ + {"additionalProperties":true,"type":"object"}, + {"items":{},"type":"array"}, + {"type":"null"} + ], + "title": "User Data" + }, + "reason": {"type":"string","title":"Reason"}, + "new_compliance_status": {"type":"boolean","title":"New Compliance Status"}, + "original_attestation_type": { + "anyOf": [ + {"type":"string","enum":["generic","junit","snyk","pull_request","jira","sonar"]}, + {"type":"string","pattern":"^custom:.*$"}, + {"type":"string","pattern":"^system:.*$"} + ], + "title": "Original Attestation Type" } }, + "additionalProperties": false, "type": "object", - "required": ["data_json"], - "title": "Body_post_system_attestation" + "required": [ + "attestation_name", + "reason", + "new_compliance_status", + "original_attestation_type" + ], + "title": "OverrideAttestationPostInput" } } ], - "searchText": "attest system add a system attestation to a trail. post attestations org flow_name trail trail_name system attestation" + "searchText": "override attestation override an attestation in a trail. post attestations org flow_name trail trail_name override attestation" }, { - "id": "put_control", + "id": "rename_environment", "method": "PUT", - "path": "/controls/{org}/{identifier}", - "summary": "Update a control", - "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", - "tags": ["Controls"], + "path": "/environments/{org}/{env_name}/rename", + "summary": "Rename environment", + "description": "Rename an environment", + "tags": ["Environments"], "parameters": [ { - "name": "identifier", + "name": "env_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Identifier"} + "schema": {"type":"string","title":"Env Name"} }, { "name": "org", @@ -8458,29 +8242,37 @@ "description": "Request body (application/json)", "schema": { "properties": { - "name": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}, - "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, - "links": { - "anyOf": [{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}], - "title": "Links" + "new_name": { + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_]*$", + "title": "New Name", + "description": "New environment name" } }, "additionalProperties": false, "type": "object", - "title": "ControlPutInput" + "required": ["new_name"], + "title": "RenameEnvironmentPutInput" } } ], - "searchText": "update a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. put controls org identifier controls" + "searchText": "rename environment rename an environment put environments org env_name rename environments" }, { - "id": "put_environment_notifications", + "id": "rename_flow", "method": "PUT", - "path": "/organizations/{org}/environments_notifications", - "summary": "Create or update environment notification", - "description": "Create or Update an environments-notification for an org.", - "tags": ["Organizations"], + "path": "/flows/{org}/{flow_name}/rename", + "summary": "Rename flow", + "description": "Rename a flow.\nThe flow will remain available under its old name until that name is taken by another flow.", + "tags": ["Flows"], "parameters": [ + { + "name": "flow_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Flow Name"} + }, { "name": "org", "in": "path", @@ -8496,162 +8288,140 @@ "description": "Request body (application/json)", "schema": { "properties": { - "name": { + "new_name": { "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~/]*$", - "title": "Name", - "examples": ["production-action"] + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", + "title": "New Name" + } + }, + "type": "object", + "required": ["new_name"], + "title": "RenameFlow" + } + } + ], + "searchText": "rename flow rename a flow.\nthe flow will remain available under its old name until that name is taken by another flow. put flows org flow_name rename flows" + }, + { + "id": "report_azure_apps_environment", + "method": "PUT", + "path": "/environments/{org}/{env_name}/report/azure-apps", + "summary": "Report Azure Web and Function Apps environment", + "description": "Process a report for an Azure Web and Function Apps environment.", + "tags": ["Environments"], + "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "type": { + "type": "string", + "const": "azure-apps", + "title": "Type", + "description": "Environment type", + "default": "azure-apps" }, - "targets": { + "artifacts": { "items": { - "anyOf": [ - { - "properties": { - "type": {"type":"string","const":"SLACK","title":"Type","default":"SLACK"}, - "last_success_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Success At" - }, - "last_failure_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Failure At" - }, - "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, - "context": { - "anyOf": [ - { - "properties": { - "channel_id": {"type":"string","title":"Channel Id"}, - "channel_name": {"type":"string","title":"Channel Name"}, - "team_id": {"type":"string","title":"Team Id"} - }, - "additionalProperties": false, - "type": "object", - "required": ["channel_id","channel_name","team_id"], - "title": "SlackAppContext" - }, - {"type":"null"} - ] - } + "properties": { + "digests": { + "additionalProperties": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{64}$"}, + {"type":"string","const":""} + ] }, - "additionalProperties": false, "type": "object", - "required": ["webhook"], - "title": "SlackActionTarget" + "title": "Digests", + "description": "Image name to sha256 fingerprint mapping" }, - { - "properties": { - "type": {"type":"string","const":"WEBHOOK","title":"Type","default":"WEBHOOK"}, - "last_success_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Success At" - }, - "last_failure_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Failure At" - }, - "webhook": {"type":"string","pattern":"^https://","title":"Webhook"}, - "payload_version": { - "type": "string", - "const": "1.0", - "title": "Payload Version", - "default": "1.0" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["webhook"], - "title": "WebhookActionTarget" + "digests_source": { + "type": "string", + "enum": ["acr","logs","kosli-cli"], + "title": "Digests Source", + "description": "Source of the digests. Valid values are ['acr', 'logs', 'kosli-cli']" }, - { - "properties": { - "type": {"type":"string","const":"EMAIL","title":"Type","default":"EMAIL"}, - "last_success_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Success At" - }, - "last_failure_at": { - "anyOf": [{"type":"number"},{"type":"null"}], - "title": "Last Failure At" - }, - "emails": { - "items": {"type":"string","format":"email"}, - "type": "array", - "title": "Emails" - } - }, - "additionalProperties": false, - "type": "object", - "required": ["emails"], - "title": "EmailActionTarget" + "app_name": { + "type": "string", + "title": "App Name", + "description": "Azure Web/Function app name" }, - { - "properties": { - "type": {"type":"string","enum":["SLACK","EMAIL","WEBHOOK"],"title":"Type"}, - "config": {"additionalProperties":true,"type":"object","title":"Config"}, - "context": { - "anyOf": [ - { - "properties": { - "channel_id": {"type":"string","title":"Channel Id"}, - "channel_name": {"type":"string","title":"Channel Name"}, - "team_id": {"type":"string","title":"Team Id"} - }, - "additionalProperties": false, - "type": "object", - "required": ["channel_id","channel_name","team_id"], - "title": "SlackAppContext" - }, - {"type":"null"} - ] - } - }, - "additionalProperties": false, - "type": "object", - "required": ["type","config"], - "title": "NestedConfigActionTarget", - "description": "The pre-v2 target shape, with the type's own fields nested under `config`.\n\nStill sent by the Slack app and by older callers, so it stays part of the\npublished contract instead of being accepted as an untyped object." + "app_kind": {"type":"string","title":"App Kind","description":"Azure app kind"}, + "creationTimestamp": { + "type": "integer", + "title": "Creationtimestamp", + "description": "Creation time stamp for the Web app in UTC" } - ] - }, - "type": "array", - "title": "Targets" - }, - "type": {"type":"string","const":"env","title":"Type","default":"env"}, - "environments": {"items":{"type":"string"},"type":"array","title":"Environments"}, - "triggers": { - "items": { - "type": "string", - "enum": [ - "ON_STARTED_ARTIFACT", - "ON_EXITED_ARTIFACT", - "ON_SCALED_ARTIFACT", - "ON_ALLOWED_ARTIFACT", - "ON_NON_COMPLIANT_ENV", - "ON_COMPLIANT_ENV" - ] + }, + "additionalProperties": false, + "type": "object", + "required": ["digests","digests_source","app_name","app_kind","creationTimestamp"], + "title": "AzureAppsArtifact", + "description": "Individual artifact in an Azure Web/Function Apps report" }, "type": "array", - "title": "Triggers" + "title": "Artifacts", + "description": "all artifacts in the report" } }, "additionalProperties": false, "type": "object", - "required": ["name","targets","environments","triggers"], - "title": "EnvActionPutInput" + "required": ["artifacts"], + "title": "AzureAppsReport", + "description": "Azure Web and Function Apps report containing artifacts", + "examples": [ + { + "artifacts": [ + { + "app_kind": "app", + "app_name": "my-azure-web-app", + "creationTimestamp": 1632122962, + "digests": { + "acme/myapp:1.0.0": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" + }, + "digests_source": "acr" + } + ] + } + ] } } ], - "searchText": "create or update environment notification create or update an environments-notification for an org. put organizations org environments_notifications organizations" + "searchText": "report azure web and function apps environment process a report for an azure web and function apps environment. put environments org env_name report azure-apps environments" }, { - "id": "put_policy", + "id": "report_cloud_run_environment", "method": "PUT", - "path": "/policies/{org}", - "summary": "Create or update policy", - "description": "Create or update a Policy in an organization.", - "tags": ["Policies"], + "path": "/environments/{org}/{env_name}/report/cloud-run", + "summary": "Report Cloud Run environment", + "description": "Process a report for a Google Cloud Run environment.", + "tags": ["Environments"], "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, { "name": "org", "in": "path", @@ -8664,70 +8434,116 @@ { "name": "body", "required": true, - "description": "Request body (multipart/form-data)", + "description": "Request body (application/json)", "schema": { "properties": { - "payload": { - "properties": { - "name": { - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~]*$", - "title": "Name", - "examples": ["production-policy"] - }, - "description": { - "type": "string", - "title": "Description", - "default": "", - "examples": ["some description"] + "type": { + "type": "string", + "const": "cloud-run", + "title": "Type", + "description": "Environment type", + "default": "cloud-run" + }, + "artifacts": { + "items": { + "properties": { + "digests": { + "additionalProperties": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{64}$"}, + {"type":"string","const":""} + ] + }, + "type": "object", + "title": "Digests", + "description": "Image name to sha256 fingerprint mapping" + }, + "creationTimestamp": { + "type": "integer", + "title": "Creationtimestamp", + "description": "Creation time stamp for the revision or job execution in UTC" + }, + "kind": { + "type": "string", + "enum": ["service","job"], + "title": "Kind", + "description": "Discriminator for the Cloud Run resource kind: \"service\" or \"job\"" + }, + "serviceName": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Servicename", + "description": "Cloud Run service name (kind=service)" + }, + "revisionName": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Revisionname", + "description": "Cloud Run revision name (kind=service)" + }, + "jobName": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Jobname", + "description": "Cloud Run job name (kind=job)" + } }, - "type": {"type":"string","const":"env","title":"Type","default":"env"}, - "comment": { - "type": "string", - "title": "Comment", - "default": "", - "examples": ["describe what you changed"] - } + "additionalProperties": false, + "type": "object", + "required": ["digests","creationTimestamp","kind"], + "title": "CloudRunArtifact", + "description": "Individual artifact (revision or job) in a Cloud Run report" }, - "additionalProperties": false, - "type": "object", - "required": ["name"], - "title": "PolicyPutInput", - "examples": [ - { - "comment": "Initial version", - "description": "Production environment policy", - "name": "production-policy", - "type": "env" - } - ], - "description": "Policy metadata in JSON format" - }, - "policy_file": { - "anyOf": [ - {"type":"string","contentMediaType":"application/octet-stream"}, - {"type":"null"} - ], - "title": "Policy File", - "description": "The YAML policy file to upload (max size: 10MB)" + "type": "array", + "title": "Artifacts", + "description": "all artifacts in the report" } }, + "additionalProperties": false, "type": "object", - "required": ["payload"], - "title": "Body_put_policy" + "required": ["artifacts"], + "title": "CloudRunReport", + "description": "Cloud Run report containing revision and job artifacts", + "examples": [ + { + "artifacts": [ + { + "creationTimestamp": 1632122962, + "digests": { + "europe-west1-docker.pkg.dev/proj/svc@sha256:c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" + }, + "kind": "service", + "revisionName": "hello-world-00007-abc", + "serviceName": "hello-world" + }, + { + "creationTimestamp": 1632122962, + "digests": { + "europe-west1-docker.pkg.dev/proj/job@sha256:1e54935005f517e13b0a104681d2aad9092a147ba7f3573a84c56dda8001f1dc": "1e54935005f517e13b0a104681d2aad9092a147ba7f3573a84c56dda8001f1dc" + }, + "jobName": "sandman-job", + "kind": "job" + } + ] + } + ] } } ], - "searchText": "create or update policy create or update a policy in an organization. put policies org policies" + "searchText": "report cloud run environment process a report for a google cloud run environment. put environments org env_name report cloud-run environments" }, { - "id": "put_user_default_org", + "id": "report_docker_environment", "method": "PUT", - "path": "/user/{org}", - "summary": "Set default organization", - "description": "Set a default org for the current user.", - "tags": ["User"], + "path": "/environments/{org}/{env_name}/report/docker", + "summary": "Report Docker environment", + "description": "Process a report for a Docker environment.", + "tags": ["Environments"], "parameters": [ + { + "name": "env_name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Env Name"} + }, { "name": "org", "in": "path", @@ -8736,15 +8552,74 @@ "schema": {"type":"string","title":"Org"} } ], - "requestBody": null, - "searchText": "set default organization set a default org for the current user. put user org user" + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "type": { + "type": "string", + "const": "docker", + "title": "Type", + "description": "Environment type", + "default": "docker" + }, + "artifacts": { + "items": { + "properties": { + "digests": { + "additionalProperties": {"type":"string","pattern":"^[a-f0-9]{64}$"}, + "type": "object", + "title": "Digests", + "description": "Image name to sha256 fingerprint mapping" + }, + "creationTimestamp": { + "type": "integer", + "title": "Creationtimestamp", + "description": "Creation time stamp for the container in UTC" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["digests","creationTimestamp"], + "title": "DockerArtifact", + "description": "Individual artifact in a Docker report" + }, + "type": "array", + "title": "Artifacts", + "description": "all artifacts in the report" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["artifacts"], + "title": "DockerReport", + "description": "Docker report containing artifacts", + "examples": [ + { + "artifacts": [ + { + "creationTimestamp": 1632122962, + "digests": { + "acme/myimage:1.0.0": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" + } + } + ] + } + ] + } + } + ], + "searchText": "report docker environment process a report for a docker environment. put environments org env_name report docker environments" }, { - "id": "rename_environment", + "id": "report_ecs_environment", "method": "PUT", - "path": "/environments/{org}/{env_name}/rename", - "summary": "Rename environment", - "description": "Rename an environment", + "path": "/environments/{org}/{env_name}/report/ECS", + "summary": "Report ECS environment", + "description": "Process a report for an ECS environment.", "tags": ["Environments"], "parameters": [ { @@ -8769,36 +8644,94 @@ "description": "Request body (application/json)", "schema": { "properties": { - "new_name": { + "type": { "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_]*$", - "title": "New Name", - "description": "New environment name" + "const": "ECS", + "title": "Type", + "description": "Environment type", + "default": "ECS" + }, + "artifacts": { + "items": { + "properties": { + "digests": { + "additionalProperties": { + "anyOf": [ + {"type":"string","pattern":"^[a-f0-9]{64}$"}, + {"type":"string","const":""} + ] + }, + "type": "object", + "title": "Digests", + "description": "Image name to sha256 fingerprint mapping" + }, + "taskArn": {"type":"string","title":"Taskarn","description":"AWS ECS task ARN"}, + "cluster_name": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Cluster Name", + "description": "AWS ECS cluster name" + }, + "service_name": { + "anyOf": [{"type":"string"},{"type":"null"}], + "title": "Service Name", + "description": "AWS ECS service name" + }, + "creationTimestamp": { + "type": "integer", + "title": "Creationtimestamp", + "description": "Creation time stamp for the task in UTC" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["digests","taskArn","creationTimestamp"], + "title": "ECSArtifact", + "description": "Individual artifact in an ECS report" + }, + "type": "array", + "title": "Artifacts", + "description": "all artifacts in the report" } }, "additionalProperties": false, "type": "object", - "required": ["new_name"], - "title": "RenameEnvironmentPutInput" + "required": ["artifacts"], + "title": "ECSReport", + "description": "ECS report containing artifacts", + "examples": [ + { + "artifacts": [ + { + "clusterName": "ecs-cluster", + "creationTimestamp": 1632122962, + "digests": { + "acme/hadroncollider:1.1.1": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" + }, + "serviceName": "ecs-service", + "taskArn": "arn:aws:ecs:eu-central-1:***:task/test/ef5609c25ad44aabb4bb518ac6573f8e" + } + ] + } + ] } } ], - "searchText": "rename environment rename an environment put environments org env_name rename environments" + "searchText": "report ecs environment process a report for an ecs environment. put environments org env_name report ecs environments" }, { - "id": "rename_flow", + "id": "report_k8s_environment", "method": "PUT", - "path": "/flows/{org}/{flow_name}/rename", - "summary": "Rename flow", - "description": "Rename a flow.\nThe flow will remain available under its old name until that name is taken by another flow.", - "tags": ["Flows"], + "path": "/environments/{org}/{env_name}/report/K8S", + "summary": "Report K8S environment", + "description": "Process a report for a K8S environment.", + "tags": ["Environments"], "parameters": [ { - "name": "flow_name", + "name": "env_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Flow Name"} + "schema": {"type":"string","title":"Env Name"} }, { "name": "org", @@ -8815,41 +8748,133 @@ "description": "Request body (application/json)", "schema": { "properties": { - "new_name": { + "type": { "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\.\\-_~]*$", - "title": "New Name" + "const": "K8S", + "title": "Type", + "description": "Environment type", + "default": "K8S" + }, + "artifacts": { + "items": { + "properties": { + "podName": {"type":"string","title":"Podname","description":"Name of pod"}, + "namespace": { + "type": "string", + "title": "Namespace", + "description": "Namespace of cluster" + }, + "digests": { + "additionalProperties": {"type":"string","pattern":"^[a-f0-9]{64}$"}, + "type": "object", + "title": "Digests", + "description": "Image name to sha256 fingerprint mapping" + }, + "creationTimestamp": { + "type": "integer", + "title": "Creationtimestamp", + "description": "Creation time stamp for the pod in UTC" + }, + "owners": { + "anyOf": [ + { + "items": { + "properties": { + "apiVersion": { + "type": "string", + "title": "Apiversion", + "description": "API version of the owner" + }, + "kind": { + "type": "string", + "title": "Kind", + "description": "Kind of the owner" + }, + "name": { + "type": "string", + "title": "Name", + "description": "Name of the owner" + }, + "uid": { + "type": "string", + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "title": "Uid", + "description": "UID of the owner" + }, + "controller": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Controller", + "description": "Whether the owner is a controller" + }, + "blockOwnerDeletion": { + "anyOf": [{"type":"boolean"},{"type":"null"}], + "title": "Blockownerdeletion", + "description": "Whether to block owner deletion" + } + }, + "additionalProperties": true, + "type": "object", + "required": ["apiVersion","kind","name","uid"], + "title": "K8SOwner", + "description": "Owner reference for a K8S pod" + }, + "type": "array" + }, + {"type":"null"} + ], + "title": "Owners", + "description": "Owner references for the pod" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["podName","namespace","digests","creationTimestamp"], + "title": "K8SArtifact", + "description": "Individual artifact (pod) in a K8S report" + }, + "type": "array", + "title": "Artifacts", + "description": "all artifacts in the report" } }, + "additionalProperties": false, "type": "object", - "required": ["new_name"], - "title": "RenameFlow" + "required": ["artifacts"], + "title": "K8SReport", + "description": "K8S report containing pod artifacts", + "examples": [ + { + "artifacts": [ + { + "creationTimestamp": 1632122962, + "digests": { + "acme/hadroncollider:1.1.1": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" + }, + "namespace": "default", + "podName": "my-pod-abc123" + } + ] + } + ] } } ], - "searchText": "rename flow rename a flow.\nthe flow will remain available under its old name until that name is taken by another flow. put flows org flow_name rename flows" + "searchText": "report k8s environment process a report for a k8s environment. put environments org env_name report k8s environments" }, { - "id": "rotate_service_account_api_key", - "method": "POST", - "path": "/service-accounts/{org}/{name}/api-keys/{key_id}/rotate", - "summary": "Rotate an API key for a service account", - "description": "Rotate an API key for a service account. A new key is generated immediately.\nThe old key remains valid for `grace_period_hours` (default 24) to allow\ntime to update dependent systems. The new key value is only returned once.", - "tags": ["Service Accounts"], + "id": "report_lambda_environment", + "method": "PUT", + "path": "/environments/{org}/{env_name}/report/lambda", + "summary": "Report Lambda environment", + "description": "Process a report for a Lambda environment.", + "tags": ["Environments"], "parameters": [ { - "name": "name", - "in": "path", - "required": true, - "description": "", - "schema": {"type":"string","title":"Name"} - }, - { - "name": "key_id", + "name": "env_name", "in": "path", "required": true, "description": "", - "schema": {"type":"string","title":"Key Id"} + "schema": {"type":"string","title":"Env Name"} }, { "name": "org", @@ -8866,29 +8891,63 @@ "description": "Request body (application/json)", "schema": { "properties": { - "grace_period_hours": { - "type": "integer", - "maximum": 720, - "minimum": 1, - "title": "Grace Period Hours", - "description": "Number of hours the old key remains valid after rotation. Defaults to 24.", - "default": 24 + "type": { + "type": "string", + "const": "lambda", + "title": "Type", + "description": "Environment type", + "default": "lambda" }, - "expires_at": { - "anyOf": [{"type":"integer","maximum":4102444800},{"type":"null"}], - "title": "Expires At", - "description": "Unix timestamp for the new key's expiry. Use 0 or omit for no expiry. Must not be in the past." + "artifacts": { + "items": { + "properties": { + "digests": { + "additionalProperties": {"type":"string","pattern":"^[a-f0-9]{64}$"}, + "type": "object", + "title": "Digests", + "description": "Function name to sha256 fingerprint mapping" + }, + "creationTimestamp": { + "type": "integer", + "title": "Creationtimestamp", + "description": "Creation time stamp for the function in UTC" + } + }, + "additionalProperties": false, + "type": "object", + "required": ["digests","creationTimestamp"], + "title": "LambdaArtifact", + "description": "Individual artifact in a Lambda report" + }, + "type": "array", + "title": "Artifacts", + "description": "all artifacts in the report" } }, + "additionalProperties": false, "type": "object", - "title": "ApiKeyRotateInput" + "required": ["artifacts"], + "title": "LambdaReport", + "description": "Lambda report containing artifacts", + "examples": [ + { + "artifacts": [ + { + "creationTimestamp": 1632122962, + "digests": { + "my-lambda-function": "c84295fa0722ab01c7e6e6472fbe6369cf40b1b302cf04bb06d97c820ce621a7" + } + } + ] + } + ] } } ], - "searchText": "rotate an api key for a service account rotate an api key for a service account. a new key is generated immediately.\nthe old key remains valid for `grace_period_hours` (default 24) to allow\ntime to update dependent systems. the new key value is only returned once. post service-accounts org name api-keys key_id rotate service accounts" + "searchText": "report lambda environment process a report for a lambda environment. put environments org env_name report lambda environments" }, { - "id": "s3_report", + "id": "report_s3_environment", "method": "PUT", "path": "/environments/{org}/{env_name}/report/S3", "summary": "Report S3 environment", @@ -8973,7 +9032,7 @@ "searchText": "report s3 environment process a report for an s3 environment. put environments org env_name report s3 environments" }, { - "id": "server_report", + "id": "report_server_environment", "method": "PUT", "path": "/environments/{org}/{env_name}/report/server", "summary": "Report server environment", @@ -9057,6 +9116,109 @@ ], "searchText": "report server environment process a report for a server environment. put environments org env_name report server environments" }, + { + "id": "rotate_service_account_api_key", + "method": "POST", + "path": "/service-accounts/{org}/{name}/api-keys/{key_id}/rotate", + "summary": "Rotate an API key for a service account", + "description": "Rotate an API key for a service account. A new key is generated immediately.\nThe old key remains valid for `grace_period_hours` (default 24) to allow\ntime to update dependent systems. The new key value is only returned once.", + "tags": ["Service Accounts"], + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Name"} + }, + { + "name": "key_id", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Key Id"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "grace_period_hours": { + "type": "integer", + "maximum": 720, + "minimum": 1, + "title": "Grace Period Hours", + "description": "Number of hours the old key remains valid after rotation. Defaults to 24.", + "default": 24 + }, + "expires_at": { + "anyOf": [{"type":"integer","maximum":4102444800},{"type":"null"}], + "title": "Expires At", + "description": "Unix timestamp for the new key's expiry. Must not be in the past. Omit to keep the current key's expiry, bounded to at most 365 days from now." + } + }, + "type": "object", + "title": "ApiKeyRotateInput" + } + } + ], + "searchText": "rotate an api key for a service account rotate an api key for a service account. a new key is generated immediately.\nthe old key remains valid for `grace_period_hours` (default 24) to allow\ntime to update dependent systems. the new key value is only returned once. post service-accounts org name api-keys key_id rotate service accounts" + }, + { + "id": "search_artifacts", + "method": "GET", + "path": "/search/{org}/sha/{search_value}", + "summary": "Search artifacts by SHA or fingerprint", + "description": "Get artifacts that match fingerprint or commit-sha.", + "tags": ["Search"], + "parameters": [ + { + "name": "search_value", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Search Value"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "search artifacts by sha or fingerprint get artifacts that match fingerprint or commit-sha. get search org sha search_value search" + }, + { + "id": "set_user_default_org", + "method": "PUT", + "path": "/user/{org}", + "summary": "Set default organization", + "description": "Set a default org for the current user.", + "tags": ["User"], + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": null, + "searchText": "set default organization set a default org for the current user. put user org user" + }, { "id": "unarchive_control", "method": "POST", @@ -9084,7 +9246,52 @@ "searchText": "unarchive a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. post controls org identifier unarchive controls" }, { - "id": "update_env", + "id": "update_control", + "method": "PUT", + "path": "/controls/{org}/{identifier}", + "summary": "Update a control", + "description": "**Beta** — the Controls feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.", + "tags": ["Controls"], + "parameters": [ + { + "name": "identifier", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Identifier"} + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "name": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}, + "description": {"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}, + "links": { + "anyOf": [{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}], + "title": "Links" + } + }, + "additionalProperties": false, + "type": "object", + "title": "ControlPutInput" + } + } + ], + "searchText": "update a control **beta** — the controls feature is in beta. requests from organizations without it enabled receive `403 forbidden`. put controls org identifier controls" + }, + { + "id": "update_environment", "method": "PATCH", "path": "/environments/{org}/{env_name}", "summary": "Update environment", @@ -9369,5 +9576,72 @@ } ], "searchText": "update a service account update a service account's description and/or privilege. sending\n`description: null` clears the description; omitting the field leaves\nit unchanged. patch service-accounts org name service accounts" + }, + { + "id": "update_tags", + "method": "PATCH", + "path": "/tags/{org}/{resource_type}/{resource_id}", + "summary": "Update tags", + "description": "Patch tags for resource.", + "tags": ["Tags"], + "parameters": [ + { + "name": "resource_id", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Resource Id"} + }, + { + "name": "resource_type", + "in": "path", + "required": true, + "description": "The type of resource to tag. Singular and plural forms are accepted. Supported types are:\n- `flow` / `flows`\n- `environment` / `environments` (also `env`)\n- `repo` / `repos`\n- `control` / `controls`", + "schema": { + "type": "string", + "description": "The type of resource to tag. Singular and plural forms are accepted. Supported types are:\n- `flow` / `flows`\n- `environment` / `environments` (also `env`)\n- `repo` / `repos`\n- `control` / `controls`", + "title": "Resource Type" + } + }, + { + "name": "org", + "in": "path", + "required": true, + "description": "", + "schema": {"type":"string","title":"Org"} + } + ], + "requestBody": [ + { + "name": "body", + "required": true, + "description": "Request body (application/json)", + "schema": { + "properties": { + "set_tags": { + "anyOf": [ + { + "patternProperties": {"^[a-zA-Z0-9][a-zA-Z0-9\\-_\\.~]*$":{"type":"string"}}, + "type": "object" + }, + {"type":"null"} + ], + "title": "Set Tags", + "description": "Dictionary of key-value tags to be added or updated" + }, + "remove_tags": { + "anyOf": [{"items":{"type":"string"},"type":"array"},{"type":"null"}], + "title": "Remove Tags", + "description": "List of tag keys to be removed" + } + }, + "additionalProperties": false, + "type": "object", + "title": "TagPatchInput", + "examples": [{"remove_tags":["key_to_delete"],"set_tags":{"key1":"value1"}}] + } + } + ], + "searchText": "update tags patch tags for resource. patch tags org resource_type resource_id tags" } ] From 226d86d8dfa5d61b06b0a7dd73dc56820c53b91c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Gr=C3=B8ndahl?= Date: Thu, 10 Sep 2026 08:35:35 +0200 Subject: [PATCH 2/3] fix: update hint keys for renamed catalog operation IDs The regenerated catalog carries explicit operationIds from the OpenAPI spec, renaming ~50 actions. Both keys in hints.json were left dangling: put_policy -> create_or_update_policy and create_flow_with_template -> create_or_update_flow_with_template. Also refresh the hand-curated test fixture and its tests so they stop asserting on IDs the API no longer has (post_control -> create_control, search_artifacts_by_sha -> search_artifacts). --- src/hints.json | 4 ++-- test/client/kosli-client.test.ts | 2 +- test/fixtures/catalog-subset.json | 6 +++--- test/scripts/format-json.test.ts | 2 +- test/tools/execute-action.test.ts | 16 ++++++++-------- test/tools/search-actions.test.ts | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/hints.json b/src/hints.json index e2b2c98..0ce2521 100644 --- a/src/hints.json +++ b/src/hints.json @@ -1,11 +1,11 @@ { - "put_policy": { + "create_or_update_policy": { "schemaUrl": "https://docs.kosli.com/schemas/policy/v1.json", "example": { "policy_file": "_schema: https://docs.kosli.com/schemas/policy/v1\nartifacts:\n provenance:\n required: true\n" } }, - "create_flow_with_template": { + "create_or_update_flow_with_template": { "schemaUrl": "https://docs.kosli.com/schemas/flow-template.json", "example": { "template_file": "version: 1\ntrail:\n attestations:\n - name: pull-request\n type: pull_request\n artifacts:\n - name: backend\n attestations:\n - name: unit-tests\n type: junit\n" diff --git a/test/client/kosli-client.test.ts b/test/client/kosli-client.test.ts index 28de67d..51f523a 100644 --- a/test/client/kosli-client.test.ts +++ b/test/client/kosli-client.test.ts @@ -41,7 +41,7 @@ const getTrailEntry: CatalogEntry = { }; const putPolicyEntry: CatalogEntry = { - id: "put_policy", + id: "create_or_update_policy", method: "PUT", path: "/policies/{org}", summary: "Create or update policy", diff --git a/test/fixtures/catalog-subset.json b/test/fixtures/catalog-subset.json index a546345..fb3bdd1 100644 --- a/test/fixtures/catalog-subset.json +++ b/test/fixtures/catalog-subset.json @@ -55,7 +55,7 @@ "searchText": "get trail get trails flow_name trail_name org" }, { - "id": "search_artifacts_by_sha", + "id": "search_artifacts", "method": "GET", "path": "/search/{org}/sha/{search_value}", "summary": "Search artifacts by SHA or fingerprint", @@ -83,7 +83,7 @@ "searchText": "list snapshots get snapshots env_name org" }, { - "id": "post_control", + "id": "create_control", "method": "POST", "path": "/controls/{org}", "summary": "Create a control", @@ -112,7 +112,7 @@ "searchText": "create a control post controls org controls" }, { - "id": "put_policy", + "id": "create_or_update_policy", "method": "PUT", "path": "/policies/{org}", "summary": "Create or update policy", diff --git a/test/scripts/format-json.test.ts b/test/scripts/format-json.test.ts index d514165..3b1aaec 100644 --- a/test/scripts/format-json.test.ts +++ b/test/scripts/format-json.test.ts @@ -32,7 +32,7 @@ describe("formatJsonCompact", () => { it("round-trips: output parses back to the input", () => { const value = { - id: "post_control", + id: "create_control", tags: ["Controls"], parameters: [ { name: "org", in: "path", required: true, description: "d".repeat(150) }, diff --git a/test/tools/execute-action.test.ts b/test/tools/execute-action.test.ts index e659921..ed9f2ce 100644 --- a/test/tools/execute-action.test.ts +++ b/test/tools/execute-action.test.ts @@ -91,11 +91,11 @@ describe("executeAction", () => { it("rejects write action in GET mode", async () => { const mockFetch = vi.fn(); - const result = await executeAction(entries, config, "put_policy", {}, undefined, mockFetch, "GET"); + const result = await executeAction(entries, config, "create_or_update_policy", {}, undefined, mockFetch, "GET"); expect(result).toEqual({ error: true, - message: 'Action "put_policy" is a PUT operation. Use execute_write_action instead.', + message: 'Action "create_or_update_policy" is a PUT operation. Use execute_write_action instead.', }); expect(mockFetch).not.toHaveBeenCalled(); }); @@ -132,7 +132,7 @@ describe("executeAction", () => { json: () => Promise.resolve({ policy: "created" }), }); - const result = await executeAction(entries, config, "put_policy", {}, undefined, mockFetch, "WRITE"); + const result = await executeAction(entries, config, "create_or_update_policy", {}, undefined, mockFetch, "WRITE"); expect(result).toEqual({ policy: "created" }); expect(mockFetch).toHaveBeenCalledOnce(); @@ -213,7 +213,7 @@ describe("request body unwrapping", () => { it("unwraps params nested under a body key for JSON write actions", async () => { const mockFetch = mockFetchOk(); - await executeAction(entries, config, "post_control", { body: jsonBody }, undefined, mockFetch, "WRITE"); + await executeAction(entries, config, "create_control", { body: jsonBody }, undefined, mockFetch, "WRITE"); expect(mockFetch).toHaveBeenCalledWith( expect.stringContaining("/controls/test-org"), @@ -224,7 +224,7 @@ describe("request body unwrapping", () => { it("still accepts body fields spread at the top level", async () => { const mockFetch = mockFetchOk(); - await executeAction(entries, config, "post_control", { ...jsonBody }, undefined, mockFetch, "WRITE"); + await executeAction(entries, config, "create_control", { ...jsonBody }, undefined, mockFetch, "WRITE"); expect(mockFetch).toHaveBeenCalledWith( expect.stringContaining("/controls/test-org"), @@ -235,7 +235,7 @@ describe("request body unwrapping", () => { it("unwraps when path params accompany the body key", async () => { const mockFetch = mockFetchOk(); - await executeAction(entries, config, "post_control", { org: "other-org", body: jsonBody }, undefined, mockFetch, "WRITE"); + await executeAction(entries, config, "create_control", { org: "other-org", body: jsonBody }, undefined, mockFetch, "WRITE"); expect(mockFetch).toHaveBeenCalledWith( expect.stringContaining("/controls/other-org"), @@ -246,7 +246,7 @@ describe("request body unwrapping", () => { it("does not unwrap when an undeclared sibling key is present", async () => { const mockFetch = mockFetchOk(); - await executeAction(entries, config, "post_control", { body: jsonBody, extra: 1 }, undefined, mockFetch, "WRITE"); + await executeAction(entries, config, "create_control", { body: jsonBody, extra: 1 }, undefined, mockFetch, "WRITE"); expect(mockFetch).toHaveBeenCalledWith( expect.anything(), @@ -284,7 +284,7 @@ describe("request body unwrapping", () => { it("leaves non-object body values alone", async () => { const mockFetch = mockFetchOk(); - await executeAction(entries, config, "post_control", { body: "not-an-object" }, undefined, mockFetch, "WRITE"); + await executeAction(entries, config, "create_control", { body: "not-an-object" }, undefined, mockFetch, "WRITE"); expect(mockFetch).toHaveBeenCalledWith( expect.anything(), diff --git a/test/tools/search-actions.test.ts b/test/tools/search-actions.test.ts index 92e42e8..f0bbb1e 100644 --- a/test/tools/search-actions.test.ts +++ b/test/tools/search-actions.test.ts @@ -48,13 +48,13 @@ describe("searchActions", () => { it("matches on description keywords", () => { const results = searchActions(entries, "fingerprint"); - expect(results.some((r) => r.id === "search_artifacts_by_sha")).toBe(true); + expect(results.some((r) => r.id === "search_artifacts")).toBe(true); }); it("includes hints when a matching hint exists", () => { const results = searchActions(entries, "policy", 10, hints as ActionHints); - const policy = results.find((r) => r.id === "put_policy"); + const policy = results.find((r) => r.id === "create_or_update_policy"); expect(policy).toBeDefined(); expect(policy!.hints).toEqual({ schemaUrl: "https://docs.kosli.com/schemas/policy/v1.json", From 9612314628179771769b33478fbd0cb27aad6a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Gr=C3=B8ndahl?= Date: Thu, 10 Sep 2026 08:59:10 +0200 Subject: [PATCH 3/3] ci: raise claude review max-turns from 40 to 60 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The catalog-update review on PR #60 finished its review but the action still failed with "Claude reported a successful result after 53 turns, exceeding the configured maximum of 40" — a 48-rename catalog diff takes more turns than the cap allowed. --- .github/workflows/claude-review.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/claude-review.yaml b/.github/workflows/claude-review.yaml index 8f4601d..10c166c 100644 --- a/.github/workflows/claude-review.yaml +++ b/.github/workflows/claude-review.yaml @@ -60,7 +60,7 @@ jobs: use_sticky_comment: true allowed_bots: 'dependabot[bot]' claude_args: | - --max-turns 40 + --max-turns 60 --max-budget-usd 3 --model claude-opus-5 --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(git diff:*)" @@ -131,7 +131,7 @@ jobs: use_sticky_comment: true allowed_bots: 'github-actions[bot]' claude_args: | - --max-turns 40 + --max-turns 60 --max-budget-usd 3 --model claude-opus-5 --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(git diff:*)" @@ -200,7 +200,7 @@ jobs: track_progress: true use_sticky_comment: true claude_args: | - --max-turns 40 + --max-turns 60 --max-budget-usd 5 --model claude-opus-5 --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(git diff:*)"