Find reads on connected services
Lists the read-only requests CostGraph can make to the tenant’s connected services (cloud and SaaS integrations) whose name or summary matches the query, at most 25. A service without a published API description appears once with operation_id GET, meaning any GET path. unconnected lists the services CostGraph can read or change that match the query by name or by what they offer but that the tenant has not connected; connect one from the Integrations page to use it. capacity_role keeps only the reads and changes that answer that capacity question: availability (what can be created where), quota (limits and usage), quota_increase (the change that asks for more) and quota_request_history (increases already requested). To list one provider’s, pass its name as query. Requires the integrations:read scope.
curl --request POST \
--url https://api.costgraph.ai/api/v1/tenant/integration-reads/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"connection_id": "<string>"
}
'import requests
url = "https://api.costgraph.ai/api/v1/tenant/integration-reads/search"
payload = {
"query": "<string>",
"connection_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', connection_id: '<string>'})
};
fetch('https://api.costgraph.ai/api/v1/tenant/integration-reads/search', 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.costgraph.ai/api/v1/tenant/integration-reads/search",
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([
'query' => '<string>',
'connection_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.costgraph.ai/api/v1/tenant/integration-reads/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"connection_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.costgraph.ai/api/v1/tenant/integration-reads/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"connection_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/integration-reads/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"connection_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"matches": [
{
"connection": "<string>",
"connection_id": "<string>",
"kind": "read",
"operation_id": "<string>",
"passthrough": true,
"provider": "<string>",
"requires_approval": true,
"capacity_role": "availability",
"params_schema": {},
"summary": "<string>"
}
],
"unconnected": [
{
"can_change": true,
"can_read": true,
"display_name": "<string>",
"provider": "<string>"
}
]
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"code": "subscription_required",
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}Body
What to look for
Was this page helpful?
curl --request POST \
--url https://api.costgraph.ai/api/v1/tenant/integration-reads/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"connection_id": "<string>"
}
'import requests
url = "https://api.costgraph.ai/api/v1/tenant/integration-reads/search"
payload = {
"query": "<string>",
"connection_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', connection_id: '<string>'})
};
fetch('https://api.costgraph.ai/api/v1/tenant/integration-reads/search', 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.costgraph.ai/api/v1/tenant/integration-reads/search",
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([
'query' => '<string>',
'connection_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.costgraph.ai/api/v1/tenant/integration-reads/search"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"connection_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.costgraph.ai/api/v1/tenant/integration-reads/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"connection_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.costgraph.ai/api/v1/tenant/integration-reads/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"connection_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"matches": [
{
"connection": "<string>",
"connection_id": "<string>",
"kind": "read",
"operation_id": "<string>",
"passthrough": true,
"provider": "<string>",
"requires_approval": true,
"capacity_role": "availability",
"params_schema": {},
"summary": "<string>"
}
],
"unconnected": [
{
"can_change": true,
"can_read": true,
"display_name": "<string>",
"provider": "<string>"
}
]
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"code": "subscription_required",
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}{
"message": "some message",
"status": "error"
}