Operation and Job Execution APIs

Operations API

The Operations API is responsible for creating, updating, and managing operations within the Ledger system. Each operation is defined with a unique type and definition, enabling the execution of specific tasks. The Operations API automates and manages tasks like reporting, reconciliation, and anomaly detection, enabling centralized control and scheduling.

1. Create or Update Operation

The Create or Update Operation endpoint lets you set up or change tasks like data checks, replication, or reporting. It helps keep processes updated as business needs change.

put

Creates or updates an operation.

Body

Agent supplied information about a ledger operation

@typestring · enumRequiredPossible values:
definitionstringRequired

Defines the specific operation to be performed.

typestring · enumRequired

The nature of the operation.

Possible values:
Responses
200

Response to /api/v1/operation/

application/json
put
/api/v1/operation/
PUT /api/v1/operation/ HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 93

{
  "@type": "cac_ledger_schema_info_ledger_operation_info",
  "definition": "text",
  "type": "PUBLISH"
}
{
  "@type": "cac_ledger_schema_element_ledger_operation_elem",
  "backoff": {
    "delay_decrease": 1,
    "delay_increase": 1,
    "initial_delay_in_millis": 1,
    "maximum_delay_in_millis": 1,
    "minimum_delay_in_millis": 1
  },
  "created_at": "2025-12-06T05:37:26.996Z",
  "id": 1,
  "info": {
    "@type": "cac_ledger_schema_info_ledger_operation_info",
    "definition": "text",
    "type": "PUBLISH"
  }
}

2. Retrieve Specific Operation

Fetches details of a specific operation based on its type and definition.

get

Retrieves an existing operation.

Path parameters
typestringRequired
definitionstringRequired
Responses
200

Response to /api/v1/operation/{type:[^]+}/{definition:[^]+}

application/json
get
/api/v1/operation/{type:[^*]+}/{definition:[^*]+}
GET /api/v1/operation/{type:[^*]+}/{definition:[^*]+} HTTP/1.1
Host: 
Accept: */*
{
  "@type": "cac_ledger_schema_element_ledger_operation_elem",
  "backoff": {
    "delay_decrease": 1,
    "delay_increase": 1,
    "initial_delay_in_millis": 1,
    "maximum_delay_in_millis": 1,
    "minimum_delay_in_millis": 1
  },
  "created_at": "2025-12-06T05:37:26.996Z",
  "id": 1,
  "info": {
    "@type": "cac_ledger_schema_info_ledger_operation_info",
    "definition": "text",
    "type": "PUBLISH"
  }
}

3. Retrieve All Ledger Operation

The Retrieve All Ledger Operations endpoint is used to get a list of all operations, helping to monitor, filter, and manage tasks across the ledger. This is useful for tracking ongoing processes or reviewing completed operations.

get

Queries the available ledger operations.

Query parameters
filterstringOptional
page[size]stringOptional
page[number]stringOptional
sortstringOptional
Responses
200

Response to /api/v1/operation/

No content

get
/api/v1/operation/
GET /api/v1/operation/ HTTP/1.1
Host: 
Accept: */*

No content


Job Execution APIs

The Job Execution API manages tasks within operations, providing real-time monitoring, role-based control, error handling, and dynamic task management. Jobs are specific tasks with assigned roles and parameters.

1. Create or Update Job

The Create or Update Job endpoint is used to define or modify specific tasks within an operation, including their parameters, roles, and execution settings. This is useful for customizing job workflows, such as setting up a data reconciliation task with specific parameters or updating an existing job to change its execution logic or roles.

put

Creates or updates a job.

Path parameters
typestringRequired
definitionstringRequired
Body

Agent supplied information about a ledger job.

@typestring · enumRequiredPossible values:
namestringRequired

A name assigned to a job; unique within its operation

rolesstring[]Required

The roles that are active when executing the job

Responses
200

Response to /api/v1/operation/{type:[^]+}/{definition:[^]+}

application/json
put
/api/v1/operation/{type:[^*]+}/{definition:[^*]+}
PUT /api/v1/operation/{type:[^*]+}/{definition:[^*]+} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 263

