Automic Workload Automation

 View Only

 Return the Max. Resources value for an agent via REST API

Jump to  Best Answer
Steven Blumenkrantz's profile image
Steven Blumenkrantz posted Dec 30, 2025 11:17 AM

How do I use the REST API to return the Max. Resources value for an existing agent?

I am already able to SET the value via:

 "script": ":SET_UC_SETTING WORKLOAD_MAX, <agentName>, 0"

Markus Embacher's profile image
Broadcom Employee Markus Embacher  Best Answer

Hi,

you may also use the GET /{client_id}/system/agents/{object_name} endpoint to get the values:

{
  "active": true,
  "name": "WIN01",
  "jcl_variant": "WINDOWS",
  "platform": "WINDOWS",
  "authenticated": true,
  "version": "12.3.0+low.build.1100",
  "hardware": "x86/2/64",
  "ip_address": "10.132.185.65",
  "port": 2302,
  "software": "WinNT",
  "workload_max_job": 100,
  "workload_max_ft": 100,
  "tls": true,
  "gateway": "UCTLSGTW01",
  "roles": "PROD",
  "linked": true
}

Regards, Markus

Steven Blumenkrantz's profile image
Steven Blumenkrantz

My testing of this leads me to believe that I must use WORKLOAD_MAX to set the value, and WORKLOAD_MAX_JOB to get the value.

To get the value of the variable I am using:
{
  "script": ":SET &maxJob# = GET_UC_SETTING(\"WORKLOAD_MAX_JOB\", \"<AGENT>\", \"\")\n:PRINT \"Max JOB resources: &maxJob#\""
}

Is this correct? Why is it using 2 different variable names?

Also, The POST results in:
{
  "run_id" : 2131013
}

How do I use that to find what the value of the variable is? When I search for that run id in the UI, I click on "Open Report", then I click on "Activation" to see the value of the variable. Is that what I need to do via the REST API?  Is there a simpler way to get the value of the WORKLOAD_MAX_JOB variable?

Steven NODATA's profile image
Steven NODATA

I forgot about the "/{client_id}/executions/{run_id}/reports/{report_type}" call. Once I get the run_id from the GET_UC_SETTING, I can use this to get the report and parse that.