Path: API Management > API Registry
The system can register the APIs saved on the AP server to the system, and have the system manage the APIs.
The system provides two methods to allow users to register APIs, which are through API documents and http / https to register the APIs to the system.
In this section, you can find instructions on how to register APIs to the system using documents compliant with OAS 2.0 or OAS 3.0, including batch registration.
API documents must conform to OAS2.0 or OAS3.0 format to use this feature.

To upload an OpenAPI document via URL, select Upload OpenAPI document via URL, paste the DOC URL into the field, and click Upload to proceed.

The information of this API will be displayed below.

Fill in the API related fields.
Target URL*: Only for registered API, if the source URL has been changed, the new URL can be specified here.
For the underlying API, click on the
icon to access the test external URL page, then click Validate to test whether this API can be used normally.



Click on the
icon of the underlying API to expand the information of this API, and click on the
icon to collapse.


After clicking Register, all APIs in this API module will be registered to the system.
Since the registered APIs are all disabled by default, they must be enabled manually from API Management > API List.
In this section, you can find instructions on how to mount external APIs onto the system using URL methods; the default mode is New(dgrc).


Fill in the data or make selections as instructed below. The fields marked with “*” are required.
Clone from existing API: Clone an existing API to create a new one. Enter the API ID or select it from the API list, then click copy.
Modes: Two API modes are available, Default Mode(dgrc) and dgRv3 compatible(tsmpc).
Default Mode(dgrc):
Fill in API Name*, and configure the URL path if needed.
The system backend options include HTTP API, AI Gateway, and Webhook. The default is HTTP API.
dgRv3 compatible(tsmpc): Fill in both API Module* and API ID*.
Target URL*: URL of the API.
Click on the
/
icon to add/remove URLs.
mtls: Check to enable mutual TLS authentication. Available only in Default Mode(dgrc).
If the backend is set to HTTP API:
Copy the API URL to upload, and paste it to the Target URL* field.
Source IP Diversion: Check to distribute traffic based on the source IP address, allowing for more efficient management of network traffic.
Click Validate to test the configured URL and display the result


Source IP Diversion: Check to distribute traffic based on the source IP address, allowing for more efficient management of network traffic.
Click Validate to test the configured URL and display the result.
To check if the Http Methods* and Target URL* fields are correct, Click Validate.

The result will be displayed below. If the result is Status 200 and there were data in Headers and Body, it means that this API can be used.

If the backend is set to AI Gateway:
Click AI APIKEY to have the system automatically populate the URL.
AI APIKEY: Go to AI Gateway > AI APIKEY to complete the required setup before use.
If the backend is set to Webhook:
The system will automatically populate the URL. Click Validate to test the configured URL and display the result.
Webhook Notify Name: Select the Webhook to register. Go to System Configs > Webhook to complete the Webhook setup before use.
API Log Header Mask: Specify masking for the Header field. For example, if the value is Hello, with a character count of 1 and masking character #, the following will be displayed:
Policy 0: No masking, displays Hello.
Policy 1: Retains the first and last character, displays H###o.
Policy 2: Retains the first character, displays H####.
Policy 3: Retains the last character, displays ####o.
API Log Body Mask Policy: Specify different masking for keywords in the Body content, with support for regular expressions. For example, if the original text, "name":"test","id":"1", with a character count of 2, masking character #, and keyword name, the following will be displayed:
Policy 0: No masking, displays "name":"test","id":"1".
Policy 1: Masks the first and last 2 characters, displays "#name##"test","id":"1".
Policy 2: Masks the first 2 characters, displays "#name":"test","id":"1".
Policy 3: Masks the last 2 characters, displays "#name##"test","id":"1".
Policy 4 uses regular expressions for definition. For example, with a character count of 1 and a mask of #, and a regular expression of name\d, the following will be displayed:
"name1":"test","id":"1" will display as "name1#:"test","id":"1".
"name2":"test","id":"1" will display as "name2#:"test","id":"1".
"name-3":"test","id":"1" will display as "name-3:"test","id":"1".
Fail Discovery Policy*: Specify the action to take when an API connection fails. The system default is set to When the connection fails or the HTTP status code is 4xx (client error) or 5xx (server error); available only in Default Mode(dgrc).
Fail Handle Policy*: Specify how the system handles API connection failures. Choose between No retries or When calling the target URL fails, automatically retry the next target URL; available only in Default Mode(dgrc).
API Module*: New module name of the API in dgRv3 compatible(tsmpc) mode, used for external URL calls. Only alphanumeric characters, underscore “_” and hyphen “-” are allowed in this field.
API ID*: API identification name in dgRv3 compatible(tsmpc) mode, used for external URL calls. Only alphanumeric characters, underscore “_” and hyphen “-” are allowed in this field.
API Name*: API name in Default Mode(dgrc), used for external URL calls.
digiRunner URL: In dgRv3 compatible(tsmpc) mode, the system automatically generates the API call URL for external systems using the specified Module Name* and API ID* . Check to set the authentication method to Path Parameter or No Auth:
Path Parameter: Upon checking, carries over the URL path parameter data when calling the API.
No Auth: Upon checking, allows calling the API without authentication, commonly used for Public APIs.
digiRunner Proxy Path*: Required only when Default Mode(dgrc) is selected. This field maps to the path of the Target URL*. The first character must be "/", and any parameters in the path should be represented as {p}.
For example:
If the target URL is a.b.c/a1/a2, the Proxy Path is /x1/x2.
If the target URL is a.b.c/a1/{id}, the Proxy Path is /x1/x2/{p}.
If the target URL is a.b.c/a1/{id1}/a3/{id2}, the Proxy Path is /x1/{p}/x2/{p}.
No Auth: Upon checking, allows calling the API without authentication, commonly used for Public APIs.
Http Methods*: Specify the HTTP methods of this API, including GET, POST, PUT, DELETE, etc.
Data Format: Select the data format for the upload; it is JSON by default.
JWT Settings: Set whether to use JWE or JWS encryption for Request / Response.
Description: API description.
Label: Fill in the desired text and click the ENTER key to create the label, with a limit of up to five labels allowed. Labels with capitalized characters will automatically be converted to lowercase, and each label can be no more than 20 characters long.
Since the registered APIs are all disabled by default, they must be enabled manually from API Management > API List. Add the API to the group again in order for users to use it.
To test this API, go to API Management > API List to search and test whether this API can be used by users.
Multiple external APIs can also be added. If multiple APIs were added, the system will open APIs randomly when testing in the test area.

You can copy an existing API on the system. Click on the
icon.

Go to Clone from existing API, search for and check the desired API, and click Join.

Click copy to copy and change to a new API.
NOTE: If the API basic information remains unchanged, a warning prompt will pop up, displaying the error message “1353 - [API] already exists”.


