Question
Smart Communications
HU
Last activity: 15 Nov 2022 10:20 EST
Constellation JS PCore DataApiUtils.getData for single page data page
Hi everyone,
I'm trying to read a single page type data page from a custom React DX component using the PCore javascript object for API access.
Based on some tests, the DataApiUtils.getData method uses the POST /data_views/{data_view_ID} Get list data view endpoint of the v2 DX API which only works for List typed data pages. The error I'm getting is:
{
"errorClassification": "Validation fail",
"localizedValue": "Validation failed.",
"errorDetails": [
{
"message": "Error_Request_Validation_Pagetype_Dataview",
"erroneousInputOutputFieldInPage": "",
"erroneousInputOutputIdentifier": "",
"errorClassification": "",
"localizedValue": "Page type dataview not supported",
"messageParameters": []
}
]
}
I haven't found any methods for querying a single page data page in the documentation: https://docs-previous.pega.com/using-pcore-and-pconnect-public-apis/87/getdatadataviewname-payload-context-options
Is this missing from the Constellation JS API? I'd like to query the builtin application settings data page for example: D_pxGetApplicationSettingValue.
Hi everyone,
I'm trying to read a single page type data page from a custom React DX component using the PCore javascript object for API access.
Based on some tests, the DataApiUtils.getData method uses the POST /data_views/{data_view_ID} Get list data view endpoint of the v2 DX API which only works for List typed data pages. The error I'm getting is:
{
"errorClassification": "Validation fail",
"localizedValue": "Validation failed.",
"errorDetails": [
{
"message": "Error_Request_Validation_Pagetype_Dataview",
"erroneousInputOutputFieldInPage": "",
"erroneousInputOutputIdentifier": "",
"errorClassification": "",
"localizedValue": "Page type dataview not supported",
"messageParameters": []
}
]
}
I haven't found any methods for querying a single page data page in the documentation: https://docs-previous.pega.com/using-pcore-and-pconnect-public-apis/87/getdatadataviewname-payload-context-options
Is this missing from the Constellation JS API? I'd like to query the builtin application settings data page for example: D_pxGetApplicationSettingValue.
As a workaround I tried using RestClient.invokeRestApi method (https://docs-previous.pega.com/using-pcore-and-pconnect-public-apis/87/invokerestapiroutekey-optionsobject-context) with the getPageData route key but that doesn't pass on the dataViewParameters query parameter so it's not working either.
Any suggestions?
Thank you!