Method: projects.locations.ragCorpora.get

Gets a RagCorpus.

Endpoint

get https://{endpoint}/v1beta1/{name}

Where {service-endpoint} is one of the supported service endpoints.

Path parameters

name string

Required. The name of the RagCorpus resource. Format: projects/{project}/locations/{location}/ragCorpora/{ragCorpus}

Request body

The request body must be empty.

Example request

Python


from vertexai.preview import rag
import vertexai

# TODO(developer): Update and un-comment below lines
# PROJECT_ID = "your-project-id"
# corpus_name = "projects/{PROJECT_ID}/locations/us-central1/ragCorpora/{rag_corpus_id}"

# Initialize Vertex AI API once per session
vertexai.init(project=PROJECT_ID, location="us-central1")

corpus = rag.get_corpus(name=corpus_name)
print(corpus)
# Example response:
# RagCorpus(name='projects/[PROJECT_ID]/locations/us-central1/ragCorpora/1234567890',
# display_name='test_corpus', description='Corpus Description',
# ...

Response body

If successful, the response body contains an instance of RagCorpus.