Skip to main content
POST
/
tasks
Create a task
import requests

url = "https://{FUSION HOST}/api/tasks"

payload = {
    "type": "rest-call",
    "id": "test-task-created",
    "callParams": {
        "uri": "solr://system_jobs_history/update",
        "method": "post",
        "queryParams": { "wt": "json" },
        "headers": {},
        "entity": "<root><delete><query>timestamp_dt:[* TO NOW-30DAYS] AND type_s:history</query></delete><commit /></root>"
    }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
{
  "id": "<string>",
  "type": "<string>"
}

Body

application/json · object

JSON-formatted configuration values.

The body is of type object.

Response

200 - application/json

successful operation

id
string
type
string