Skip to content

Commit 4dafdb4

Browse files
committed
api now allows updating only some params rather then forcing all of the app params
1 parent 5fa29c5 commit 4dafdb4

File tree

1 file changed

+56
-2
lines changed

1 file changed

+56
-2
lines changed

docs/api.md

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ Postman-Token: fa2e1e6f-c0c9-0dc5-a323-00ed9503cf4e
335335
}
336336
```
337337

338-
# update app
339-
update a Nebula app config, currently all the permaters needs to be overwritten at once (POST only), UPDATE support is on the todo list
338+
# update all of app params (POST)
339+
update a Nebula app config, all the parameters needs to be overwritten at once (POST only), for updating only some of the app parameters use PUT instead.
340340

341341
**request**
342342

@@ -385,6 +385,60 @@ success:
385385
}
386386
```
387387

388+
missing parameters:
389+
```
390+
400
391+
{
392+
"missing_parameters": "True"
393+
}
394+
```
395+
396+
# update some app params (PUT)
397+
update a Nebula app config,
398+
399+
**request**
400+
401+
```
402+
PUT /api/apps/test/update HTTP/1.1
403+
Host: localhost:5000
404+
Authorization: Basic <your-token-here>
405+
Content-Type: application/json
406+
Cache-Control: no-cache
407+
Postman-Token: 9cd8b55e-2512-07fc-9cf1-15fc5c562635
408+
409+
{
410+
"starting_ports": [80, 443, 6666],
411+
"containers_per": {"server": 2}
412+
}
413+
```
414+
415+
**response example**
416+
417+
success:
418+
```
419+
202
420+
{
421+
"containers_per": {"server": 2},
422+
"app_name": "test",
423+
"env_vars": {
424+
"test": "blabla123",
425+
"test3t2t32": "tesg4ehgee"
426+
},
427+
"running": true,
428+
"command": "update",
429+
"network_mode": "bridge",
430+
"starting_ports": [
431+
80,
432+
443,
433+
6666
434+
],
435+
"_id": {
436+
"$oid": "57ebd2ed28447e1e09e72d6a"
437+
},
438+
"docker_image": "registry.vidazoo.com:5000/httpd"
439+
}
440+
```
441+
388442
missing parameters:
389443
```
390444
400

0 commit comments

Comments
 (0)