Obter perfil de varredura de código
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"
}Varreduras de código (Enterprise)
Obter perfil de varredura de código (API do Devin)
Obtenha um perfil de varredura de código do Devin, incluindo modo, tipo de varredura, padrões glob de inclusão/exclusão e orientações, pela API Enterprise v3
GET
/
v3
/
enterprise
/
code-scans
/
profiles
/
{profile_id}
Obter perfil de varredura de código
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"
}Permissões
Requer um usuário de serviço ou um token de acesso pessoal com a permissãoViewAccountCodeScans no nível Enterprise.
Comportamento
Retorna os metadados do perfil, a visibilidade (pertencente à organização ou compartilhado em nível da conta), os padrões glob de inclusão/exclusão e todos os campos de orientação (investigação, comunicação e origem da ingestão). Retorna404 quando o perfil não existe ou não está visível para a conta Enterprise. O equivalente com escopo de organização é Obter perfil de varredura de código (Organização).Resposta
Resposta bem-sucedida
Detalhes completos de um perfil de varredura de código, incluindo suas orientações.

