REST API Reference > Customer Managed REST API > Configuring agent port and authenticating API requests
  

Configuring agent port and authenticating API requests

Learn how to change the agent port and authenticate API requests in a Customer Managed runtime environment.
By default, the Secure Agents listen to port 9443 for API requests. You can change this port if it conflicts with another process. For more information, see Configure the agent port.
When you log in to the Secure Agent API, the response includes a JWT token that you use to authenticate future API calls in the session. For more information, see Logging in.

Configure the agent port

A customer-facing HTTP proxy on the Secure Agent host authenticates and calls IDMC APIs through the agent.
The proxy listens to port 9443 by default and this port serves all customer-callable endpoints. This is the base URL pattern:
https://<agent-host>:9443
You can change this port by updating the ResilientManagerApp Secure Agent service.
    1In Administrator, select Runtime Environments.
    2Select the Customer Managed runtime environment and open the Service Configuration tab.
    3Select the ResilientManagerApp service from the drop-down list.
    4Edit the port property to set your desired port number.
    5Save the changes and restart the service.
After the service restarts, the proxy begins listening on the new port.

Logging in

Use this resource to log in to the Secure Agent API in a Customer Managed runtime environment.
The login response includes a JWT token that you use to authenticate subsequent API calls through the agent host. No client certificate is required.
Ensure that your user role allows accessing Customer Managed Secure Agent APIs.

POST Request

To log in, you might use the following API call:
POST https://<serverUrl>/rm/api/v2/login
Content-Type: application/json

{
"username": "jdoe@example.com",
"password": "s3cr3t"
}
The default port is 9443.
The following is a login example using curl:
curl -sk -X POST https://<serverUrl>/rm/api/v2/login \
-H "Content-Type: application/json" \
-d '{"username":"jdoe@example.com","password":"s3cr3t"}'
The following table describes the attributes:
Field
Type
Required
Description
username
String
Yes
IDMC user name for the organization that you want to log in to.
password
String
Yes
The user's configured Customer Managed Secure Agent API password.
This is not the password used to log in to IDMC.

POST Response

Returns the user object if the request is successful. Returns the error object if errors occur.
The following is a sample successful response:
{
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresAt": "2026-06-01T12:00:00Z
}
The response contains the following fields:
Field
Type
Description
token
String
JWT to include in the RM-USER-TOKEN header of subsequent requests through the agent host.
expiresAt
Date
When the token expires.The JWT token expires after 30 minutes (1800 seconds).
You can request a new token before the current one expires. There's no session renewal endpoint, so you need to call the resource again to generate a new token.

Calling APIs through the agent port

You send API requests to Secure Agents in a Customer Managed environment through the agent port.
All requests sent through /rm/<product-api-path> automatically forward to the appropriate back-end service on the Secure Agent. Requests and responses are relayed verbatim.
You can use the following methods in your API calls: GET, POST, PUT, DELETE, PATCH
Before you can call APIs, ensure that you've met the following conditions:

API call

Use the appropriate method with this API call:
<METHOD> https://<serverUrl>/rm/<api-path>
RM-USER-TOKEN: <token>
The default port is 9443.

Examples

The following is a curl example using GET:
curl -sk -X GET https://<serverUrl>/rm/product1/api/v2/startJob \
-H "RM-USER-TOKEN: <token>"
The following is a curl example using POST:
curl -X POST 'https://<serverUrl>/rm/saas/api/v2/job' \
  -H 'Content-Type: application/json' \
  -H 'RM-USER-TOKEN: <offline user jwt>' \
  -d '{
    "taskId": "01C08X0Z000000000003",
    "@type": "job",
    "taskType": "MTT"
  }'
The following is a POST request example:
POST <serverUrl>/api/v2/job HTTP/1.1
Content-Type: application/json
Accept: application/json
RM-USER-TOKEN: <token>
{
"taskId": "01C08X0Z000000000003",
"@type": "job",
"taskType": "MTT"
}
The following might be a typical response:
{
"@type": "job",
"taskId": "01C08X0Z000000000003",
"taskType": "MTT",
"runId": 1,
}