LinkedIn
Copied!

Table of Contents

Integrating with a REST API by using OpenAPI Specification

Simplify your integration with a REST API by connecting to an OpenAPI Specification. By using the complete, accurate schema that is published in your OpenAPI Specification, you can easily create and update data sources in Pega Platform.

  1. In the navigation pane of App Studio, click Data.

  2. On the Data objects and integrations landing page, click a data page.

  3. On the Data pages tab, in the data page for which you want to configure data sources, click More Configure source .

  4. On the Connection details page, in the System field, select a system of record.

    • Create new - Create a new system to connect to an external database by using a REST connection. Then, enter a name and a description for the new system.
    • Use an existing system - Select the name of an existing system to connect to an external database by using a REST connection.
  5. In the Connection field, select Use openAPI.

  6. In the OpenAPI source field, choose the source of the YAML file to which you want to connect.

    • Specification path – In the OpenAPI specification path field, enter the location of the .yaml file.
    • Upload a YAML file – Click Choose File, and then select the .yaml file and click Open.
  7. Click Next.

  8. On the OpenAPI connection method page, in the Tag field, select the tag that you use to group methods related to a specific category, for example, Credit card applications.

    The system displays a list of GET and POST operations available in the .yaml file.
  9. Select the method that you want to use to connect to your OpenAPI specification.

    To use the POST method as a source for your data page, the content type for the request body must be application/x-www-form-urlencoded. The content type for the response body must be application/json.

    If you are using the POST method to update a save plan, the supported content type for the request and response body is application/json. For more information, see Configuring a save plan for a data page in App Studio.

  10. Click Next to advance to the Data mapping page.

Map the fields from your OpenAPI specification to the data page. For more information, see Mapping fields for data pages.

Have a question? Get answers now.

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