Skip to main content
POST
/
v0
/
sca
/
start-run
Start a new SCA run
curl --request POST \
  --url https://{hostname}.gable.ai/v0/sca/start-run \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "code_info": {
    "repo_uri": "<string>",
    "repo_branch": "<string>",
    "repo_commit": "<string>",
    "project_root": "<string>",
    "external_component_id": "<string>",
    "repo_name": "<string>"
  },
  "action": "register",
  "sca_info": {
    "name": "<string>",
    "version": "<string>",
    "config": {
      "ingress_signatures": [
        {
          "class_names": [
            "<string>"
          ],
          "method_names": [
            "<string>"
          ],
          "kind": "<string>"
        }
      ],
      "egress_signatures": [
        {
          "class_names": [
            "<string>"
          ],
          "method_names": [
            "<string>"
          ],
          "kind": "<string>"
        }
      ]
    }
  },
  "pr_link": "<string>",
  "include_unchanged_assets": false,
  "output_format": "json",
  "type": "CODE"
}
'
{
  "runId": "<string>",
  "s3PresignedUrl": {
    "url": "<string>",
    "fields": {}
  },
  "config": {
    "config_type": "<string>",
    "project_root": "<string>",
    "version": "<string>",
    "config_value": {},
    "created_at": "2023-11-07T05:31:56Z",
    "language": "<string>",
    "repo": "<string>"
  }
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
code_info
object
required

Metadata about the code that is being analyzed

action
enum<string>
required

Action to perform upon receiving the results. Register should be used when the results are active (like on a 'main' branch or production system), as assets will be registered from the lineage data. Check should be used when the results are from a proposed change (like a pull request) and resultant assets will be checked against any contracts. Upload is the same as register except that no assets will be registered, only the lineage data will be uploaded.

Available options:
register,
check,
upload
sca_info
object

Link to the pull request in the source code repository, if applicable

include_unchanged_assets
boolean
default:false

Whether to include assets that have not changed since the last run

output_format
enum<string>

Format of the output, either 'json', 'text', or 'markdown'

Available options:
json,
text,
markdown
type
enum<string>
default:CODE

Type of the run, either 'code' or 'data_store' or 'edge'

Available options:
CODE,
DATA_STORE,
EDGE

Response

The presigned S3 upload URL

The response from the postScaStartRun function

runId
string
required

The unique run ID assigned to this SCA run

s3PresignedUrl
object

Details for uploading files to S3

config
object