Récupérer le profil d’analyse de code
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"
}Analyses de code (entreprise)
Obtenir un profil d’analyse de code (API Devin)
Récupérer un profil d’analyse de code Devin, avec son mode, son type d’analyse, ses motifs glob d’inclusion et d’exclusion, ainsi que ses instructions, via l’API Enterprise v3
GET
/
v3
/
enterprise
/
code-scans
/
profiles
/
{profile_id}
Récupérer le profil d’analyse de code
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"
}Autorisations
Requiert un utilisateur de service ou un jeton d’accès personnel doté de l’autorisationViewAccountCodeScans au niveau Enterprise.
Comportement
Renvoie les métadonnées du profil, sa visibilité (propre à l’organisation ou partagée à l’échelle du compte), les motifs glob d’inclusion/exclusion et tous ses champs d’instructions (pour l’investigation, la communication et la source d’ingestion). Renvoie404 si le profil n’existe pas ou n’est pas visible par le compte Enterprise. L’équivalent dans le périmètre de l’organisation est Obtenir le profil d’analyse de code (organisation).Réponse
Réponse réussie
Détails complets d’un profil d’analyse de code, y compris ses instructions.

