Running your first example

The command below will run the classic Monte-Carlo Pi computation contained in all Spark distributions:

curl -k -X POST \
'https://api.spotinst.io/ocean/spark/cluster/<your cluster id>/app?accountId=<your accountId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ...' \
-d '{ 
     "jobId": "spark-pi",
     "configOverrides": 
        { 
          "type": "Scala", 
          "sparkVersion": "3.2.0",
          "mainApplicationFile": "local:///opt/spark/examples/jars/examples.jar",
          "image": "gcr.io/datamechanics/spark:platform-3.2-latest",
          "mainClass": "org.apache.spark.examples.SparkPi",
          "arguments": ["1000"], 
          "executor": { 
            "instances": 1 
          } 
        }
}'

to use this code we need to replace the cluster id with your own ocean for spark cluster id osc-XXXXXXXX and also replace your accountId with the right value and finally add you token in the authorization section. Once all of this is done you should go to the cluster to see the application running