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 describeshowto exposea methodas an API endpointby creatingresources,resourceURIs, and mappings with custom code.
Prerequisites
A custom code project for use as an API service is deployedtoConga RLC.
The method is public and storedwithin 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, seeManaging Application Schemas.
Click the App Launcher () icon from the top-left cornerand go to Admin Console > Custom Code > Resources.
ClickNew. The Create Resource popup appears.
Enter the resource name and clickCreate. The resource is added to the Resources list. Now youmustcreate URL path mapping entries for methods definedin the customcode that you want to expose.
Click theResource Namelink, and then clickNew.
The Create Resource URI screen appears. Enter values in the following fields.
Http Verb
Select a verbto apply to the method.
Route
Enter the route to the API method. This directs incoming API requests to backend resources.
CustomCode Name
Search and select the custom code project.
Class Name
Search and select the class name where the method you will expose is stored.
Method Name
Search and select the method name to expose.
Parameter Information
Select any of the followingsource types and enter a source name for that source type:
Request Body
A source name is not required for a request body parameter type.
UriPath
Query String
Use the plus() icon to add multipleparameters.
ClickSavetoexit, or clickSave & 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 createdin this format:https://<base-url>/api/custom-api/v1/<resource name>/<route>.