Running your first example

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

curl -k -X POST \
'<your cluster id>/app?accountId=<your accountId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ...' \
-d '{ 
     "jobId": "spark-pi",
          "type": "Scala", 
          "sparkVersion": "3.2.0",
          "mainApplicationFile": "local:///opt/spark/examples/jars/examples.jar",
          "image": "",
          "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