curl --request PATCH \
--url https://api.select.dev/v2/insights/{insight_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"assignee": "<string>",
"user_effort": "<string>",
"user_annualized_potential_savings_lower_bound": 123,
"user_annualized_potential_savings_upper_bound": 123
}
'import requests
url = "https://api.select.dev/v2/insights/{insight_id}"
payload = {
"assignee": "<string>",
"user_effort": "<string>",
"user_annualized_potential_savings_lower_bound": 123,
"user_annualized_potential_savings_upper_bound": 123
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
assignee: '<string>',
user_effort: '<string>',
user_annualized_potential_savings_lower_bound: 123,
user_annualized_potential_savings_upper_bound: 123
})
};
fetch('https://api.select.dev/v2/insights/{insight_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.select.dev/v2/insights/{insight_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'assignee' => '<string>',
'user_effort' => '<string>',
'user_annualized_potential_savings_lower_bound' => 123,
'user_annualized_potential_savings_upper_bound' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/insights/{insight_id}"
payload := strings.NewReader("{\n \"assignee\": \"<string>\",\n \"user_effort\": \"<string>\",\n \"user_annualized_potential_savings_lower_bound\": 123,\n \"user_annualized_potential_savings_upper_bound\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.patch("https://api.select.dev/v2/insights/{insight_id}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assignee\": \"<string>\",\n \"user_effort\": \"<string>\",\n \"user_annualized_potential_savings_lower_bound\": 123,\n \"user_annualized_potential_savings_upper_bound\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/insights/{insight_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assignee\": \"<string>\",\n \"user_effort\": \"<string>\",\n \"user_annualized_potential_savings_lower_bound\": 123,\n \"user_annualized_potential_savings_upper_bound\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"etag": "<string>",
"create_time": "<string>",
"update_time": "<string>",
"account_metadata": "<unknown>",
"view_count": 123,
"status": "<string>",
"snowflake_id": "<string>",
"is_current": true,
"connection_id": "<string>",
"connection_type": "<string>",
"resource_type": "<string>",
"aggregate_resource_type": "<string>",
"insight_type": "<string>",
"identifying_metadata": "<unknown>",
"aggregate_metadata": "<unknown>",
"usage_groups": "<unknown>",
"insight_metadata": "<unknown>",
"effort": "<string>",
"studied_period_start": "2023-12-25",
"studied_period_end": "2023-12-25",
"annualized_potential_savings_lower_bound": 123,
"annualized_potential_savings_upper_bound": 123,
"last_generated_time": "<string>",
"first_generated_time": "<string>",
"first_view_time": "<string>",
"last_view_time": "<string>",
"first_viewed_by": "<string>",
"last_viewed_by": "<string>",
"assignee": "<string>",
"user_effort": "<string>",
"user_annualized_potential_savings_lower_bound": 123,
"user_annualized_potential_savings_upper_bound": 123
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Update an insight
curl --request PATCH \
--url https://api.select.dev/v2/insights/{insight_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"assignee": "<string>",
"user_effort": "<string>",
"user_annualized_potential_savings_lower_bound": 123,
"user_annualized_potential_savings_upper_bound": 123
}
'import requests
url = "https://api.select.dev/v2/insights/{insight_id}"
payload = {
"assignee": "<string>",
"user_effort": "<string>",
"user_annualized_potential_savings_lower_bound": 123,
"user_annualized_potential_savings_upper_bound": 123
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
assignee: '<string>',
user_effort: '<string>',
user_annualized_potential_savings_lower_bound: 123,
user_annualized_potential_savings_upper_bound: 123
})
};
fetch('https://api.select.dev/v2/insights/{insight_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.select.dev/v2/insights/{insight_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'assignee' => '<string>',
'user_effort' => '<string>',
'user_annualized_potential_savings_lower_bound' => 123,
'user_annualized_potential_savings_upper_bound' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/insights/{insight_id}"
payload := strings.NewReader("{\n \"assignee\": \"<string>\",\n \"user_effort\": \"<string>\",\n \"user_annualized_potential_savings_lower_bound\": 123,\n \"user_annualized_potential_savings_upper_bound\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.patch("https://api.select.dev/v2/insights/{insight_id}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assignee\": \"<string>\",\n \"user_effort\": \"<string>\",\n \"user_annualized_potential_savings_lower_bound\": 123,\n \"user_annualized_potential_savings_upper_bound\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/insights/{insight_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assignee\": \"<string>\",\n \"user_effort\": \"<string>\",\n \"user_annualized_potential_savings_lower_bound\": 123,\n \"user_annualized_potential_savings_upper_bound\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"etag": "<string>",
"create_time": "<string>",
"update_time": "<string>",
"account_metadata": "<unknown>",
"view_count": 123,
"status": "<string>",
"snowflake_id": "<string>",
"is_current": true,
"connection_id": "<string>",
"connection_type": "<string>",
"resource_type": "<string>",
"aggregate_resource_type": "<string>",
"insight_type": "<string>",
"identifying_metadata": "<unknown>",
"aggregate_metadata": "<unknown>",
"usage_groups": "<unknown>",
"insight_metadata": "<unknown>",
"effort": "<string>",
"studied_period_start": "2023-12-25",
"studied_period_end": "2023-12-25",
"annualized_potential_savings_lower_bound": 123,
"annualized_potential_savings_upper_bound": 123,
"last_generated_time": "<string>",
"first_generated_time": "<string>",
"first_view_time": "<string>",
"last_view_time": "<string>",
"first_viewed_by": "<string>",
"last_viewed_by": "<string>",
"assignee": "<string>",
"user_effort": "<string>",
"user_annualized_potential_savings_lower_bound": 123,
"user_annualized_potential_savings_upper_bound": 123
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Authorizations
Organization API key (sl_…).
Headers
The insight's current ETag, from a prior read. Required: the update is rejected if the insight has changed since.
The organization ID the request is scoped to.
Path Parameters
Body
The fields of an insight you can change.
Omit a field to leave it unchanged; send null to clear it. Fields SELECT
generates cannot be set.
Workflow status of the insight. Set it to dismissed to dismiss the insight. Cannot be null.
open, backlog, resolved, dismissed Email address of the user to assign this insight to. The assignee is subscribed to the insight's activity feed. Send null to unassign.
Effort estimate for this insight, overriding SELECT's estimate. Send null to fall back to SELECT's estimate.
Lower bound of the annualized savings for this insight, overriding SELECT's estimate. Send null to fall back to SELECT's estimate.
Upper bound of the annualized savings for this insight, overriding SELECT's estimate. Send null to fall back to SELECT's estimate.
Response
Successful Response
A single insight — an optimization opportunity SELECT has surfaced for one of your resources.
The unique identifier of the insight.
Opaque strong ETag for optimistic concurrency. Matches the ETag response header; supply it in an If-Match header on a later update to make that write conditional and avoid overwriting newer changes.
When the insight was first created, as an RFC 3339 UTC timestamp.
When the insight was last updated, as an RFC 3339 UTC timestamp.
Details of the account this insight relates to.
Number of distinct days this insight was viewed by anyone in your organization. 0 if it has never been viewed.
Current workflow status of the insight: open, backlog, resolved or dismissed.
Stable identifier for the insight, carried through from the source data. It stays the same across syncs and only changes if the insight is regenerated.
Whether this is the current, active version of the insight for its resource. Superseded insights stay queryable but are marked not current.
Identifier of the connection this insight was generated for.
The type of connection this insight was generated for.
The type of resource this insight is about, such as a warehouse.
When the insight covers a group of resources, the type of those resources.
The category of optimization opportunity this insight describes.
Details identifying the specific resource this insight applies to.
Additional details for insights that span multiple resources.
The usage groups associated with this insight.
Additional details specific to this insight's type.
Estimated effort required to act on this insight.
Start of the time period analyzed to produce this insight.
End of the time period analyzed to produce this insight.
Lower bound of the estimated annualized savings if this insight is acted on.
Upper bound of the estimated annualized savings if this insight is acted on.
When this insight was most recently generated, as an RFC 3339 UTC timestamp.
When this insight was first generated, as an RFC 3339 UTC timestamp.
When this insight was first viewed by anyone in your organization, as an RFC 3339 UTC timestamp. Null if it has never been viewed.
When this insight was most recently viewed by anyone in your organization, as an RFC 3339 UTC timestamp. Null if it has never been viewed.
Email address of the first user in your organization to view this insight. Null if it has never been viewed.
Email address of the most recent user in your organization to view this insight. Null if it has never been viewed.
Email address of the user this insight is assigned to.
Effort estimate you have set for this insight, overriding SELECT's estimate.
Lower bound of the annualized savings you have set for this insight, overriding SELECT's estimate.
Upper bound of the annualized savings you have set for this insight, overriding SELECT's estimate.

