Get API key details
curl --request GET \
--url https://api.pinecone.io/admin/api-keys/{api_key_id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Pinecone-Api-Version: <x-pinecone-api-version>'import requests
url = "https://api.pinecone.io/admin/api-keys/{api_key_id}"
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/api-keys/{api_key_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.pinecone.io/admin/api-keys/{api_key_id}",
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/api-keys/{api_key_id}"
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/api-keys/{api_key_id}")
.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/api-keys/{api_key_id}")
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_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"roles": [
"ProjectEditor"
]
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
},
"status": 401
}{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "The index exceeds the project quota of 5 pods by 2 pods. Upgrade your account or change the project settings to increase the quota."
},
"status": 429
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "The index exceeds the project quota of 5 pods by 2 pods. Upgrade your account or change the project settings to increase the quota."
},
"status": 429
}API Keys
Get API key details
Get an API key’s details, excluding its secret.
GET
/
admin
/
api-keys
/
{api_key_id}
Get API key details
curl --request GET \
--url https://api.pinecone.io/admin/api-keys/{api_key_id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Pinecone-Api-Version: <x-pinecone-api-version>'import requests
url = "https://api.pinecone.io/admin/api-keys/{api_key_id}"
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/api-keys/{api_key_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.pinecone.io/admin/api-keys/{api_key_id}",
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/api-keys/{api_key_id}"
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/api-keys/{api_key_id}")
.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/api-keys/{api_key_id}")
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_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"roles": [
"ProjectEditor"
]
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
},
"status": 401
}{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "The index exceeds the project quota of 5 pods by 2 pods. Upgrade your account or change the project settings to increase the quota."
},
"status": 429
}{
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
},
"status": 500
}{
"error": {
"code": "QUOTA_EXCEEDED",
"message": "The index exceeds the project quota of 5 pods by 2 pods. Upgrade your account or change the project settings to increase the quota."
},
"status": 429
}Authorizations
An access token must be provided in the Authorization header using the Bearer scheme.
Headers
Required date-based version header
Path Parameters
API key ID
Response
The details of the API key, excluding the API key secret.
The details of an API key, without the secret.
The unique ID of the API key.
The name of the API key.
The ID of the project containing the API key.
The roles assigned to the API key.
A role that can be assigned to an API key.
Possible values: ProjectEditor, ProjectViewer, ControlPlaneEditor, ControlPlaneViewer, DataPlaneEditor, or DataPlaneViewer.
Was this page helpful?