Skip to main content
GET
/
cost-insights
/
shared-filters
/
{filterId}
Get shared filter
curl --request GET \
  --url https://api.cloudcapital.co/v1/cost-insights/shared-filters/{filterId} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.cloudcapital.co/v1/cost-insights/shared-filters/{filterId}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.cloudcapital.co/v1/cost-insights/shared-filters/{filterId}', 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.cloudcapital.co/v1/cost-insights/shared-filters/{filterId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.cloudcapital.co/v1/cost-insights/shared-filters/{filterId}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.cloudcapital.co/v1/cost-insights/shared-filters/{filterId}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.cloudcapital.co/v1/cost-insights/shared-filters/{filterId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "filterConfiguration": {
      "filters": {
        "inclusions": {
          "costLayers": [
            "<string>"
          ],
          "clouds": [
            "<string>"
          ],
          "services": [
            "<string>"
          ],
          "resourceFamilies": [
            "<string>"
          ],
          "regions": [
            "<string>"
          ],
          "instanceTypes": [
            "<string>"
          ],
          "usageTypes": [
            "<string>"
          ],
          "billingPeriods": [
            "<string>"
          ],
          "dateRange": {
            "start": "2026-01-01",
            "end": "2026-03-31"
          },
          "costTypes": [
            "<string>"
          ],
          "accountIds": [
            "<string>"
          ],
          "integrationIds": [
            "<string>"
          ],
          "resourceTag": "<string>",
          "resourceTagValues": [
            "<string>"
          ],
          "costCategory": "<string>",
          "costCategoryValues": [
            "<string>"
          ]
        },
        "exclusions": {
          "costLayers": [
            "<string>"
          ],
          "clouds": [
            "<string>"
          ],
          "services": [
            "<string>"
          ],
          "resourceFamilies": [
            "<string>"
          ],
          "regions": [
            "<string>"
          ],
          "instanceTypes": [
            "<string>"
          ],
          "usageTypes": [
            "<string>"
          ],
          "billingPeriods": [
            "<string>"
          ],
          "dateRange": {
            "start": "2026-01-01",
            "end": "2026-03-31"
          },
          "costTypes": [
            "<string>"
          ],
          "accountIds": [
            "<string>"
          ],
          "integrationIds": [
            "<string>"
          ],
          "resourceTag": "<string>",
          "resourceTagValues": [
            "<string>"
          ],
          "costCategory": "<string>",
          "costCategoryValues": [
            "<string>"
          ]
        }
      },
      "groupBy": {
        "dimension": "<string>"
      },
      "metric": "<string>",
      "comparisonEnabled": true,
      "metadata": {
        "name": "<string>",
        "description": "<string>"
      }
    }
  }
}
{
"message": "Unauthorized"
}
{
"success": false,
"error": {
"message": "Rate limit exceeded. Please retry after the specified time."
}
}
{
"success": false,
"error": {
"message": "Error: Shared filter not found or has expired"
}
}

Authorizations

Authorization
string
header
required

API key authentication. Generate an API key from your Cloud Capital dashboard under Settings > API keys. Include it in the Authorization header as a Bearer token.

Path Parameters

filterId
string
required

The unique identifier of the shared filter

Response

Shared filter retrieved successfully

Successful HTTP responses wrap the endpoint-specific body in data. Each operation's 200 response schema is this object merged (allOf) with a data property referencing the payload schema for that endpoint.

success
enum<boolean>
required

Always true when the HTTP status is 2xx.

Available options:
true
data
object
required