{
  "@type": "cac_ledger_schema_info_ledger_job_info",
  "backoff": {
    "delay_decrease": 1,
    "delay_increase": 1,
    "initial_delay_in_millis": 1,
    "maximum_delay_in_millis": 1,
    "minimum_delay_in_millis": 1
  },
  "name": "text",
  "parameters": {
    "ANY_ADDITIONAL_PROPERTY": "text"
  },
  "roles": [
    "text"
  ]
}
{
  "@type": "cac_ledger_schema_element_ledger_job_elem",
  "created_at": "2025-12-06T05:37:26.996Z",
  "id": 1,
  "info": {
    "@type": "cac_ledger_schema_info_ledger_job_info",
    "backoff": {
      "delay_decrease": 1,
      "delay_increase": 1,
      "initial_delay_in_millis": 1,
      "maximum_delay_in_millis": 1,
      "minimum_delay_in_millis": 1
    },
    "name": "text",
    "parameters": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "roles": [
      "text"
    ]
  },
  "operation": {
    "@type": "cac_ledger_schema_element_ledger_operation_elem",
    "backoff": {
      "delay_decrease": 1,
      "delay_increase": 1,
      "initial_delay_in_millis": 1,
      "maximum_delay_in_millis": 1,
      "minimum_delay_in_millis": 1
    },
    "created_at": "2025-12-06T05:37:26.996Z",
    "id": 1,
    "info": {
      "@type": "cac_ledger_schema_info_ledger_operation_info",
      "definition": "text",
      "type": "PUBLISH"
    }
  },
  "revision": 1,
  "status": "EXECUTING",
  "updated_at": "2025-12-06T05:37:26.996Z"
}

2. Retrieve Job

The Retrieve Job endpoint is used to fetch details of a specific job within an operation, including its parameters, status, and associated roles. This is useful for monitoring a job’s progress, reviewing its configuration, or troubleshooting issues during its execution.

get

Retrieves an existing job and information about its executions.

Path parameters
typestringRequired
definitionstringRequired
namestringRequired
Query parameters
datastringRequired
Responses
200

Response to /api/v1/operation/{type:[^]+}/{definition:[^]+}/{name:[^*]+}

application/json
get
/api/v1/operation/{type:[^*]+}/{definition:[^*]+}/{name:[^*]+}
GET /api/v1/operation/{type:[^*]+}/{definition:[^*]+}/{name:[^*]+}?data=text HTTP/1.1
Host: 
Accept: */*
{
  "@type": "cac_ledger_schema_data_ledger_job_data",
  "created_at": "2025-12-06T05:37:26.996Z",
  "executions": [
    {
      "created_at": "2025-12-06T05:37:26.996Z",
      "id": 1,
      "ordinal": 1,
      "parameters": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "response_code": "text",
      "result": {},
      "revision": 1,
      "roles": [
        "text"
      ],
      "started_at": "2025-12-06T05:37:26.996Z",
      "status": "STARTED",
      "stopped_at": "2025-12-06T05:37:26.996Z",
      "updated_at": "2025-12-06T05:37:26.996Z"
    }
  ],
  "id": 1,
  "info": {
    "@type": "cac_ledger_schema_info_ledger_job_info",
    "backoff": {
      "delay_decrease": 1,
      "delay_increase": 1,
      "initial_delay_in_millis": 1,
      "maximum_delay_in_millis": 1,
      "minimum_delay_in_millis": 1
    },
    "name": "text",
    "parameters": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "roles": [
      "text"
    ]
  },
  "revision": 1,
  "status": "EXECUTING",
  "updated_at": "2025-12-06T05:37:26.996Z"
}

2. Delete Job

The Delete Job endpoint is used to remove a specific job within an operation, ensuring outdated or unnecessary tasks are no longer executed. This is useful for maintaining a clean workflow by eliminating jobs that are no longer relevant or required.

delete

Deletes an existing job.

Path parameters
typestringRequired
definitionstringRequired
namestringRequired
Responses
200

Response to /api/v1/operation/{type:[^]+}/{definition:[^]+}/{name:[^*]+}

application/json
delete
/api/v1/operation/{type:[^*]+}/{definition:[^*]+}/{name:[^*]+}
DELETE /api/v1/operation/{type:[^*]+}/{definition:[^*]+}/{name:[^*]+} HTTP/1.1
Host: 
Accept: */*
{
  "@type": "cac_ledger_schema_element_ledger_job_elem",
  "created_at": "2025-12-06T05:37:26.996Z",
  "id": 1,
  "info": {
    "@type": "cac_ledger_schema_info_ledger_job_info",
    "backoff": {
      "delay_decrease": 1,
      "delay_increase": 1,
      "initial_delay_in_millis": 1,
      "maximum_delay_in_millis": 1,
      "minimum_delay_in_millis": 1
    },
    "name": "text",
    "parameters": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "roles": [
      "text"
    ]
  },
  "operation": {
    "@type": "cac_ledger_schema_element_ledger_operation_elem",
    "backoff": {
      "delay_decrease": 1,
      "delay_increase": 1,
      "initial_delay_in_millis": 1,
      "maximum_delay_in_millis": 1,
      "minimum_delay_in_millis": 1
    },
    "created_at": "2025-12-06T05:37:26.996Z",
    "id": 1,
    "info": {
      "@type": "cac_ledger_schema_info_ledger_operation_info",
      "definition": "text",
      "type": "PUBLISH"
    }
  },
  "revision": 1,
  "status": "EXECUTING",
  "updated_at": "2025-12-06T05:37:26.996Z"
}

