"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?

@KrishnaChaitanyaG16918484

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.

@SohamM95

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

Exploring the DX API with Postman | Pega Academy

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.

​​​​​​​

@KrishnaChaitanyaG16918484

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 .

@pichn, Thanks for the reply. Please find the details below

Request Body:

{

“data”: {

“StudentID”: “Cust_123”,

“FullName”: “Cust_123”

}

}

For D_StudentDetailsSavable

@KrishnaChaitanyaG16918484

Instead of lookup, create a data transform and map those properties eg: set as Primary.StudentID equals Param.StudentID

@KrishnaChaitanyaG16918484

Verify if create view have these properties .

StudentID and fullName

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.

@KrishnaChaitanyaG16918484

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

@pichn

Yes, View has Primay Properties, these two are primary properties.

@KrishnaChaitanyaG16918484 This doesn’t work for Page Lists. It only works for Single Page. Does anyone know why? I still get the “Execution error”.