Submit Webhook Job By ID
Description
This API enables you to submit a job to a Job Pool that triggers a Webhook endpoint.
Request Details
Request URL
{api-domain}/baas/v1/project/{project_id}/job_scheduling/job
Request Headers
Authorization: Zoho-oauthtoken {oauth_token}
Content-Type: application/json
Optional Headers
CATALYST-ORG: {org_id}
Environment: Development
Scope
ZohoCatalyst.job.CREATE
Request JSON
You must send a JSON with its corresponding values as shown below.
{
"request_method": "post",
"source_type": "API",
"job_config": {
"number_of_retries": "2",
"retry_interval": 1800
},
"job_name": "webhookPost",
"jobpool_id": "10108000003823632",
"target_type": "Webhook",
"url": "https://www.zoho.com",
"headers": {
"h1": "v1"
},
"request_body": "{'key1':'val1'}"
}
You will feed this Request JSON to your Request Body, and you need to provide the value of:
Response Details
The JSON response returns the metadata of the submitted job. The response will also contain the details of the user who submitted the job.
curl -X POST
https://api.catalyst.zoho.com/baas/v1/project/{project_id}/job_scheduling/job
-H “Authorization: Zoho-oauthtoken 1000.91016.2f57”
-H “Content-Type:application/json”
--data-raw $’{“request_method”:“post”,“source_type”:“API”,“job_config”:{“number_of_retries”:“2”,“retry_interval”:1800},“job_name”:“webhookPost”,“jobpool_id”:“10108000003823632”,“target_type”:“Webhook”,“url”:“https://www.zoho.com”,“headers”:{“h1”:“v1”},“request_body”:"{'key1':'val1'}"}'
{
"status": "success",
"data": {
"job_id": "10108000004194125",
"created_time": "Jun 05, 2024 04:37 PM",
"response_code": null,
"start_time": {},
"end_time": {},
"submitted_on": {
"startTimeToRedirectLogsPage": "05/06/2024 16:32",
"timeWithGivenTimezone": "Jun 05, 2024 04:37 PM IST",
"timeWithJobTimezone": "Jun 05, 2024 04:37 PM IST"
},
"job_status": "PENDING",
"capacity": {
"number": "1"
},
"job_meta_details": {
"id": "10108000004194126",
"url": "https://www.zoho.com",
"job_name": "webhookPost",
"job_config": {
"number_of_retries": 2,
"retry_interval": 1800
},
"target_type": "Webhook",
"target_details": {
"target_name": "https://www.zoho.com"
},
"source_type": "API",
"source_details": {
"source_name": "API"
},
"jobpool_id": "10108000003823632",
"jobpool_details": {
"type": "Webhook",
"name": "VendorDataFetch",
"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:47 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:47 PM",
"project_details": {
"project_name": "ZylkerShipments",
"id": "10108000003823392",
"project_type": "Live"
},
"id": "10108000003823632"
},
"headers": {
"h1": "v1"
},
"params": {},
"request_method": "post",
"request_body": "{'key1':'val1'}"
},
"retried_count": null,
"parent_job_id": "10108000004194125",
"execution_time": null
}
}
Yes
No
Send your feedback to us