get_document
Retrieve the contents of a document from Pega as a base64-encoded string. Uses the document ID to download content after validating access.
Instructions
Get contents of a document as base64 encoded string. Downloads document content based on the documentID parameter. The API validates the documentID and checks if the user has access to view the document before returning the base64 encoded content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| documentID | Yes | Document ID to retrieve content for. This is the unique identifier that identifies the specific document in the Pega system. The document must exist and be accessible to the current user. | |
| sessionCredentials | No | Optional session-specific credentials. If not provided, uses environment variables. Supports two authentication modes: (1) OAuth mode - provide baseUrl, clientId, and clientSecret, or (2) Token mode - provide baseUrl and accessToken. |