type ParamQueue struct {
Topic string json:"topic" Payload stringjson:"payload"
}type ParamSql struct {
Sql string json:"sql" //sql内容
} {"execContent": "function SqlJob(){Set('123','sdafawef');let a = Get('123');LogInfo('get value:',a);let code = GetEnv('code');LogInfo('get code env:',code);Exec(\"insert into test_table(name) values('123123')\");let values = Select('select * from test_table limit 10');LogInfo('select get value :',values);return {code:200,msg:'ok'};}"}{
"groupCode": "string",
"type": 0,
"name": "string",
"code": "string",
"topics": [
"string"
],
"params": "string",
"cronExpr": "string",
"status": 0,
"priority": 0
}curl --location --request POST '/api/v1/system/job/task/info/create' \
--header 'iThings-token: {{iThings-token}}' \
--header 'iThings-token: {{iThings-token}}' \
--header 'iThings-project-id: 1764806234122309632{{iThings-token}}' \
--header 'iThings-project-id: 1786838173980422144' \
--header 'iThings-app-code: {{iThings-app-code}}' \
--header 'iThings-user-role: 1' \
--header 'Accept-Language: en' \
--header 'iThings-tenant-code;' \
--header 'Content-Type: application/json' \
--data-raw '{
"groupCode": "string",
"type": 0,
"name": "string",
"code": "string",
"topics": [
"string"
],
"params": "string",
"cronExpr": "string",
"status": 0,
"priority": 0
}'{
"code": 0,
"msg": "success"
}
扫码加入 iThings微信交流群

扫码加入交流群