Skip to main content


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

Creating a custom repository

Updated on April 6, 2022

Use a repository API to create a custom repository for repository types that are not provided with Pega Platform. For example, you can build a Google Drive custom repository type. Custom repository types appear in the Pega Platform user interface.

Before you begin:

Note: Ensure that you review the restrictions of adding a repository for case attachments in Requirements and restrictions for case attachments in a file storage repository. If you fail to observe restrictions while you implement a repository, you can experience system failures.

Before creating a repository, you must have access to the storage provider's API and you must select the authentication mode to use with the API. For interactive authentication, use OAuth 2.0 and the Information Mashup gadget. For more information about this gadget, see Creating an External web component. For non-interactive authentication, use basic authentication.
Once you create a custom repository type, create one or more connections to it. Custom repositories behave in the same way as the repositories delivered with Pega Platform.
  1. Open your application.
  2. Create a child class of Embed-Repository-Type for your repository type:
    Note: Do not create a subclass directly under Embed-Repository-Type. This class is reserved for repositories that are implemented by Pega.
    • Include the repository name at the end of the new class name. For example, Embed-Repository-Type-Nexus.
    • Create the new class as an abstract class.
  3. To add support for the custom repository type to the Data-Repository rule form, override the pyRepoConfiguration section in the new class.
  4. Customize the activities for your class.
  5. Configure the repository type.
    1. Upload an icon that represents your custom repository type to the webwb directory.
    2. Create a field value for the new repository type in the Data-Repository class for the pyType field.
      Use S3 configuration as an example. For more information, see Adding an S3 repository.
    3. Update the Code-Pega-List.pyRepoTypes data transform with the repository details, such as icon and name.
  6. Implement the following repository APIs:
    • Create folder API (D_pxNewFolder)
    • Create file API (D_pxNewFile)
    • Get file API (D_pxGetFile)
    • List files API (D_pxListFiles)
    • Exists API (pxExists when rule)
    • Delete API (D_pxDelete)
    • Is Authenticated API (D_pxIsAuthenticated)

    For usage information about these APIs, see Using repository APIs in 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