When you need to create, read, update, or delete (CRUD) a custom object with complex validation not supported by Conga RLC's default features, you can use custom code as an API feature. This allows you to implement CRUD operations with the necessary validation logic and expose these custom code methods as API endpoints.

The Resources option allows API service (Resource URI) creation for the developed custom code. This section describes how to expose a method as an API endpoint by creating resources, resource URIs, and mappings with custom code.

Prerequisites

  • A custom code project for use as an API service is deployed to Conga RLC.
  • The method is public and stored within a public class.
  • The model used as a method parameter is a Plain Old CLR Object (POCO) class.
  • A custom object to be used in the custom code has been created. For more details about creating a custom object, see Managing Application Schemas.
  • An object permission for the custom object has been defined. For more details, see Managing Roles and Permission Groups.

To create a resource and resource URI

  1. Log in to the Conga Platform as an admin user.
  2. Click the App Launcher () icon from the top-left corner and go to Admin Console > Custom Code > Resources.
  3. Click New. The Create Resource popup appears.
  4. Enter the resource name and click Create. The resource is added to the Resources list. Now you must create URL path mapping entries for methods defined in the custom code that you want to expose.
  5. Click the Resource Name link, and then click New.
  6. The Create Resource URI screen appears.

    Enter values in the following fields.



    Http Verb

    Select a verb to apply to the method.

    Route

    Enter the route to the API method. This directs incoming API requests to backend resources.

    CustomCode NameSearch and select the custom code project.
    Class NameSearch and select the class name where the method you will expose is stored.
    Method NameSearch and select the method name to expose.
    Parameter Information

    Select any of the following source types and enter a source name for that source type:

    • Request Body

      A source name is not required for a request body parameter type.

    • Uri Path
    • Query String

    Use the plus () icon to add multiple parameters.

  7. Click Save to exit, or click Save & New to store your entry and create a new one.

A new resource URI is accessible from the Resources URI user interface, and you can validate the API behavior using an HTTP client tool like Postman.

Custom API URIs are created in this format: https://<base-url>/api/custom-api/v1/<resource name>/<route>.