Skip to content

static-content

static-content component

Get a custom component as raw JavaScript

Usage

bash
pega static-content component <componentID> [flags]

Source endpoint: GET /components/{componentID}view command source

Arguments

ArgumentRequiredDescription
componentIDYesComponent ID

Flags

FlagTypeRequiredDefaultDescription
--formatoptionNojsonOutput format (json, compact, yaml, table)
--fieldsoptionNoComma-separated top-level fields to include in output
--dry-runbooleanNoPrint HTTP request details and exit without executing
--quietbooleanNoSuppress all stderr progress/warning output
--verbosebooleanNoEmit full HTTP request/response details to stderr
--no-cachebooleanNoBypass token file cache; perform fresh OAuth exchange
--profileoptionNodefaultNamed config profile
-o, --outputoptionNoWrite component JS to this file path (default: stdout)

Examples

sh
pega static-content component MyComponent
sh
pega static-content component MyComponent --output ./my-component.js

static-content file

Get a static file (binary). --output is required.

Usage

bash
pega static-content file <fileID> [flags]

Source endpoint: GET /files/{fileID}view command source

Arguments

ArgumentRequiredDescription
fileIDYesFile ID

Flags

FlagTypeRequiredDefaultDescription
--formatoptionNojsonOutput format (json, compact, yaml, table)
--fieldsoptionNoComma-separated top-level fields to include in output
--dry-runbooleanNoPrint HTTP request details and exit without executing
--quietbooleanNoSuppress all stderr progress/warning output
--verbosebooleanNoEmit full HTTP request/response details to stderr
--no-cachebooleanNoBypass token file cache; perform fresh OAuth exchange
--profileoptionNodefaultNamed config profile
-o, --outputoptionYesRequired: write binary bytes to this file path

Examples

sh
pega static-content file MyFile --output ./my-file.bin

static-content profile-image

Get a user profile image

Usage

bash
pega static-content profile-image <userId> [flags]

Source endpoint: GET /users/{user_ID}/profile-imageview command source

Arguments

ArgumentRequiredDescription
userIdYesUser ID

Flags

FlagTypeRequiredDefaultDescription
--formatoptionNojsonOutput format (json, compact, yaml, table)
--fieldsoptionNoComma-separated top-level fields to include in output
--dry-runbooleanNoPrint HTTP request details and exit without executing
--quietbooleanNoSuppress all stderr progress/warning output
--verbosebooleanNoEmit full HTTP request/response details to stderr
--no-cachebooleanNoBypass token file cache; perform fresh OAuth exchange
--profileoptionNodefaultNamed config profile
-o, --outputoptionNoWrite image to this file path (default: stdout)

Examples

sh
pega static-content profile-image user123
sh
pega static-content profile-image user123 --output ./profile.jpg