Registering a Job Kill Order
Problem
You want to kill a process associated with a content item.
Solution
Use the API to delete a job using its job key. You’ll need the GUID for the content item, and the job key associated with the job you wish to kill.
- Get content GUID from the Dashboard’s Info tab, or by following Viewing Content Information.
- To find the job key, see Viewing Jobs for Content.
from posit import connect
= '154bd2af-e8fa-4aa4-aab8-dcef701f4af9'
CONTENT_ITEM_GUID = 'CwCoI9tizMRRcvLw'
JOB_KEY
= connect.Client()
client f"v1/content/{CONTENT_ITEM_GUID}/jobs/{JOB_KEY}") client.delete(
library(connectapi)
library(httr)
<- "154bd2af-e8fa-4aa4-aab8-dcef701f4af9"
CONTENT_ITEM_GUID <- "CwCoI9tizMRRcvLw"
JOB_KEY
<- connect()
client <- client$DELETE(
response ::glue("v1/content/{CONTENT_ITEM_GUID}/jobs/{JOB_KEY}"),
glue )
> print(response)
://connect.company.co/__api__/v1/content/fdc3f938-3ace-4a22-8af2-1a8f17828b6a/jobs/CwCoI9tizMRRcvLw]
Response [https: 2024-06-21 17:48
Date: 200
Status-Type: application/json; charset=utf-8
Content: 199 B Size