Skip to content

Commit 7bed1c7

Browse files
author
Naor Livne
committed
adding post update of all cron jobs params
1 parent 6c82832 commit 7bed1c7

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

docs/api/cron_jobs.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,56 @@ missing parameters:
177177
"missing_parameters": "True"
178178
}
179179
```
180+
181+
# Update all cron job params (POST)
182+
update a Nebula cron job config, requires all of the cron job configuration params.
183+
184+
**request**
185+
186+
```
187+
PUT /api/v2/cron_jobs/cron_job_name/update HTTP/1.1
188+
Host: localhost:5000
189+
Authorization: Basic <your-basic_auth_base64-here>
190+
Content-Type: application/json
191+
Cache-Control: no-cache
192+
193+
{
194+
"schedule": "0 0 * * *",
195+
"docker_image": "httpd"
196+
}
197+
```
198+
199+
**response example**
200+
201+
success:
202+
```
203+
202
204+
{
205+
"_id": {
206+
"$oid": "5cb309239d723e5e3d22d0a0"
207+
},
208+
"cron_job_id": 11,
209+
"cron_job_name": "test",
210+
"schedule": "0 0 * * *",
211+
"env_vars": {
212+
"test": "test123"
213+
},
214+
"docker_image": "httpd",
215+
"running": true,
216+
"networks": [
217+
"nebula",
218+
"bridge"
219+
],
220+
"volumes": [],
221+
"devices": [],
222+
"privileged": false
223+
}
224+
```
225+
226+
missing parameters:
227+
```
228+
400
229+
{
230+
"missing_parameters": "True"
231+
}
232+
```

0 commit comments

Comments
 (0)