Loading...

Patch Cron

Description

This API enables you to enable or disable a cron present in the project. The cron is referred by its unique identifier like ID.

Note: This API requests it to disable a cron. You need to pass true as the value for the key cron_status in the sample request, if your requirement is to enable the cron.

Request Details

Request URL

PATCH

{app_domain}/baas/v1/project/{project_id}/job_scheduling/cron/{cron_id}

copy

project_id
Numerical
The unique ID of the project

cron_id
Numerical
The unique ID of the cron

cron_name
String
The name of the cron

Request Headers

Authorization: Zoho-oauthtoken {oauth_token}

Optional Headers

CATALYST-ORG: {org_id}

Environment: Development

Scope

ZohoCatalyst.cron.UPDATE

Response Details

The JSON response returns the metadata of the cron you are required to enable or disable. The response will also contain the details of the user who changed the status of the cron.

Sample Request
copy

curl -X PATCH https://api.catalyst.zoho.com/baas/v1/project/10278000000019013/job_scheduling/cron/10108000004280087 -H “Authorization: Zoho-oauthtoken 1000.91016.2f57” -H “Content-Type:application/json” --data-raw ‘{“id”:“10108000004280087”,“cron_status”:false}’

Sample Response
copy
{
"status": "success",
"data": {
    "cron_name": "circuitCron",
    "cron_type": "Calendar",
    "cron_execution_type": "pre-defined",
    "job_meta": {
    "id": "10108000004280089",
    "job_name": "j",
    "job_config": {
        "number_of_retries": 0
    },
    "target_type": "Circuit",
    "target_details": {
        "id": "10108000004194246",
        "target_name": "abc"
    },
    "source_type": "Cron",
    "source_details": {
        "id": "10108000004280087",
        "source_name": "circuitCron",
        "details": {
        "cron_execution_type": "pre-defined"
        }
    },
    "jobpool_id": "10108000003823699",
    "jobpool_details": {
        "type": "Circuit",
        "name": "InventoryDataMaintaince",
        "created_by": {
        "zuid": "77941453",
        "is_confirmed": false,
        "email_id": "emmy@zylker.com",
        "first_name": "Amelia Burrows",
        "last_name": "",
        "user_type": "Admin",
        "user_id": "10108000000009004"
        },
        "created_time": "May 28, 2024 04:49 PM",
        "modified_by": {
        "zuid": "77941453",
        "is_confirmed": false,
        "email_id": "emmy@zylker.com",
        "first_name": "Amelia Burrows",
        "last_name": "",
        "user_type": "Admin",
        "user_id": "10108000000009004"
        },
        "modified_time": "May 28, 2024 04:49 PM",
        "capacity": {
        "number": "3"
        },
        "project_details": {
        "project_name": "ZylkerShipments",
        "id": "10108000003823392",
        "project_type": "Live"
        },
        "id": "10108000003823699"
    },
    "headers": {},
    "params": {
        "key1": "value1",
        "key2": "value2",
        "key3": "value3"
    }
    },
    "cron_status": false,
    "created_time": "Jun 07, 2024 11:09 AM",
    "created_by": {
    "zuid": "77941453",
    "is_confirmed": false,
    "email_id": "emmy@zylker.com",
    "first_name": "Amelia Burrows",
    "last_name": "",
    "user_type": "Admin",
    "user_id": "10108000000009004"
    },
    "modified_time": "Jun 07, 2024 11:09 AM",
    "modified_by": {
    "zuid": "77941453",
    "is_confirmed": false,
    "email_id": "emmy@zylker.com",
    "first_name": "Amelia Burrows",
    "last_name": "",
    "user_type": "Admin",
    "user_id": "10108000000009004"
    },
    "project_details": {
    "project_name": "ZylkerShipments",
    "id": "10108000003823392",
    "project_type": "Live"
    },
    "end_time": "1717871399",
    "cron_detail": {
    "hour": 4,
    "minute": 3,
    "second": 0,
    "repetition_type": "daily",
    "timezone": "Asia/Kolkata"
    },
    "success_count": 0,
    "failure_count": 0,
    "id": "10108000004280087"
}
}
View more