curl --request GET \
--url https://api.pinecone.io/admin/cost-usage-exports \
--header 'Authorization: Bearer <token>' \
--header 'X-Pinecone-Api-Version: <x-pinecone-api-version>'import requests
url = "https://api.pinecone.io/admin/cost-usage-exports"
headers = {
"X-Pinecone-Api-Version": "<x-pinecone-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Pinecone-Api-Version': '<x-pinecone-api-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.pinecone.io/admin/cost-usage-exports', 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.pinecone.io/admin/cost-usage-exports",
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>",
"X-Pinecone-Api-Version: <x-pinecone-api-version>"
],
]);
$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.pinecone.io/admin/cost-usage-exports"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
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.pinecone.io/admin/cost-usage-exports")
.header("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pinecone.io/admin/cost-usage-exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Pinecone-Api-Version"] = '<x-pinecone-api-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyList cost usage exports
List the cost usage exports belonging to your organization, newest first.
List items never carry a download link: download_url and download_url_expires_at are always null here. Request a single export to generate one.
curl --request GET \
--url https://api.pinecone.io/admin/cost-usage-exports \
--header 'Authorization: Bearer <token>' \
--header 'X-Pinecone-Api-Version: <x-pinecone-api-version>'import requests
url = "https://api.pinecone.io/admin/cost-usage-exports"
headers = {
"X-Pinecone-Api-Version": "<x-pinecone-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Pinecone-Api-Version': '<x-pinecone-api-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.pinecone.io/admin/cost-usage-exports', 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.pinecone.io/admin/cost-usage-exports",
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>",
"X-Pinecone-Api-Version: <x-pinecone-api-version>"
],
]);
$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.pinecone.io/admin/cost-usage-exports"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
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.pinecone.io/admin/cost-usage-exports")
.header("X-Pinecone-Api-Version", "<x-pinecone-api-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pinecone.io/admin/cost-usage-exports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Pinecone-Api-Version"] = '<x-pinecone-api-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAuthorizations
An access token must be provided in the Authorization header using the Bearer scheme.
Headers
Required date-based version header
Query Parameters
Filter by status. Supply a comma-separated list to match any of several statuses: status=Pending,InProgress returns the export that is running now, if there is one.
Status of a cost usage export. Pending and InProgress mean the job is still running; Completed and Failed are terminal and never change afterwards.
Possible values: Pending, InProgress, Completed, or Failed.
The number of results to return per page. When omitted, the server defaults to 100. Out-of-range values return 400 OUT_OF_RANGE.
1 <= x <= 100Cursor from pagination.next of a prior response. Must be reused with the same query context (path parameters, filters, and limit).
Response
A paginated list of cost usage exports. An export outlives its file, so most items are Completed with file_expired set to true; check that field, not status, to find the exports that can still be downloaded.
A paginated list of cost usage exports.
The page of cost usage exports, newest first. download_url and download_url_expires_at are always null here; request a single export to get a link.
Show child attributes
Show child attributes
Cursor envelope for the next page. null (or absent) on the final page of results.
Show child attributes
Show child attributes
{ "next": "eyJsYXN0X2lkIjogImluZGV4LTQifQ==" }
Was this page helpful?