Question
Lantiqx
GB
Last activity: 7 Aug 2024 1:15 EDT
"Execution error" while createing Data Type Record from DX API /data/:data_view
Hi Everyone,
Currently started learning DX API.
Created DataType --> StudentDetails
With Fileds SudentID(Primary Key), FullName
Trying to Create the record from DX API's (/data/:data_view)
See error in the response "An internal error occurred while fetching the results using data view. Please contact administrator.".
Am I misssing any Step here?
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 6 Jul 2024 17:24 EDT
Lantiqx
GB
Thanks Everyone, Issue is resolved now.
In savable data page,
Select "Is this page used for alternate key storage?" and Provide the "StudentID" in Linked field.
Maantic Inc
IN
DX API V2 cannot be run without authentication or SSL enabled, please check that first. If that is there, next instead of :data_view, you have pass a savable data page name which is present in the target environment, that saves records on the target data type. Also you have to create a View on the target data type with the name 'Create' where the properties to be set are present.
Lantiqx
GB
DX API V2 cannot be run without authentication or SSL enabled, please check that first.
I was explorer the below Module Exploring the DX API with Postman
"https://academy.pega.com/challenge/exploring-dx-api-postman/v1"
I was able to create Data for Product, as explained in Module.
If that is there, next instead of :data_view, you have pass a savable data page name which is present in the target environment, that saves records on the target data type.
Yes, Data Page refered in Params tab of Postman
Also you have to create a View on the target data type with the name 'Create' where the properties to be set are present.
Pegasystems Inc.
IN
Can you check the properties that you are passing in the request body should be present in create view.
And savableDatapage should have the proper Data source For creating a DT (empty).
Can you verify this two .
Lantiqx
GB
@pichn, Thanks for the reply. Please find the details below
Request Body:
{
"data": {
"StudentID": "Cust_123",
"FullName": "Cust_123"
}
}
For D_StudentDetailsSavable
Maantic Inc
IN
Instead of lookup, create a data transform and map those properties eg: set as Primary.StudentID equals Param.StudentID
Updated: 3 Jul 2024 2:25 EDT
Pegasystems Inc.
IN
Lantiqx
GB
Yes, View has Primay Properties, these two are primary properties.
Accepted Solution
Updated: 6 Jul 2024 17:24 EDT
Lantiqx
GB
Thanks Everyone, Issue is resolved now.
In savable data page,
Select "Is this page used for alternate key storage?" and Provide the "StudentID" in Linked field.
Toyota Financial Services
AU
Hi KrishnaChaitanya,
Thanks for the details. I am trying to define a mandatory condition on the create view? This validation is not enforced on /data/:data_view DX API V2.
Do you know how to enforce this validations - from the API?
Thanks
Sandeep P V