Skip to main content
PUT
/
spark
/
configurations
/
{id}
Update a job
import requests

url = "https://{FUSION HOST}/api/spark/configurations/{id}"

payload = {
    "id": "scripted_job_example",
    "sparkConfig": {
        "spark.cores.max": 2,
        "spark.executor.memory": "1g"
    },
    "type": "<string>"
}
headers = {
    "Authorization": "Basic <encoded-value>",
    "Content-Type": "application/json"
}

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

print(response.json())
{
  "id": "scripted_job_example",
  "sparkConfig": {
    "spark.cores.max": 2,
    "spark.executor.memory": "1g"
  },
  "type": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

id
string
required

The name of the job configuration to modify.

Query Parameters

context
string

The app to which this job belongs.

Body

application/json
id
string

The name of the job configuration.

Example:

"scripted_job_example"

sparkConfig
object

The job's configuration details. The configuration keys depend on the type of job. Use /spark/schema to see the configuration schemas for all job types.

Example:
{
"spark.cores.max": 2,
"spark.executor.memory": "1g"
}
type
string

The job type.

Response

200 - */*

OK

id
string

The name of the job configuration.

Example:

"scripted_job_example"

sparkConfig
object

The job's configuration details. The configuration keys depend on the type of job. Use /spark/schema to see the configuration schemas for all job types.

Example:
{
"spark.cores.max": 2,
"spark.executor.memory": "1g"
}
type
string

The job type.