curl --request PUT \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"outpost_pool_id": "<string>",
"platform": "<string>"
}
'import requests
url = "https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform"
payload = {
"outpost_pool_id": "<string>",
"platform": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({outpost_pool_id: '<string>', platform: '<string>'})
};
fetch('https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform', 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/v3beta1/organizations/{org_id}/default-platform",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'outpost_pool_id' => '<string>',
'platform' => '<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.devin.ai/v3beta1/organizations/{org_id}/default-platform"
payload := strings.NewReader("{\n \"outpost_pool_id\": \"<string>\",\n \"platform\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"outpost_pool_id\": \"<string>\",\n \"platform\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"outpost_pool_id\": \"<string>\",\n \"platform\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"outpost_pool_id": "<string>",
"outpost_pool_name": "<string>",
"platform": "<string>"
}{
"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"
}Standardplattform der Organisation festlegen (Devin API)
Legen Sie über die v3-Organisations-API fest, ob Devin-Sitzungen der Organisation standardmäßig auf einer gehosteten Plattform oder in einem Outpost-Pool ausgeführt werden, oder setzen Sie diese Einstellung zurück
curl --request PUT \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"outpost_pool_id": "<string>",
"platform": "<string>"
}
'import requests
url = "https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform"
payload = {
"outpost_pool_id": "<string>",
"platform": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({outpost_pool_id: '<string>', platform: '<string>'})
};
fetch('https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform', 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/v3beta1/organizations/{org_id}/default-platform",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'outpost_pool_id' => '<string>',
'platform' => '<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.devin.ai/v3beta1/organizations/{org_id}/default-platform"
payload := strings.NewReader("{\n \"outpost_pool_id\": \"<string>\",\n \"platform\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"outpost_pool_id\": \"<string>\",\n \"platform\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/organizations/{org_id}/default-platform")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"outpost_pool_id\": \"<string>\",\n \"platform\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"outpost_pool_id": "<string>",
"outpost_pool_name": "<string>",
"platform": "<string>"
}{
"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"
}platform erstellt werden, gilt zunächst der persönliche Standard des Erstellers und danach diese Einstellung.
Berechtigungen
Erfordert einen Service-Benutzer oder ein persönliches Zugriffstoken mit der BerechtigungManageOrgSettings auf Organisationsebene.
Request-Felder
Senden Sie höchstens eines der folgenden Felder:platform: ein für die Organisation konfiguriertes Label einer gehosteten Plattform (zum Beispiellinux,windowsodermacos) oder der Name eines gemeinsam genutzten Outpost-Pools; Groß-/Kleinschreibung wird nicht beachtet. Wenn ein Name auf beides zutrifft, haben Plattformen Vorrang.outpost_pool_id: die ID eines gemeinsam genutzten Outpost-Pools, der für die Organisation verfügbar ist.
{}) oder beide Felder als null, um den Standard zurückzusetzen. Der Request-Body ist erforderlich.
Nur gemeinsam genutzte Outpost-Pools sind zulässig. Persönliche Outposts können nicht als Organisationsstandard festgelegt werden, da nur ihr Eigentümer darauf Sitzungen starten kann.
Organisationen im Nur-Outposts-Modus
Wenn sich das Enterprise im Nur-Outposts-Modus befindet, werden ausschließlich Outpost-Pools akzeptiert. Labels gehosteter Plattformen führen zu einem400-Fehler.
Fehler
400, wennplatformkeiner konfigurierten Plattform und keinem gemeinsam genutzten Outpost-Pool entspricht, auf mehrere Outpost-Pools zutrifft oder in einer Organisation, die ausschließlich Outposts nutzt, eine gehostete Plattform angibt; oder wennoutpost_pool_idkein gemeinsam genutzter Pool ist, der der Organisation zur Verfügung steht. Der Fehler-Body listet die verfügbaren Plattformen und Outpost-Pools auf.403, wenn dem Aufrufer die BerechtigungManageOrgSettingsfehlt.422, wenn sowohlplatformals auchoutpost_pool_idgesetzt sind.
Beispiel
curl -X PUT "https://api.devin.ai/v3beta1/organizations/$ORG_ID/default-platform" \
-H "Authorization: Bearer $DEVIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"platform": "gpu-pool"}'
Body
Legen Sie den Standardausführungsort der Organisation für neue Sitzungen fest.
Übergeben Sie höchstens einen der Parameter platform und outpost_pool_id; übergeben Sie beide als
null (zum Beispiel {}), um den Standard zurückzusetzen.
Eine für die Organisation konfigurierte Bezeichnung einer gehosteten Plattform (z. B. 'linux', 'windows', 'macos') oder der Name eines gemeinsam genutzten Outpost-Pools. Groß- und Kleinschreibung werden nicht berücksichtigt; bei gleichnamigen Plattformen und Pools haben Plattformen Vorrang. Unbekannte Werte werden mit dem HTTP-Statuscode 400 abgelehnt; die Antwort listet die verfügbaren Plattformen und Outpost-Pools auf.
128Antwort
Erfolgreiche Antwort
Der Standardausführungsort der Organisation für neue Sitzungen.

