pdstools.pega_io.API

Pega Infinity OAuth2 helpers (credential-file based).

Functions

get_url(→ str)

Return the base URL of the Infinity instance in the credential file.

get_token(→ str)

Fetch an OAuth2 access token for a Pega Platform instance.

Module Contents

get_url(credential_file: os.PathLike) str

Return the base URL of the Infinity instance in the credential file.

Parameters:

credential_file (os.PathLike)

Return type:

str

get_token(credential_file: os.PathLike, verify: bool = True) str

Fetch an OAuth2 access token for a Pega Platform instance.

After configuring OAuth2 in Dev Studio, download the credential file and point this helper at it.

Parameters:
  • credential_file (PathLike) – Path to the credential file downloaded from Pega.

  • verify (bool, default=True) – Whether to verify TLS certificates. Set to False only for unsecured test endpoints.

Returns:

The bearer access token.

Return type:

str