curl --request GET \
--url https://api.devin.ai/v3/organizations/{org_id}/sessions/{devin_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/sessions/{devin_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/organizations/{org_id}/sessions/{devin_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/organizations/{org_id}/sessions/{devin_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/organizations/{org_id}/sessions/{devin_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/organizations/{org_id}/sessions/{devin_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/sessions/{devin_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{
"session_id": "<string>",
"url": "<string>",
"status": "new",
"tags": [
"<string>"
],
"org_id": "<string>",
"created_at": 123,
"updated_at": 123,
"acus_consumed": 123,
"pull_requests": [
{
"pr_url": "<string>",
"pr_state": "<string>"
}
],
"title": "<string>",
"playbook_id": "<string>",
"user_id": "<string>",
"is_archived": false,
"parent_session_id": "<string>",
"child_session_ids": [
"<string>"
],
"service_user_id": "<string>",
"category": "bug_fixing",
"subcategory": "<string>",
"origin": "webapp",
"automation_id": "<string>",
"structured_output": {},
"devin_mode": "normal",
"status_detail": "working",
"on_demand_usage": 123,
"security_profile": {
"selection": "inherit",
"profile_id": "<string>"
}
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}Sitzung abrufen
Details zu einer bestimmten Sitzung abrufen.
curl --request GET \
--url https://api.devin.ai/v3/organizations/{org_id}/sessions/{devin_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/sessions/{devin_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/organizations/{org_id}/sessions/{devin_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/organizations/{org_id}/sessions/{devin_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/organizations/{org_id}/sessions/{devin_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/organizations/{org_id}/sessions/{devin_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/sessions/{devin_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{
"session_id": "<string>",
"url": "<string>",
"status": "new",
"tags": [
"<string>"
],
"org_id": "<string>",
"created_at": 123,
"updated_at": 123,
"acus_consumed": 123,
"pull_requests": [
{
"pr_url": "<string>",
"pr_state": "<string>"
}
],
"title": "<string>",
"playbook_id": "<string>",
"user_id": "<string>",
"is_archived": false,
"parent_session_id": "<string>",
"child_session_ids": [
"<string>"
],
"service_user_id": "<string>",
"category": "bug_fixing",
"subcategory": "<string>",
"origin": "webapp",
"automation_id": "<string>",
"structured_output": {},
"devin_mode": "normal",
"status_detail": "working",
"on_demand_usage": 123,
"security_profile": {
"selection": "inherit",
"profile_id": "<string>"
}
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}devin_id ist die Sitzungs-ID mit dem Präfix devin- (z. B. devin-abc123).Berechtigungen
Erfordert einen Service-Benutzer oder ein persönliches Zugriffstoken, das zur Organisation gehört und die betreffende Sitzung anzeigen darf. Der Aufrufer kann eine Sitzung anzeigen, wenn eine der folgenden Bedingungen erfüllt ist:- Er hat die Sitzung erstellt.
- Er verfügt über einen
session.view-Grant für die Sitzung. - Er besitzt die Berechtigung
ViewOrgSessionsauf Organisationsebene.
ViewOrgSessions ist nur erforderlich, um Sitzungen zu lesen, die der Service-Benutzer weder selbst erstellt hat noch für die er einen session.view-Grant besitzt.
On-demand-Nutzung
Bei Teams-Tarifen enthält die Antwort das Feldon_demand_usage: die On-demand-Ausgaben (Überschreitung) der Sitzung in USD, ohne untergeordnete Sitzungen. Der Wert ist 0, wenn die Sitzung vollständig durch das Kontingent Ihres Plans abgedeckt war. Bei anderen Plänen sowie bei den Enterprise-Sitzungsendpunkten fehlt das Feld.Autorisierungen
Pfadparameter
Antwort
Erfolgreiche Antwort
Die der Sitzung zugewiesene Use-Case-Kategorie, sofern die Kategorisierung ausgeführt wurde. Nur in GET-/List-Endpunkten ausgefüllt.
bug_fixing, ci_cd_and_devops, code_quality_and_security, code_review, code_review_and_analysis, data_and_automation, documentation_and_content, feature_development, migrations_and_upgrades, other, production_investigation, refactoring_and_optimization, research_and_exploration, security, unit_test_generation Der Devin-Agent-Modus, mit dem die Sitzung erstellt wurde, nachdem die Standardwerte der Organisation/des Nutzers und die Vererbung der übergeordneten Sitzung aufgelöst wurden. None, wenn die Sitzung eine Agent-Vorschau ausführt, die kein entsprechendes Äquivalent für den Modus hat.
normal, fast, fusion, lite, ultra, fast-ultra, swe-2-medium, swe-2-high, swe-2-max Zusätzliche Details zum aktuellen Status der Sitzung. Wenn der Status 'running' ist: 'working' (arbeitet aktiv), 'waiting_for_user' (benötigt Nutzereingabe), 'waiting_for_approval' (wartet im sicheren Modus auf die Genehmigung einer Aktion) oder 'finished' (Aufgabe abgeschlossen). Wenn der Status 'suspended' ist: der Grund für die Aussetzung, zum Beispiel 'inactivity', 'user_request', 'usage_limit_exceeded', 'out_of_credits', 'out_of_quota', 'no_quota_allocation', 'payment_declined', 'org_usage_limit_exceeded', 'user_usage_limit_exceeded', 'total_session_limit_exceeded', 'contract_expired' oder 'error'. Nur in GET-/List-Endpunkten ausgefüllt.
working, waiting_for_user, waiting_for_approval, finished, inactivity, user_request, usage_limit_exceeded, out_of_credits, out_of_quota, no_quota_allocation, payment_declined, org_usage_limit_exceeded, user_usage_limit_exceeded, total_session_limit_exceeded, contract_expired, error Nutzungsabhängige Kosten im Überschreitungsstatus in USD für diese Sitzung, ohne untergeordnete Sitzungen. Nur bei Teams-Tarifen befüllt; 0, wenn die Sitzung vollständig durch das Kontingent abgedeckt war. Bei anderen Tarifen nicht enthalten. Nur bei get- und Listenendpunkten befüllt.

