Usage Service

The Usage service enables you to manage your Control-M license constraints. The service requires Control-M/EM version 9.0.21 or higher.

ctm usage jobs::get

The ctm usage jobs::get command enables the administrator to get a count of eligible jobs, also known as loaded tasks, in the current (active) day from New Day onwards. You can run this command as a cyclic job that can trigger further action when you reach a defined threshold.

CLI Syntax

The following shows the CLI syntax for the ctm usage jobs::get command:

ctm usage jobs::get

REST API Syntax

The following example shows the REST API syntax for the ctm usage jobs::get command in cURL:

Copy
endpoint=
token=
AuthHeader="x-api-key: $token"
# AuthHeader="Authorization: Bearer $token"  #for a session token

curl -H "$AuthHeader" -X GET "$endpoint/usage/jobs"

For more information, see Control-M Automation REST API Reference.

Response

The following example shows a response that the system executed 5000 jobs (or counted 5000 loaded tasks) on a single Control-M/Server:

Copy
{
    "usage":[
        {
            "server":"server1",
            "jobExecution": 5000
        }
    ],
    "totalJobExecution": 5000
}

The following example shows a response with the number of executed jobs (or loaded tasks) on each Control-M/Server when there are multiple servers and the total number of executed jobs:

Copy
{
    "usage":[
        {
            "server":"server1",
            "jobExecution": 5000
        },
        {
            "server":"server2",
            "jobExecution": 200
        },
        {
            "server":"server3",
            "jobExecution": 10000
        }
    ],
    "totalJobExecution": 15200
}