curl get post request summary

get request

"1" parameter passed in the get request

 curl -X GET "localhost:8080/api/job/list?order=desc&limit=10&offset=0&status=success"

Post request

"2" post incoming request value json body

  curl -X POST "localhost:8080/job/register" -H 'Content-Type: application/json' -d'
{
  "name": "TestSparkPiTask",
  "jobType": "batch",
  "status": "active",
  "mainClass": "org.apache.spark.examples.SparkPi",
  "args": [
    "10",
    "1"
  ],
  "trigger": {
    "time": "2020-02-13 20:58:00 Thursday",
    "repeat": "perWeek"
  },
  "runtime": {
    "resource": {
      "jarName": "spark-examples_2.11-2.4.4.jar"
    }
  },
  "engine": {
    "type": "spark",
    "config": {
      "entry": [
        {
          "key": "spark.executor.instances",
          "value": "3"
        },
        {
          "key": "spark.executor.cores",
          "value": "3"
        },
        {
          "key": "spark.executor.memory",
          "value": "2g"
        },
        {
          "key": "spark.driver.memory",
          "value": "1g"
        }
      ]
    }
  }
}
'            

"3" post request to set up a simple param

  curl -X POST "localhost:8080/api/job/activate" -d 'job_id=5'
Published 25 original articles · won praise 0 · Views 439

Guess you like

Origin blog.csdn.net/m0_38028438/article/details/104327657