How to get Time Trigger details from Orchestrator using Orchestrator API?

Hi Team,

Here we need to get all the trigger details from Orchestrator using Orchestrator API, can you please help us how to provide Json payload to get the details?

Json payload format to get Trigger details of all the triggers present in Orchestrator

Regards,
E Sai Prasad

Hi!

Check out your orchestrator’s swagger page
Orchestrator - Building API Requests

To get the triggers you would do this:

curl -X 'GET' \
  '[baseurl]/orchestrator_/odata/JobTriggers' \
  -H 'accept: application/json' \
  -H 'X-UIPATH-OrganizationUnitId: [X]' <--- Replace [X] with folderID

Here’s an example value for the response:

{
  "value": [
    {
      "JobId": 0,
      "TriggerType": "None",
      "Status": "New",
      "ItemKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "ItemId": 0,
      "Timer": "2024-11-27T07:04:51.181Z",
      "TriggerMessage": "string",
      "Id": 0
    }
  ]
}

However the X-UiPath-OrganizationUnitId is the folderID where the triggers are, so you would need to get the folderID from each of your folders.
To get the folderID’s run this:

curl -X 'GET' \
  '[baseurl]/orchestrator_/odata/Folders' \
  -H 'accept: application/json'

Here’s an example value for the response:

{
  "value": [
    {
      "Key": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "DisplayName": "string",
      "FullyQualifiedName": "string",
      "Description": "string",
      "FolderType": "Standard",
      "IsPersonal": true,
      "ProvisionType": "Manual",
      "PermissionModel": "InheritFromTenant",
      "ParentId": 0,
      "ParentKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "FeedType": "Undefined",
      "Id": 0 <--- FOLDER ID!
    }
  ]
}

Notice that you only get the JobID from the GET JobTriggers

To get more information about a specific job you need to run this:

curl -X 'GET' \
  '[baseurl]/orchestrator_/odata/Jobs([JobId])' \ <--- Replace [JobId] with the actual Id
  -H 'accept: application/json'

This will give you this example value:

