Skip to main content
POST
/
v1
/
assessments
/
auto
Trigger auto-assessment
curl --request POST \
  --url https://api.app.chainloop.dev/v1/assessments/auto \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "finding_id": "<string>"
}
'
import requests

url = "https://api.app.chainloop.dev/v1/assessments/auto"

payload = { "finding_id": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({finding_id: '<string>'})
};

fetch('https://api.app.chainloop.dev/v1/assessments/auto', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.app.chainloop.dev/v1/assessments/auto",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'finding_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://api.app.chainloop.dev/v1/assessments/auto"

payload := strings.NewReader("{\n \"finding_id\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.app.chainloop.dev/v1/assessments/auto")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"finding_id\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.app.chainloop.dev/v1/assessments/auto")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"finding_id\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "result": {
    "justification_code": "ASSESSMENT_JUSTIFICATION_CODE_UNSPECIFIED",
    "note": "note",
    "remediation_branch_name": "remediation_branch_name",
    "created_at": "2000-01-23T04:56:07.000Z",
    "external_id": "external_id",
    "remediation_pr_url": "remediation_pr_url",
    "fixable_feasibility": 2.027123023002322,
    "products": [
      {
        "purl_glob": "purl_glob"
      },
      {
        "purl_glob": "purl_glob"
      }
    ],
    "remediation_status": "remediation_status",
    "updated_at": "2000-01-23T04:56:07.000Z",
    "project_id": "project_id",
    "cvss_vector": "cvss_vector",
    "remediation_pr_state": "remediation_pr_state",
    "scope": "ASSESSMENT_SCOPE_UNSPECIFIED",
    "id": "id",
    "fixable_status": null,
    "severity": "FINDING_SEVERITY_UNSPECIFIED",
    "effective_reviewed_at": "2000-01-23T04:56:07.000Z",
    "pending_revision": {
      "justification_code": null,
      "note": "note",
      "approval_status": "ASSESSMENT_APPROVAL_STATUS_UNSPECIFIED",
      "reviewed_at": "2000-01-23T04:56:07.000Z",
      "created_at": "2000-01-23T04:56:07.000Z",
      "assessment_id": "assessment_id",
      "fixable_summary": "fixable_summary",
      "project_version_id": "project_version_id",
      "reviewer": {
        "intercom_hash": "intercom_hash",
        "created_at": "2000-01-23T04:56:07.000Z",
        "last_name": "last_name",
        "id": "id",
        "first_name": "first_name",
        "email": "email",
        "instance_admin": true
      },
      "fixable_feasibility": 5.962133916683182,
      "confidence_breakdown": {
        "schema_version": "schema_version",
        "scores": {
          "key": {
            "reason": "reason",
            "abstained": true,
            "value": 2.3021358869347655
          }
        },
        "derived": {
          "rollup_active_axes": 9,
          "dominant_low_axis": {
            "reason": "reason",
            "axis": "axis",
            "value": 3.616076749251911
          },
          "rollup": 7.061401241503109
        }
      },
      "created_by": {
        "api_token": {
          "id": "id"
        },
        "type": "ASSESSMENT_CREATOR_TYPE_UNSPECIFIED",
        "user": {
          "intercom_hash": "intercom_hash",
          "created_at": "2000-01-23T04:56:07.000Z",
          "last_name": "last_name",
          "id": "id",
          "first_name": "first_name",
          "email": "email",
          "instance_admin": true
        },
        "ai_agent": {
          "name": "name"
        }
      },
      "revision": 1,
      "products": [
        {
          "purl_glob": "purl_glob"
        },
        {
          "purl_glob": "purl_glob"
        }
      ],
      "review_note": "review_note",
      "scope": null,
      "confidence_score": 5.637376656633329,
      "id": "id",
      "fixable_status": "FIXABLE_STATUS_UNSPECIFIED",
      "status": null
    },
    "remediation_pr_number": 0,
    "fixable_summary": "fixable_summary",
    "project_version_id": "project_version_id",
    "remediation_confidence": 6.027456183070403,
    "created_by": {
      "api_token": {
        "id": "id"
      },
      "type": "ASSESSMENT_CREATOR_TYPE_UNSPECIFIED",
      "user": {
        "intercom_hash": "intercom_hash",
        "created_at": "2000-01-23T04:56:07.000Z",
        "last_name": "last_name",
        "id": "id",
        "first_name": "first_name",
        "email": "email",
        "instance_admin": true
      },
      "ai_agent": {
        "name": "name"
      }
    },
    "remediation_status_reason": "remediation_status_reason",
    "remediation_updated_at": "2000-01-23T04:56:07.000Z",
    "organization_id": "organization_id",
    "effective_reviewer": {
      "intercom_hash": "intercom_hash",
      "created_at": "2000-01-23T04:56:07.000Z",
      "last_name": "last_name",
      "id": "id",
      "first_name": "first_name",
      "email": "email",
      "instance_admin": true
    },
    "status": "ASSESSMENT_STATUS_UNSPECIFIED"
  }
}
{
"code": 0,
"details": [
"details",
"details"
],
"message": "message"
}
{
"code": 6,
"details": [
"details",
"details"
],
"message": "message"
}
{
"code": 1,
"details": [
"details",
"details"
],
"message": "message"
}
{
"code": 5,
"details": [
"details",
"details"
],
"message": "message"
}
{
"code": 5,
"details": [
{
"@type": "@type"
},
{
"@type": "@type"
}
],
"message": "message"
}

