# pip install "pinecone[grpc]"
from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key='API_KEY')
pc.describe_collection(name="tiny-collection")
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });
await pc.describeCollection('tiny-collection');
import io.pinecone.clients.Pinecone;
import org.openapitools.client.model.CollectionModel;
public class DescribeCollectionExample {
public static void main(String[] args) {
Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
CollectionModel collectionModel = pc.describeCollection("tiny-collection");
System.out.println(collectionModel);
}
}
PINECONE_API_KEY="YOUR_API_KEY"
curl -i -X GET "https://api.pinecone.io/collections/tiny-collection" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2024-04"
{
"name": "tiny-collection",
"size": 3126700,
"status": "Ready",
"dimension": 3,
"vector_count": 99,
"environment": "us-east1-gcp"
}{
"status": 401,
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
}
}{
"status": 404,
"error": {
"code": "NOT_FOUND",
"message": "Collection example-collection not found."
}
}{
"status": 500,
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
}
}Backups
Describe a collection
This operation gets a description of a collection.
Serverless indexes do not support collections.
GET
/
collections
/
{collection_name}
# pip install "pinecone[grpc]"
from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key='API_KEY')
pc.describe_collection(name="tiny-collection")
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });
await pc.describeCollection('tiny-collection');
import io.pinecone.clients.Pinecone;
import org.openapitools.client.model.CollectionModel;
public class DescribeCollectionExample {
public static void main(String[] args) {
Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
CollectionModel collectionModel = pc.describeCollection("tiny-collection");
System.out.println(collectionModel);
}
}
PINECONE_API_KEY="YOUR_API_KEY"
curl -i -X GET "https://api.pinecone.io/collections/tiny-collection" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2024-04"
{
"name": "tiny-collection",
"size": 3126700,
"status": "Ready",
"dimension": 3,
"vector_count": 99,
"environment": "us-east1-gcp"
}{
"status": 401,
"error": {
"code": "UNAUTHENTICATED",
"message": "Invalid API key."
}
}{
"status": 404,
"error": {
"code": "NOT_FOUND",
"message": "Collection example-collection not found."
}
}{
"status": 500,
"error": {
"code": "UNKNOWN",
"message": "Internal server error"
}
}# pip install "pinecone[grpc]"
from pinecone.grpc import PineconeGRPC as Pinecone
pc = Pinecone(api_key='API_KEY')
pc.describe_collection(name="tiny-collection")
// npm install @pinecone-database/pinecone
import { Pinecone } from '@pinecone-database/pinecone';
const pc = new Pinecone({ apiKey: 'YOUR_API_KEY' });
await pc.describeCollection('tiny-collection');
import io.pinecone.clients.Pinecone;
import org.openapitools.client.model.CollectionModel;
public class DescribeCollectionExample {
public static void main(String[] args) {
Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
CollectionModel collectionModel = pc.describeCollection("tiny-collection");
System.out.println(collectionModel);
}
}
PINECONE_API_KEY="YOUR_API_KEY"
curl -i -X GET "https://api.pinecone.io/collections/tiny-collection" \
-H "Api-Key: $PINECONE_API_KEY" \
-H "X-Pinecone-Api-Version: 2024-04"
Authorizations
Path Parameters
The name of the collection to be described.
Response
Configuration information and status of the collection.
The CollectionModel describes the configuration and status of a Pinecone collection.
The name of the collection.
Example:
"example-collection"
The status of the collection.
Available options:
Initializing, Ready, Terminating Example:
"Initializing"
The environment where the collection is hosted.
Example:
"us-east1-gcp"
The size of the collection in bytes.
Example:
10000000
The dimension of the vectors stored in each record held in the collection.
Required range:
1 <= x <= 2000Example:
1536
The number of records stored in the collection.
Example:
120000
Was this page helpful?
⌘I