3. Transition Job Status

The Transition Job Status endpoint is used to update the status of a job, such as starting, pausing, resuming, or stopping its execution. This is useful for dynamically managing jobs based on real-time requirements, such as pausing a job during system maintenance or resuming it afterward.

post

Modifies the status of a job.

Path parameters
typestringRequired
definitionstringRequired
namestringRequired
Query parameters
statusstringRequired
Responses
200

Response to /api/v1/operation/{type:[^]+}/{definition:[^]+}/{name:[^*]+}

application/json
post
/api/v1/operation/{type:[^*]+}/{definition:[^*]+}/{name:[^*]+}
POST /api/v1/operation/{type:[^*]+}/{definition:[^*]+}/{name:[^*]+}?status=text HTTP/1.1
Host: 
Accept: */*
{
  "address": "text",
  "current_status": "text",
  "previous_status": "text"
}

4. List Jobs

The List Jobs endpoint is used to retrieve a list of all jobs within an operation, with optional filtering, sorting, and pagination. This is useful for monitoring multiple jobs, reviewing their statuses, and managing workflows efficiently.

get

Queries the ledger jobs.

Query parameters
filterstringOptional
page[size]stringOptional
page[number]stringOptional
sortstringOptional
Responses
200

Response to /api/v1/operation///

No content

get
/api/v1/operation/*/*/
GET /api/v1/operation/*/*/ HTTP/1.1
Host: 
Accept: */*

No content

5. Retrieve Job Executions

The Retrieve Job Executions endpoint is used to list all executions of a specific job, including their statuses, results, and timestamps. This is useful for tracking the history of a job’s runs, analyzing its performance, and identifying any failures or bottlenecks.

get

Queries the executions

Query parameters
filterstringOptional
page[size]stringOptional
page[number]stringOptional
sortstringOptional
Responses
200

Response to /api/v1/operation///*

No content

get
/api/v1/operation/*/*/*
GET /api/v1/operation/*/*/* HTTP/1.1
Host: 
Accept: */*

No content

Additional Notes:

  • Security: Endpoints require appropriate headers (e.g., request-id, source).

  • Error Handling: All endpoints return structured error messages with a 500 status code for internal server errors.

  • Scalability: Supports pagination for large datasets.

This documentation provides an overview of the key endpoints and their usage for managing operations and job executions within the Ledger system.

The Operations API is responsible for creating, updating, and managing operations within the Ledger system. Each operation is defined with a unique type and definition, enabling the execution of specific tasks.

Last updated