Skip to content

data

data count

Get count of records in a data view by POSTing to /data_views/{dataViewId}/count

Usage

bash
pega data count <dataViewId> [flags]

Source endpoint: POST /data_views/{data_view_ID}/countview command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--paramsoptionNoJSON object of data view parameters → dataViewParameters
-d, --dataoptionNoFull request body as JSON (mutually exclusive with --params)

Examples

sh
pega data count D_MyDataView
sh
pega data count D_MyDataView --params '{"employeeID":"E1"}'
sh
pega data count D_MyDataView --data '{"dataViewParameters":{"employeeID":"E1"}}'

data create

Create a new data record

Usage

bash
pega data create <dataViewId> [flags]

Source endpoint: POST /data/{data_view_ID}view command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--dataoptionYesJSON body (inline, @file, or -)

Examples

sh
pega data create D_MyDataView --data '{"field":"value"}'

data delete

Delete a data record

Usage

bash
pega data delete <dataViewId> [flags]

Source endpoint: DELETE /data/{data_view_ID}view command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--paramsoptionNoJSON object of query parameters identifying the record to delete

Examples

sh
pega data delete D_MyDataView --params '{"id":101}'

data get

Get a data view by ID

Usage

bash
pega data get <dataViewId> [flags]

Source endpoint: GET /data_views/{data_view_ID}view command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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

Examples

sh
pega data get D_MyDataView

data get-action

Get a specific action for a data record

Usage

bash
pega data get-action <dataViewId> [flags]

Source endpoint: POST /data/{data_view_ID}/actions/{action_ID}view command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--actionoptionYesAction ID
--dataoptionNoJSON content (inline, @file, or -)

Examples

sh
pega data get-action D_MyDataView --action myAction
sh
pega data get-action D_MyDataView --action myAction --data '{"field":"value"}'

data get-metadata

Get metadata for a data view by ID

Usage

bash
pega data get-metadata <dataViewId> [flags]

Source endpoint: GET /data_views/{data_view_ID}/metadataview command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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

Examples

sh
pega data get-metadata D_MyDataView

data list-actions

List available actions for a data record

Usage

bash
pega data list-actions <dataViewId> [flags]

Source endpoint: POST /data/{data_view_ID}/actionsview command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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

Examples

sh
pega data list-actions D_MyDataView

data list-objects

List all data objects available in the application

Usage

bash
pega data list-objects [flags]

Source endpoint: GET /data_objectsview command source

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

Examples

sh
pega data list-objects

data list-pages

List data pages available in the application

Usage

bash
pega data list-pages [flags]

Source endpoint: GET /data_pagesview command source

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
--typeoptionNoallData page request type

Examples

sh
pega data list-pages
sh
pega data list-pages --type explorable

data patch

Patch a data record (PATCH with eTag)

Usage

bash
pega data patch <dataViewId> [flags]

Source endpoint: PATCH /data/{data_view_ID}view command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--dataoptionYesJSON body (inline, @file, or -)

Examples

sh
pega data patch D_MyDataView --data '{"field":"value"}'

data perform-action

Perform an action on a data record

Usage

bash
pega data perform-action <dataViewId> [flags]

Source endpoint: PATCH /data/{data_view_ID}/actions/{action_ID}view command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--actionoptionYesAction ID
--dataoptionNoJSON content (inline, @file, or -)
--page-instructionsoptionNoJSON page-instructions array (inline, @file, or -)
--attachmentsoptionNoJSON attachments array (inline, @file, or -)

Examples

sh
pega data perform-action D_MyDataView --action myAction
sh
pega data perform-action D_MyDataView --action myAction --data '{"field":"value"}'
sh
pega data perform-action D_MyDataView --action myAction --data @form.json --page-instructions @pi.json

data query

Query a data view by POSTing to /data_views/

Usage

bash
pega data query <dataViewId> [flags]

Source endpoint: POST /data_views/{data_view_ID}view command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--paramsoptionNoJSON object of data view parameters → dataViewParameters
--maxoptionNoMaximum results to fetch → paging.maxResultsToFetch
--pageoptionNoPage number → paging.pageNumber
--include-totalbooleanNoInclude total count in response → paging.includeTotalCount
-d, --dataoptionNoFull request body as JSON (mutually exclusive with --params/--max/--page/--include-total)

Examples

sh
pega data query D_MyDataView --max 10 --include-total
sh
pega data query D_MyDataView --params '{"employeeID":"E1"}'
sh
pega data query D_MyDataView --data '{"query":{"select":["X"]}}'

data query-metadata

Get metadata for a data view by POSTing to /data_views/{dataViewId}/metadata

Usage

bash
pega data query-metadata <dataViewId> [flags]

Source endpoint: POST /data_views/{data_view_ID}/metadataview command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--paramsoptionNoJSON object of data view parameters → dataViewParameters
-d, --dataoptionNoFull request body as JSON (mutually exclusive with --params)

Examples

sh
pega data query-metadata D_MyDataView
sh
pega data query-metadata D_MyDataView --params '{"employeeID":"E1"}'
sh
pega data query-metadata D_MyDataView --data '{"dataViewParameters":{"employeeID":"E1"}}'

data query-view

Query a specific view of a data view by POSTing to /data_views/{dataViewId}/views/

Usage

bash
pega data query-view <dataViewId> [flags]

Source endpoint: POST /data_views/{data_view_ID}/views/{view_ID}view command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--viewoptionYesView ID within the data view
--paramsoptionNoJSON object of data view parameters → dataViewParameters
--maxoptionNoMaximum results to fetch → paging.maxResultsToFetch
--pageoptionNoPage number → paging.pageNumber
--include-totalbooleanNoInclude total count in response → paging.includeTotalCount
-d, --dataoptionNoFull request body as JSON (mutually exclusive with --params/--max/--page/--include-total)

Examples

sh
pega data query-view D_MyDataView --view myView
sh
pega data query-view D_MyDataView --view myView --max 10 --include-total
sh
pega data query-view D_MyDataView --view myView --params '{"employeeID":"E1"}'

data update

Update a data record (PUT with eTag)

Usage

bash
pega data update <dataViewId> [flags]

Source endpoint: PUT /data/{data_view_ID}view command source

Arguments

ArgumentRequiredDescription
dataViewIdYesData view 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
--dataoptionYesJSON body (inline, @file, or -)

Examples

sh
pega data update D_MyDataView --data '{"field":"value"}'