Skip to content

Commit ff5c5b3

Browse files
committed
Rename user parameter for deployment manager API
Rename user parameter for deployment manager API from user to user.name to match the default knox behaviour. PNDA-4613
1 parent eb6f6a7 commit ff5c5b3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ Response Codes:
357357

358358
### Start _application_
359359
````
360-
POST /applications/<application>/start?user=<username>
360+
POST /applications/<application>/start?user.name=<username>
361361
362362
Response Codes:
363363
202 - Accepted, poll /applications/<application>/status for status
@@ -371,7 +371,7 @@ user - User with permisson to perform this action on the application should be p
371371

372372
### Stop _application_
373373
````
374-
POST /applications/<application>/stop?user=<username>
374+
POST /applications/<application>/stop?user.name=<username>
375375
376376
Response Codes:
377377
202 - Accepted, poll /applications/<application>/status for status
@@ -426,7 +426,7 @@ Example response:
426426
### Create _application_ from _package_
427427

428428
````
429-
PUT /applications/<application>?user=<username>
429+
PUT /applications/<application>?user.name=<username>
430430
{
431431
"package": "<package>",
432432
"<componentType>": {
@@ -461,7 +461,7 @@ Package is mandatory, property settings are optional
461461

462462
### Destroy _application_
463463
````
464-
DELETE /applications/<application>?user=<username>
464+
DELETE /applications/<application>?user.name=<username>
465465
466466
Response Codes:
467467
200 - OK

api/src/main/resources/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def do_call():
224224
class ApplicationDetailHandler(BaseHandler):
225225
@asynchronous
226226
def post(self, name, action):
227-
user_name = self.get_argument("user")
227+
user_name = self.get_argument("user.name")
228228
def do_call():
229229
if action == 'start':
230230
dm.start_application(name, user_name)
@@ -270,9 +270,9 @@ def put(self, aname):
270270
return
271271

272272
if 'user' in request_body:
273-
self.send_client_error("Invalid request body. User should be passed in URI")
273+
self.send_client_error("Invalid request body. User should be passed as URI parameter user.name")
274274
return
275-
user_name = self.get_argument("user")
275+
user_name = self.get_argument("user.name")
276276
def do_call():
277277
request_body.update({'user': user_name})
278278
dm.create_application(request_body['package'], aname, request_body)
@@ -289,7 +289,7 @@ def do_call():
289289

290290
@asynchronous
291291
def delete(self, name):
292-
user_name = self.get_argument("user")
292+
user_name = self.get_argument("user.name")
293293
def do_call():
294294
dm.delete_application(name, user_name)
295295
self.send_accepted()

0 commit comments

Comments
 (0)