Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Importing data by using an API

Updated on April 6, 2022

Import data from anywhere in your application without navigating to the Data Designer.

  • Run the pxImportRecordsAPI activity to import data outside of the Data Designer with the following parameters:
      • dataImportPage– The page that contains all of the details required to upload data records for import. This page contains the following information:
        • pyImportPurpose Purpose of the data import.
        • pyDataImportClass Class in which records are imported.
        • pyClassName Class in which records are imported (same as pyDataImportClass).
        • pyDataImportFilePath Location of the .csv file from which records are imported.
        • pyFieldMappingsForAPI Page List property of the Embed-FieldMapping class that holds the mapping between the .csv file and the class property.
        • pyListSeparator The type of list separator that splits the records in the .csv file.
        • pyLocale The locale that is used to display the messages about the data import process.
        • pyID Unique ID of the data import process.
      • isAsynchronous Boolean value that identifies whether the data import process is asynchronous or synchronous.
      • processID Unique ID that allows you to check the data import progress. If you want to pass this ID, set its value in the dataImportPage to pyID'; otherwise, the pxImportRecordsAPI activity creates a new ID.
      • errorFile The name of the .csv file containing the erroneous records that the system encountered while processing the data for import.
  • Optional: To see the progress of the data import, call the D_pxDataImportProgress data page by passing the value of processID for your data import.
    Note: You can also use the pxImportRecordsAPI activity when you import data in the Data Designer. For more information, see Processing records and data before and after import.
  • Previous topic Processing records and data before and after import
  • Next topic Adding data import functionality to your application

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us