{
  "Key": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "StartTime": "2024-11-27T07:08:29.248Z",
  "EndTime": "2024-11-27T07:08:29.248Z",
  "State": "Pending",
  "JobPriority": "Low",
  "SpecificPriorityValue": 100,
  "Robot": {
    "LicenseKey": "string",
    "MachineName": "string",
    "MachineId": 0,
    "Name": "string",
    "Username": "string",
    "ExternalName": "string",
    "Description": "string",
    "Type": "NonProduction",
    "HostingType": "Standard",
    "ProvisionType": "Manual",
    "Password": "string",
    "CredentialStoreId": 0,
    "UserId": 0,
    "Enabled": true,
    "CredentialType": "Default",
    "Environments": [
      {
        "Name": "string",
        "Description": "string",
        "Robots": [
          "string"
        ],
        "Type": "Dev",
        "Id": 0
      }
    ],
    "RobotEnvironments": "string",
    "ExecutionSettings": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "IsExternalLicensed": true,
    "LimitConcurrentExecution": true,
    "LastModificationTime": "2024-11-27T07:08:29.248Z",
    "LastModifierUserId": 0,
    "CreationTime": "2024-11-27T07:08:29.248Z",
    "CreatorUserId": 0,
    "Id": 0
  },
  "Release": {
    "Key": "string",
    "ProcessKey": "string",
    "ProcessVersion": "string",
    "IsLatestVersion": true,
    "IsProcessDeleted": true,
    "Description": "string",
    "Name": "string",
    "EnvironmentId": 0,
    "EnvironmentName": "string",
    "Environment": {
      "Name": "string",
      "Description": "string",
      "Robots": [
        "string"
      ],
      "Type": "Dev",
      "Id": 0
    },
    "EntryPointId": 0,
    "EntryPointPath": "string",
    "EntryPoint": {
      "UniqueId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "Path": "string",
      "InputArguments": "string",
      "OutputArguments": "string",
      "DataVariation": {
        "Content": "string",
        "ContentType": "Json",
        "Id": 0
      },
      "Id": 0
    },
    "InputArguments": "string",
    "ProcessType": "Undefined",
    "SupportsMultipleEntryPoints": true,
    "RequiresUserInteraction": true,
    "IsAttended": true,
    "IsCompiled": true,
    "AutomationHubIdeaUrl": "string",
    "CurrentVersion": {
      "ReleaseId": 0,
      "VersionNumber": "string",
      "CreationTime": "2024-11-27T07:08:29.248Z",
      "ReleaseName": "string",
      "Id": 0
    },
    "ReleaseVersions": [
      {
        "ReleaseId": 0,
        "VersionNumber": "string",
        "CreationTime": "2024-11-27T07:08:29.248Z",
        "ReleaseName": "string",
        "Id": 0
      }
    ],
    "Arguments": {
      "Input": "string",
      "Output": "string"
    },
    "ProcessSettings": {
      "ErrorRecordingEnabled": true,
      "Duration": 0,
      "Frequency": 0,
      "Quality": 0,
      "AutoStartProcess": true,
      "AlwaysRunning": true,
      "AutopilotForRobots": {
        "Enabled": true,
        "HealingEnabled": true
      }
    },
    "VideoRecordingSettings": {
      "VideoRecordingType": "None",
      "QueueItemVideoRecordingType": "None",
      "MaxDurationSeconds": 0
    },
    "AutoUpdate": true,
    "HiddenForAttendedUser": true,
    "FeedId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "JobPriority": "Low",
    "SpecificPriorityValue": 100,
    "OrganizationUnitId": 0,
    "OrganizationUnitFullyQualifiedName": "string",
    "TargetFramework": "Legacy",
    "RobotSize": "Small",
    "Tags": [
      {
        "Name": "string",
        "DisplayName": "string",
        "Value": "string",
        "DisplayValue": "string"
      }
    ],
    "RemoteControlAccess": "None",
    "LastModificationTime": "2024-11-27T07:08:29.248Z",
    "LastModifierUserId": 0,
    "CreationTime": "2024-11-27T07:08:29.248Z",
    "CreatorUserId": 0,
    "Id": 0
  },
  "ResourceOverwrites": "string",
  "Source": "string",
  "SourceType": "Manual",
  "BatchExecutionKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Info": "string",
  "CreationTime": "2024-11-27T07:08:29.248Z",
  "StartingScheduleId": 0,
  "ReleaseName": "string",
  "Type": "Unattended",
  "InputArguments": "string",
  "OutputArguments": "string",
  "HostMachineName": "string",
  "HasMediaRecorded": true,
  "HasVideoRecorded": true,
  "PersistenceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "ResumeVersion": 0,
  "StopStrategy": "SoftStop",
  "RuntimeType": "NonProduction",
  "RequiresUserInteraction": true,
  "ReleaseVersionId": 0,
  "EntryPointPath": "string",
  "OrganizationUnitId": 0,
  "OrganizationUnitFullyQualifiedName": "string",
  "Reference": "string",
  "ProcessType": "Undefined",
  "Machine": {
    "LicenseKey": "string",
    "Name": "string",
    "Description": "string",
    "Type": "Standard",
    "Scope": "Default",
    "NonProductionSlots": 0,
    "UnattendedSlots": 0,
    "HeadlessSlots": 0,
    "TestAutomationSlots": 0,
    "HostingSlots": 0,
    "AutomationCloudSlots": 0,
    "AutomationCloudTestAutomationSlots": 0,
    "Key": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "EndpointDetectionStatus": "NotAvailable",
    "RobotVersions": [
      {
        "Count": 0,
        "Version": "string",
        "MachineId": 0
      }
    ],
    "RobotUsers": [
      {
        "UserName": "string",
        "RobotId": 0,
        "HasTriggers": true
      }
    ],
    "AutomationType": "Any",
    "TargetFramework": "Any",
    "ServerlessLicensingModel": "RobotUnits",
    "UpdatePolicy": {
      "Type": "None",
      "SpecificVersion": "string"
    },
    "ClientSecret": "string",
    "Tags": [
      {
        "Name": "string",
        "DisplayName": "string",
        "Value": "string",
        "DisplayValue": "string"
      }
    ],
    "MaintenanceWindow": {
      "enabled": true,
      "jobStopStrategy": "None",
      "cronExpression": "string",
      "timezoneId": "string",
      "duration": 0,
      "nextExecutionTime": "2024-11-27T07:08:29.248Z"
    },
    "VpnSettings": {
      "cidr": "string"
    },
    "Id": 0
  },
  "ProfilingOptions": "string",
  "ResumeOnSameContext": true,
  "LocalSystemAccount": "string",
  "OrchestratorUserIdentity": "string",
  "RemoteControlAccess": "None",
  "StartingTriggerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "MaxExpectedRunningTimeSeconds": 0,
  "ServerlessJobType": "RobotJob",
  "ResumeTime": "2024-11-27T07:08:29.248Z",
  "LastModificationTime": "2024-11-27T07:08:29.248Z",
  "AutopilotForRobots": {
    "Enabled": true,
    "HealingEnabled": true
  },
  "Id": 0
}

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.