curl --request GET \
--url https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}', 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.devin.ai/v3/enterprise/code-scans/profiles/{profile_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 => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"created_at": 123,
"description": "<string>",
"exclude_globs": [
"<string>"
],
"include_globs": [
"<string>"
],
"ingestion_source_guidance": "<string>",
"investigation_guidance": "<string>",
"mode": "discover",
"name": "<string>",
"org_id": "<string>",
"post_ingestion_guidance": "<string>",
"profile_id": "<string>",
"remediation_guidance": "<string>",
"report_guidance": "<string>",
"scan_type": "security",
"threat_model_guidance": "<string>",
"triage_guidance": "<string>",
"validation_guidance": "<string>",
"visibility": "org",
"communication_guidance": "<string>",
"scan_paths": [
"<string>"
],
"type_config": {},
"validation_severities": [
"critical"
]
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Code-Scan-Profil abrufen (Devin API)
Ein einzelnes Devin-Code-Scan-Profil mit Modus, Scan-Typ, Include-/Exclude-Globs und Anweisungen über die v3 Enterprise API abrufen
curl --request GET \
--url https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}', 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.devin.ai/v3/enterprise/code-scans/profiles/{profile_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 => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/code-scans/profiles/{profile_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"created_at": 123,
"description": "<string>",
"exclude_globs": [
"<string>"
],
"include_globs": [
"<string>"
],
"ingestion_source_guidance": "<string>",
"investigation_guidance": "<string>",
"mode": "discover",
"name": "<string>",
"org_id": "<string>",
"post_ingestion_guidance": "<string>",
"profile_id": "<string>",
"remediation_guidance": "<string>",
"report_guidance": "<string>",
"scan_type": "security",
"threat_model_guidance": "<string>",
"triage_guidance": "<string>",
"validation_guidance": "<string>",
"visibility": "org",
"communication_guidance": "<string>",
"scan_paths": [
"<string>"
],
"type_config": {},
"validation_severities": [
"critical"
]
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Berechtigungen
Erfordert einen Service-Benutzer oder ein persönliches Zugriffstoken mit der BerechtigungViewAccountCodeScans auf Enterprise-Ebene.
Verhalten
Gibt die Metadaten des Profils, seine Sichtbarkeit (organisationsverwaltet oder kontoweit freigegeben), Include-/Exclude-Globs sowie alle zugehörigen Anleitungsfelder (für Untersuchung, Kommunikation und Ingestion-Quellen) zurück. Gibt404 zurück, wenn das Profil nicht existiert oder für das Enterprise-Konto nicht sichtbar ist. Das Pendant im Org-Geltungsbereich ist Code-Scan-Profil abrufen (Organization).Autorisierungen
Servicebenutzer-Anmeldedaten (Präfix: cog_)
Pfadparameter
Antwort
Erfolgreiche Antwort
Vollständige Details eines Code-Scan-Profils, einschließlich seiner Hinweise.
Zeitpunkt, zu dem das Profil erstellt wurde (Unix-Sekunden).
Beschreibung des Profils, falls vorhanden.
Glob-Muster für Dateien, die vom Scan ausgeschlossen werden sollen, falls vorhanden.
Glob-Muster für Dateien, die in den Scan einbezogen werden sollen, falls vorhanden.
Hinweise zur Ingestionsquelle, falls vorhanden.
Hinweise für die Untersuchungsphase, falls vorhanden.
Profilmodus: discover oder ingest.
discover, ingest Name des Profils.
Organisation, der das Profil gehört. Null, wenn das Profil kontoweit freigegeben ist.
Hinweise für die Phase nach der Ingestion, falls vorhanden.
Eindeutige Kennung des Profils.
Hinweise für die Fehlerbehebungsphase, falls vorhanden.
Hinweise für die Berichtsphase, falls vorhanden.
Typ des Scans, den das Profil konfiguriert.
security, performance, db-queries, test-coverage, dead-code, code-quality, cleanup, telemetry, accessibility, compliance, general, migration-docs Hinweise zum Bedrohungsmodell, falls vorhanden.
Hinweise für die Triage-Phase, falls vorhanden.
Hinweise für die Validierungsphase, falls vorhanden.
Gibt an, ob das Profil einer einzelnen Organisation gehört oder im gesamten Account geteilt wird.
org, account Gegebenenfalls Hinweise für die Kommunikationsphase (Maßnahmen zu finalen Befunden, z. B. Benachrichtigung von Verantwortlichen oder Stakeholdern).
Pfade relativ zum Repository, auf die der Scan beschränkt ist, sofern vorhanden. Bei Null oder einem leeren Wert wird das gesamte Repository gescannt.
Konfiguration für den jeweiligen Scan-Typ des Profils, sofern vorhanden (z. B. System, Framework und Kriterien eines Compliance-Profils).
Schweregrade der Befunde, die von der Laufzeitvalidierung abgedeckt werden. Bei Null gilt die Standardeinstellung.
critical, high, medium, low 
