Get status of a sca run - Gable Docs

Get Status of a SCA Run

Endpoint

GET /v0/sca/status/{id}

Description

Get status of a sca run

cURL Example

curl --request GET \
  --url https://demo-api.gable.ai/v0/sca/status/{id} \
  --header 'X-API-KEY: <api-key>'

Python Example

import requests

url = "https://demo-api.gable.ai/v0/sca/status/{id}"

headers = {"X-API-KEY": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)

JavaScript Example

const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};

fetch('https://demo-api.gable.ai/v0/sca/status/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

PHP Example

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://demo-api.gable.ai/v0/sca/status/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-API-KEY: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Go Example

package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {

url := "https://demo-api.gable.ai/v0/sca/status/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-KEY", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}

Response Codes

Example Response

{
  "message": "<string>",
  "asset_registration_outcomes": [
    {
      "data_asset_resource_name": {
        "data_source": "<string>",
        "path": "<string>"
      },
      "error": "<string>"
    }
  ]
}

Authorizations

Path Parameters

Response Structure

200 Response

Status Options