Skip to main content


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

Configuring a REST connection

Updated on April 6, 2022

On the Connection page of the Create REST Integration wizard, you can configure the connection of your system with the external REST service.

  1. In the System details section, in the Name field, enter the name of the source system. This field represents the name of the system that hosts the external REST service.
    For example:

    For example, if the external REST service is a weather service such as Google Weather API, you can enter Google Weather in this field.

  2. In the Endpoint URL field, enter the endpoint URL of the external REST service.
    The system analyzes this URL and suggests the elements of the URL that represent resource path parameters and query string parameters.

    For example, if you enter a URL in the format https//sampleURL.com/res_path1/res_path2?URLkey={URLkey}, res_path1 and res_path2 are resource path parameters, and URLkey is a query string parameter. {URLkey} represents the value of URLkey that is substituted at run time.

    Note: The system removes the query string parameters in the Endpoint URL field. In this example, the URL is updated to https//sampleURL.com/res_path1/res_path2, and URLkey is displayed in the Query string parameters section.
  3. Optional: To update the suggested resource path names, in the Resource path section, click Add component and then select the Parameter check box next to each resource path name that is a parameter. The system updates the endpoint URL accordingly.
    If you mark a resource path name as a parameter, the system generates a property as part of the request data model and substitutes the property's value for the value of the parameter at run time.

    The parameter is displayed in curly braces in the endpoint URL.

    In the example in step 2, if you mark res_path1 as a parameter, it is displayed as {res_path1} in the endpoint URL.

  4. Optional: To update the suggested query string parameters or add more, in the Query string parameters section, click Add parameter.
    Note: The system considers query string parameters as part of the request and creates properties for them.
  5. Optional: To add custom headers for the external REST service, click Add header.
    The system adds each request header to the REST connector rule that is generated for the methods that you select on the Resource methods page of the wizard. The value for each header is the value that you specify in the first sample that you collect on the Data model page of the wizard.
  6. Optional: To configure the authentication for the data source that is created from your REST integration, in the Authentication section, click Add authentication.
    Specify or create an authentication profile by selecting one of the following options:
    ChoicesActions
    Define NewTo configure a Basic authentication profile, in the Authentication scheme field, select Basic, and then complete the fields in the section. If the external service requires preemptive authentication, select Preemptive authentication.
    To configure NTLM authentication, in the Authentication scheme field, select NTLM, and then complete the fields in the section.
    To configure OAuth 2.0 authentication:
    1. In the Authentication scheme field, select OAuth 2.0.
    2. Complete the fields in this section by following the steps that you use to complete the OAuth 2.0 tab of an Authentication Profile. For more information, see Configuring an OAuth 2.0 authentication profile.
      If you select Authorization code in the Grant type list, click Connect to generate an access token. This action authenticates and authorizes your connection with the OAuth 2.0 service provider and allows you to access protected content. Click Disconnect to revoke the access token.
      Note: The Revoke access tokens button is not visible on this page. Instead, you can use the Disconnect button.
    Use ExistingIn the Profile Name field, enter the profile name of an existing authentication profile.
  7. Optional: If you selected OAuth 2.0 in step 6, you can add additional endpoint parameters to pass to your specified OAuth provider.
    For example: If a token is no longer required for your application, you can add additional parameters to revoke the token in the Add revoke endpoint parameters section.
    1. To add parameters, in the Additional endpoint parameters section, click Add parameter in the following sections:
      • Add authorization endpoint parameters
      • Add revoke endpoint parameters
      • Add access token parameters
      • Add refresh token parameters
    2. In the Name field, enter the name that describes the resource parameter that is to be included in the resource path.
    3. In the Value field, enter the value of the resource parameter.
  8. Click Next.
  • Previous topic Creating a REST integration by using the Create REST integration wizard
  • Next topic Selecting methods for REST integration

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