Approva una richiesta di aumento del limite
curl --request POST \
--url https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cycle_acu_limit": 4611686018427388000
}
'import requests
url = "https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve"
payload = { "cycle_acu_limit": 4611686018427388000 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cycle_acu_limit: 4611686018427388000})
};
fetch('https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve', 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/usage-policies/requests/{request_id}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cycle_acu_limit' => 4611686018427388000
]),
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/v3/enterprise/usage-policies/requests/{request_id}/approve"
payload := strings.NewReader("{\n \"cycle_acu_limit\": 4611686018427388000\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cycle_acu_limit\": 4611686018427388000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cycle_acu_limit\": 4611686018427388000\n}"
response = http.request(request)
puts response.read_body{
"created_at": 123,
"current_cycle_acu_limit": 123,
"email": "<string>",
"message": "<string>",
"name": "<string>",
"request_id": "<string>",
"requested_cycle_acu_limit": 123,
"reviewed_at": 123,
"reviewer": {
"email": "<string>",
"name": "<string>",
"user_id": "<string>"
},
"status": "pending",
"tier_id": "<string>",
"tier_name": "<string>",
"user_id": "<string>",
"fallback_cycle_acu_limit": 123,
"fallback_tier_id": "<string>",
"fallback_tier_name": "<string>",
"total_cycle_acu_limit": 123
}{
"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"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Budget (Enterprise)
Approva una richiesta di aumento del limite
Approva una richiesta di aumento del limite in sospeso.
Concede il limite di ACU per ciclo richiesto (o il valore di cycle_acu_limit nel
corpo della richiesta) come sostituzione temporanea che scade al termine della finestra mensile
attuale. Restituisce 409 se la richiesta è già stata esaminata o
se il richiedente non è più un membro dell’account.
POST
/
v3
/
enterprise
/
usage-policies
/
requests
/
{request_id}
/
approve
Approva una richiesta di aumento del limite
curl --request POST \
--url https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cycle_acu_limit": 4611686018427388000
}
'import requests
url = "https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve"
payload = { "cycle_acu_limit": 4611686018427388000 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cycle_acu_limit: 4611686018427388000})
};
fetch('https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve', 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/usage-policies/requests/{request_id}/approve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cycle_acu_limit' => 4611686018427388000
]),
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/v3/enterprise/usage-policies/requests/{request_id}/approve"
payload := strings.NewReader("{\n \"cycle_acu_limit\": 4611686018427388000\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cycle_acu_limit\": 4611686018427388000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/usage-policies/requests/{request_id}/approve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cycle_acu_limit\": 4611686018427388000\n}"
response = http.request(request)
puts response.read_body{
"created_at": 123,
"current_cycle_acu_limit": 123,
"email": "<string>",
"message": "<string>",
"name": "<string>",
"request_id": "<string>",
"requested_cycle_acu_limit": 123,
"reviewed_at": 123,
"reviewer": {
"email": "<string>",
"name": "<string>",
"user_id": "<string>"
},
"status": "pending",
"tier_id": "<string>",
"tier_name": "<string>",
"user_id": "<string>",
"fallback_cycle_acu_limit": 123,
"fallback_tier_id": "<string>",
"fallback_tier_name": "<string>",
"total_cycle_acu_limit": 123
}{
"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"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Per i dettagli sui campi e gli esempi, consulta Budget.
Autorizzazioni
Richiede un utente di servizio o un token di accesso personale con l’autorizzazioneManageAcuLimits a livello aziendale, oppure l’accesso delegato al budget.Autorizzazioni
Corpo
application/json
Risposta
Risposta riuscita
La richiesta di un membro di aumentare il proprio limite di ACU per ciclo.

