cURL
curl -X PUT 'https://api.gumloop.com/api/v1/evaluations/EVALUATION_ID/targets' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"targets": [{"type": "team", "id": "TEAM_ID"}, {"type": "agent", "id": "AGENT_ID"}]}'from gumloop import Gumloop
client = Gumloop(access_token="YOUR_ACCESS_TOKEN")
response = client.evaluations.set_targets(
"EVALUATION_ID",
[{"type": "team", "id": "TEAM_ID"}, {"type": "agent", "id": "AGENT_ID"}],
)
print(response.covered_agent_count)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({targets: [{id: '<string>'}]})
};
fetch('https://api.gumloop.com/api/v1/evaluations/{evaluation_id}/targets', 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.gumloop.com/api/v1/evaluations/{evaluation_id}/targets",
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([
'targets' => [
[
'id' => '<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.gumloop.com/api/v1/evaluations/{evaluation_id}/targets"
payload := strings.NewReader("{\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ]\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.gumloop.com/api/v1/evaluations/{evaluation_id}/targets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gumloop.com/api/v1/evaluations/{evaluation_id}/targets")
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 \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"targets": [
{
"type": "team",
"id": "team_4f8c92ab"
},
{
"type": "agent",
"id": "agent_91ab73cd"
}
],
"covered_agent_count": 12,
"enabled": true
}Set evaluation targets
Replaces the full set of targets — who the evaluation grades. Targets expand to agents live: organization covers every agent in the organization, team every agent a team owns, user a member’s personal agents, agent one agent. Removing the last target pauses an enabled evaluation; enabled in the response reflects that.
PUT
/
evaluations
/
{evaluation_id}
/
targets
cURL
curl -X PUT 'https://api.gumloop.com/api/v1/evaluations/EVALUATION_ID/targets' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"targets": [{"type": "team", "id": "TEAM_ID"}, {"type": "agent", "id": "AGENT_ID"}]}'from gumloop import Gumloop
client = Gumloop(access_token="YOUR_ACCESS_TOKEN")
response = client.evaluations.set_targets(
"EVALUATION_ID",
[{"type": "team", "id": "TEAM_ID"}, {"type": "agent", "id": "AGENT_ID"}],
)
print(response.covered_agent_count)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({targets: [{id: '<string>'}]})
};
fetch('https://api.gumloop.com/api/v1/evaluations/{evaluation_id}/targets', 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.gumloop.com/api/v1/evaluations/{evaluation_id}/targets",
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([
'targets' => [
[
'id' => '<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.gumloop.com/api/v1/evaluations/{evaluation_id}/targets"
payload := strings.NewReader("{\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ]\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.gumloop.com/api/v1/evaluations/{evaluation_id}/targets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gumloop.com/api/v1/evaluations/{evaluation_id}/targets")
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 \"targets\": [\n {\n \"id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"targets": [
{
"type": "team",
"id": "team_4f8c92ab"
},
{
"type": "agent",
"id": "agent_91ab73cd"
}
],
"covered_agent_count": 12,
"enabled": true
}Authorizations
Path Parameters
ID of the organization evaluation.
Body
application/json
Maximum array length:
1000Show child attributes
Show child attributes
Was this page helpful?