Authorizations

Authorization
string
header
required

Bearer token for authentication

Body

application/json

Request to trigger an AI-powered auto-assessment for a finding

Request to trigger an AI-powered auto-assessment for a finding

finding_id
string

ID of the finding to auto-assess

Response

A successful response.

Response for TriggerAutoAssessment method

result
AssessmentItem · object

Full representation of a security assessment

Example:
{
"justification_code": "ASSESSMENT_JUSTIFICATION_CODE_UNSPECIFIED",
"note": "note",
"remediation_branch_name": "remediation_branch_name",
"created_at": "2000-01-23T04:56:07.000Z",
"external_id": "external_id",
"remediation_pr_url": "remediation_pr_url",
"fixable_feasibility": 2.027123023002322,
"products": [
{ "purl_glob": "purl_glob" },
{ "purl_glob": "purl_glob" }
],
"remediation_status": "remediation_status",
"updated_at": "2000-01-23T04:56:07.000Z",
"project_id": "project_id",
"cvss_vector": "cvss_vector",
"remediation_pr_state": "remediation_pr_state",
"scope": "ASSESSMENT_SCOPE_UNSPECIFIED",
"id": "id",
"fixable_status": null,
"severity": "FINDING_SEVERITY_UNSPECIFIED",
"effective_reviewed_at": "2000-01-23T04:56:07.000Z",
"pending_revision": {
"justification_code": null,
"note": "note",
"approval_status": "ASSESSMENT_APPROVAL_STATUS_UNSPECIFIED",
"reviewed_at": "2000-01-23T04:56:07.000Z",
"created_at": "2000-01-23T04:56:07.000Z",
"assessment_id": "assessment_id",
"fixable_summary": "fixable_summary",
"project_version_id": "project_version_id",
"reviewer": {
"intercom_hash": "intercom_hash",
"created_at": "2000-01-23T04:56:07.000Z",
"last_name": "last_name",
"id": "id",
"first_name": "first_name",
"email": "email",
"instance_admin": true
},
"fixable_feasibility": 5.962133916683182,
"confidence_breakdown": {
"schema_version": "schema_version",
"scores": {
"key": {
"reason": "reason",
"abstained": true,
"value": 2.3021358869347655
}
},
"derived": {
"rollup_active_axes": 9,
"dominant_low_axis": {
"reason": "reason",
"axis": "axis",
"value": 3.616076749251911
},
"rollup": 7.061401241503109
}
},
"created_by": {
"api_token": { "id": "id" },
"type": "ASSESSMENT_CREATOR_TYPE_UNSPECIFIED",
"user": {
"intercom_hash": "intercom_hash",
"created_at": "2000-01-23T04:56:07.000Z",
"last_name": "last_name",
"id": "id",
"first_name": "first_name",
"email": "email",
"instance_admin": true
},
"ai_agent": { "name": "name" }
},
"revision": 1,
"products": [
{ "purl_glob": "purl_glob" },
{ "purl_glob": "purl_glob" }
],
"review_note": "review_note",
"scope": null,
"confidence_score": 5.637376656633329,
"id": "id",
"fixable_status": "FIXABLE_STATUS_UNSPECIFIED",
"status": null
},
"remediation_pr_number": 0,
"fixable_summary": "fixable_summary",
"project_version_id": "project_version_id",
"remediation_confidence": 6.027456183070403,
"created_by": {
"api_token": { "id": "id" },
"type": "ASSESSMENT_CREATOR_TYPE_UNSPECIFIED",
"user": {
"intercom_hash": "intercom_hash",
"created_at": "2000-01-23T04:56:07.000Z",
"last_name": "last_name",
"id": "id",
"first_name": "first_name",
"email": "email",
"instance_admin": true
},
"ai_agent": { "name": "name" }
},
"remediation_status_reason": "remediation_status_reason",
"remediation_updated_at": "2000-01-23T04:56:07.000Z",
"organization_id": "organization_id",
"effective_reviewer": {
"intercom_hash": "intercom_hash",
"created_at": "2000-01-23T04:56:07.000Z",
"last_name": "last_name",
"id": "id",
"first_name": "first_name",
"email": "email",
"instance_admin": true
},
"status": "ASSESSMENT_STATUS_UNSPECIFIED"
}