PATCH application by ID - ocariot/api-gateway GitHub Wiki
Description
Updates an application data.
Permissions:
- Only Admin user can do this.
Scope
applications:update
URL
Parameters
application_id: string (A 24-byte hex ID)
Request body
{
"username": "NEW_APP",
"application_name": "Raspberry Pi 2 Model B+",
"institution_id": "5db05279fcfefe5c3de20497"
}
Curl example
curl -X PATCH "https://localhost/v1/applications/5a62be07de34500146d9c544" -H "accept: application/json" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d "{"username":"new_app_username"}"
Response body
-
200
Updated application data.{ "id": "5db32930bec1431c51ae15fb", "username": "NEW_APP", "institution_id": "5db05279fcfefe5c3de20497", "application_name": "Raspberry Pi 2 Model B+" }
-
400
Validation errors-
- Example
{ "code": 400, "message": "One or more request fields are invalid...", "description": "username must have at least one character!" }
- Example
-
- Example
{ "code": 400, "message": "One or more request fields are invalid...", "description": "username must be a string!" }
-
403
Permission Error -
404
Not Found Error -
409
Conflict Error