Difference between revisions of "UserManagement REST API"
(→List groups) |
|||
(21 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Developer's Guide]] | ||
== Organization Management == | == Organization Management == | ||
=== Create organization === | === Create organization === | ||
Line 410: | Line 411: | ||
''Description:'' | ''Description:'' | ||
− | |||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 440: | Line 440: | ||
=== Delete group === | === Delete group === | ||
<nowiki>DELETE <root-uri>/</nowiki>userService/groupmanager/{groupName}/{organizationName} | <nowiki>DELETE <root-uri>/</nowiki>userService/groupmanager/{groupName}/{organizationName} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 464: | Line 463: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''HTTP Response:''' | ||
''Description:'' | ''Description:'' | ||
Line 483: | Line 483: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | DELETE<nowiki> <root-uri>/userService/</nowiki>groupmanager/<nowiki><groupName>/</nowiki><nowiki><organization</nowiki>Name> | |
Response: | Response: | ||
− | + | 200 DELETED | |
=== Delete all groups === | === Delete all groups === | ||
<nowiki>DELETE <root-uri>/</nowiki>userService/groupmanager/groups/{organizationName} | <nowiki>DELETE <root-uri>/</nowiki>userService/groupmanager/groups/{organizationName} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 512: | Line 512: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''HTTP Response:''' | ||
''Description:'' | ''Description:'' | ||
Line 531: | Line 532: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | DELETE<nowiki> <root-uri>/userService/</nowiki>groupmanager/groups/<nowiki><organization</nowiki>Name> | |
Response: | Response: | ||
− | + | 200 DELETED | |
=== Update group === | === Update group === | ||
<nowiki>POST <root-uri>/</nowiki>userService/groupmanager | <nowiki>POST <root-uri>/</nowiki>userService/groupmanager | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 572: | Line 573: | ||
|} | |} | ||
− | |||
− | '' | + | '''HTTP Response:''' |
+ | ''Description:'' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 591: | Line 592: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | POST<nowiki> <root-uri>/userService/</nowiki>groupmanager | |
Response: | Response: | ||
− | + | 200 UPDATED | |
== Role Management == | == Role Management == | ||
=== Create role === | === Create role === | ||
<nowiki>PUT <root-uri>/</nowiki>userService/rolemanager/{organizationName} | <nowiki>PUT <root-uri>/</nowiki>userService/rolemanager/{organizationName} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 627: | Line 628: | ||
|} | |} | ||
− | |||
− | '' | + | '''HTTP Response:''' |
+ | ''Description:'' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 646: | Line 647: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
<nowiki> PUT <root-uri>/userService/</nowiki>rolemanager/ | <nowiki> PUT <root-uri>/userService/</nowiki>rolemanager/ | ||
− | + | Content-Type: application/json | |
− | + | {“roleName” : “admin”} | |
− | Response: | + | |
+ | Response: | ||
HTTP/1.1 200 CREATED | HTTP/1.1 200 CREATED | ||
=== List roles === | === List roles === | ||
<nowiki>GET <root-uri>/</nowiki>userService/rolemanager/roles/{organizationName} | <nowiki>GET <root-uri>/</nowiki>userService/rolemanager/roles/{organizationName} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 678: | Line 680: | ||
|} | |} | ||
− | |||
− | '' | + | '''HTTP Response:''' |
+ | ''Description:'' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 697: | Line 699: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | GET<nowiki> <root-uri>/userService/organizationmanager/<organization</nowiki>Name> | |
Response: | Response: | ||
− | + | HTTP/1.1 200 OK | |
=== Get roles of user === | === Get roles of user === | ||
<nowiki>GET <root-uri>/</nowiki>userService/rolemanager/users/{userName}/{organizationName} | <nowiki>GET <root-uri>/</nowiki>userService/rolemanager/users/{userName}/{organizationName} | ||
− | + | '''Request Message Body:''' | |
− | + | ||
− | + | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 732: | Line 733: | ||
|} | |} | ||
+ | |||
+ | |||
'''HTTP Response:''' | '''HTTP Response:''' | ||
− | |||
''Description:'' | ''Description:'' | ||
− | |||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 751: | Line 752: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | GET<nowiki> <root-uri>/userService/</nowiki>rolemanager/<nowiki>users/<username>/</nowiki><nowiki><organization</nowiki>Name> | |
− | + | ||
− | + | ||
+ | Response: | ||
+ | |||
+ | HTTP/1.1 200 OK | ||
== User Management == | == User Management == | ||
Line 764: | Line 769: | ||
<nowiki>PUT <root-uri>/</nowiki>userService/usermanager/ | <nowiki>PUT <root-uri>/</nowiki>userService/usermanager/ | ||
− | <tt> Host:cloud.example.com</tt> | + | <tt> Host:cloud.example.com</tt> |
+ | <tt>Content-Type: application/json</tt> | ||
+ | <tt>{"username":"newUser",</tt> | ||
+ | <tt> "firstname":"ggg",</tt> | ||
+ | <tt> "lastname":"ggg",</tt> | ||
+ | <tt>"password":"ggg"}</tt> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'''Request Message Body:''' | '''Request Message Body:''' | ||
− | |||
− | |||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 824: | Line 823: | ||
|} | |} | ||
+ | |||
+ | |||
+ | |||
'''HTTP Response:''' | '''HTTP Response:''' | ||
− | |||
Description: | Description: | ||
− | |||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 843: | Line 843: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
Line 850: | Line 851: | ||
<nowiki> PUT <root-uri>/userService/</nowiki>usermanager/ | <nowiki> PUT <root-uri>/userService/</nowiki>usermanager/ | ||
Response: | Response: | ||
− | + | 200 CREATED | |
=== Update user === | === Update user === | ||
<nowiki>PUT <root-uri>/</nowiki>userService/usermanager/update | <nowiki>PUT <root-uri>/</nowiki>userService/usermanager/update | ||
− | <tt> Host:cloud.example.com</tt> | + | <tt> Host:cloud.example.com</tt> |
− | + | <tt>Content-Type: application/json</tt> | |
− | <tt>Content-Type: application/json</tt> | + | <tt>{"username":"user1",</tt> |
− | + | <tt> "firstname":"ggg1",</tt> | |
− | <tt>{"username":"user1",</tt> | + | <tt> "lastname":"ggg2",</tt> |
− | + | ||
− | <tt> "firstname":"ggg1",</tt> | + | |
− | + | ||
− | <tt> "lastname":"ggg2",</tt> | + | |
− | + | ||
'''Request Message Body:''' | '''Request Message Body:''' | ||
− | |||
− | |||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 933: | Line 927: | ||
|} | |} | ||
− | |||
+ | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
Line 940: | Line 936: | ||
<nowiki> PUT <root-uri>/userService/</nowiki>usermanager/update | <nowiki> PUT <root-uri>/userService/</nowiki>usermanager/update | ||
Response: | Response: | ||
− | + | 200 CREATED | |
=== Get user === | === Get user === | ||
<nowiki>GET <root-uri>/</nowiki>userService/usermanager/{userName}/{organizationName} | <nowiki>GET <root-uri>/</nowiki>userService/usermanager/{userName}/{organizationName} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 968: | Line 963: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''HTTP Response:''' | ||
''Description:'' | ''Description:'' | ||
Line 987: | Line 983: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | GET<nowiki> <root-uri>/userService/</nowiki>usermanager/<nowiki><</nowiki>userName>/<nowiki><</nowiki>organizationName> | |
Response: | Response: | ||
− | + | HTTP/1.1 200 OK | |
=== List users === | === List users === | ||
<nowiki>GET <root-uri>/</nowiki>userService/usermanager/users/{organizationName} | <nowiki>GET <root-uri>/</nowiki>userService/usermanager/users/{organizationName} | ||
Content-Type: application/json | Content-Type: application/json | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,017: | Line 1,013: | ||
|} | |} | ||
− | |||
− | '' | + | '''HTTP Response:''' |
+ | ''Description:'' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,036: | Line 1,032: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | GET<nowiki> <root-uri>/userService/</nowiki>usermanager/usermanager | |
− | + | ||
− | + | Response: | |
− | + | ||
− | + | HTTP/1.1 200 OK | |
+ | Content-Type: application/json | ||
+ | {“users<nowiki>”:[</nowiki>“user1”,”user2”]} | ||
=== Delete user === | === Delete user === | ||
<nowiki>DELETE <root-uri>/userService/usermanager/{userName}/{organizationName}</nowiki> | <nowiki>DELETE <root-uri>/userService/usermanager/{userName}/{organizationName}</nowiki> | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,073: | Line 1,071: | ||
|} | |} | ||
− | |||
− | |||
+ | '''HTTP Response:''' | ||
+ | |||
+ | ''Description:'' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,096: | Line 1,095: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | DELETE<nowiki> <root-uri>/userService/</nowiki><nowiki>usermanager/<userName>/<organizationName></nowiki> | |
Response: | Response: | ||
− | + | 200 DELETED | |
=== Delete all users === | === Delete all users === | ||
<nowiki>DELETE <root-uri>/</nowiki>userService/usermanager/users/{organizationName} | <nowiki>DELETE <root-uri>/</nowiki>userService/usermanager/users/{organizationName} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,125: | Line 1,124: | ||
|} | |} | ||
− | |||
− | '' | + | '''HTTP Response:''' |
+ | ''Description:'' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,144: | Line 1,143: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | DELETE<nowiki> <root-uri>/userService/</nowiki>usermanager/users/<nowiki><organization</nowiki>Name> | |
Response: | Response: | ||
− | + | 200 DELETED | |
=== Assign/dismiss role === | === Assign/dismiss role === | ||
<nowiki>PUT <root-uri>/</nowiki>userService/usermanager/roles/{username}/{organizationName} | <nowiki>PUT <root-uri>/</nowiki>userService/usermanager/roles/{username}/{organizationName} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,185: | Line 1,184: | ||
|} | |} | ||
− | |||
− | '' | + | '''HTTP Response:''' |
+ | ''Description:'' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,204: | Line 1,203: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
Line 1,212: | Line 1,212: | ||
Content-Type: application/json | Content-Type: application/json | ||
{“roleName”:”developer”} | {“roleName”:”developer”} | ||
− | + | ||
+ | |||
+ | Response: | ||
+ | |||
+ | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | ||
=== Assign/dismiss group === | === Assign/dismiss group === | ||
<nowiki>PUT <root-uri>/</nowiki>userService/usermanager/groups/{username} | <nowiki>PUT <root-uri>/</nowiki>userService/usermanager/groups/{username} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,241: | Line 1,244: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''HTTP Response:''' | ||
''Description:'' | ''Description:'' | ||
Line 1,260: | Line 1,264: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
Line 1,268: | Line 1,273: | ||
Content-Type: application/json | Content-Type: application/json | ||
{“groupName”:”developers”} | {“groupName”:”developers”} | ||
− | + | ||
+ | |||
+ | Response: | ||
+ | |||
HTTP/1.1 200 OK | HTTP/1.1 200 OK | ||
=== Get users with role === | === Get users with role === | ||
<nowiki>GET <root-uri>/</nowiki>userService/usermanager/roles/{roleName}/{organizationName} | <nowiki>GET <root-uri>/</nowiki>userService/usermanager/roles/{roleName}/{organizationName} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,297: | Line 1,304: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''HTTP Response:''' | ||
''Description:'' | ''Description:'' | ||
Line 1,316: | Line 1,324: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | GET<nowiki> <root-uri>/userService/</nowiki>usermanager/roles/<nowiki><</nowiki>roleName>/<nowiki><organization</nowiki>Name> | |
− | Response: | + | |
− | HTTP/1.1 200 OK | + | |
+ | Response: | ||
+ | |||
+ | HTTP/1.1 200 OK | ||
=== Get users with group === | === Get users with group === | ||
<nowiki>GET <root-uri>/</nowiki>userService/usermanager/groups/{groupName}/{organizationName} | <nowiki>GET <root-uri>/</nowiki>userService/usermanager/groups/{groupName}/{organizationName} | ||
− | |||
− | |||
+ | '''Request Message Body:''' | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,351: | Line 1,362: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''HTTP Response:''' | ||
''Description:'' | ''Description:'' | ||
Line 1,370: | Line 1,382: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
− | + | GET<nowiki> <root-uri>/userService/</nowiki>usermanager/groups/<nowiki><</nowiki>groupName>/<nowiki><organization</nowiki>Name> | |
− | + | ||
− | + | Response: | |
+ | |||
+ | HTTP/1.1 200 OK | ||
=== Update credentials === | === Update credentials === | ||
<nowiki>PUT <root-uri>/</nowiki>userService/usermanager/{username}/{organizationName} | <nowiki>PUT <root-uri>/</nowiki>userService/usermanager/{username}/{organizationName} | ||
− | + | '''Request Message Body:''' | |
− | + | ||
− | + | ||
{| style="border-spacing:0;" | {| style="border-spacing:0;" | ||
Line 1,417: | Line 1,430: | ||
|} | |} | ||
− | |||
+ | |||
+ | '''HTTP Response:''' | ||
''Description:'' | ''Description:'' | ||
Line 1,438: | Line 1,452: | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| '''400 Bad Request ''' | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:none;padding:0.097cm;"| '''400 Bad Request ''' | ||
| style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Invalid parameter or field names in the request. | | style="border-top:none;border-bottom:0.05pt solid #000000;border-left:0.05pt solid #000000;border-right:0.05pt solid #000000;padding:0.097cm;"| Invalid parameter or field names in the request. | ||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
+ | |||
+ | '''''Example:''''' | ||
Request: | Request: | ||
PUT<nowiki> <root-uri>/userService/</nowiki>usermanager/<nowiki><</nowiki>username>/<nowiki><</nowiki>organizationName> | PUT<nowiki> <root-uri>/userService/</nowiki>usermanager/<nowiki><</nowiki>username>/<nowiki><</nowiki>organizationName> | ||
− | + | ||
+ | |||
+ | Response: | ||
+ | |||
200 UPDATED | 200 UPDATED |
Latest revision as of 16:20, 25 July 2013
Organization Management
Create organization
PUT <root-uri>/userService/organizationmanager/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
200 Created | organization was created |
400 Bad Request | Invalid parameter or field names in the request.
|
Example:
Request:
PUT <root-uri>/userService/organizationmanager/<organizationName> Response: 200 CREATED
Get organization
GET <root-uri>/userService/organizationmanager/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | Organization was present already |
404 Not Found | Organization was not present |
Example:
Request:
GET <root-uri>/userService/organizationmanager/<organizationName> Response: HTTP/1.1 200 OK
Delete organization
DELETE <root-uri>/userService/organizationmanager/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | organization was successfully deleted |
404 Not Found | Organization was not found |
400 Bad Request | Invalid parameter of field names in the request |
Example:
Request:
DELETE <root-uri>/userService/organizationmanager/<organizationName> Response: 200 DELETED
List organizations
GET <root-uri>/userService/organizationmanager/organizations Content-Type: application/json
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | There was at least one organization |
404 Not Found | No organization was present |
Example:
Request:
GET <root-uri>/userService/organizationmanager/organizations Response: HTTP/1.1 200 OK Content-Type: application/json {“organizations”:[ {“name”:“engineering”,”description”:”www.eng.it”}, {“name”:”venus-c”,”description”:”www.venus-c.eu”} ]}
Delete organizations
DELETE <root-uri>/userService/organizationmanager/organizations
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | organizations have been successfully deleted |
404 Not Found | No organization was present |
Example:
Request:
DELETE <root-uri>/userService/organizationmanager/organizations
Response: HTTP/1.1 200 OK
Group Management
Create group
PUT <root-uri>/userService/groupmanager/
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
200 Created | group was created |
400 Bad Request | Invalid parameter or field names in the request. |
Example:
Request:
PUT <root-uri>/userService/groupmanager/ Content-Type: application/json {“groupName” : “itpeople”}
Response: HTTP/1.1 200 CREATED
Get group by group name
GET <root-uri>/userService/groupmanager/{groupName}
Request Message Body:
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | Group was present already |
404 Not Found | Group was not present |
Example:
Request:
GET <root-uri>/userService/groupmamager/<groupName> Response: HTTP/1.1 200 OK
Get group by group name and organization name
GET <root-uri>/userService/groupmanager/{groupName}/organization/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | Group was present already |
404 Not Found | Group was not present |
Example:
Request:
GET <root-uri>/userService/groupmamager/<groupName>/organization/<organizationName> Response: HTTP/1.1 200 OK
List groups
GET <root-uri>/userService/groupmanager/groups/{organizationName} Content-Type: application/json
Request Message Body:
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | There was at least one group |
404 Not Found | No group was present |
Example:
Request:
GET <root-uri>/userService/groupmanager/groups Response: HTTP/1.1 200 OK Content-Type: application/json {“groups”:[“itpeople”,”admins”]}
Delete group
DELETE <root-uri>/userService/groupmanager/{groupName}/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | group was successfully deleted |
400 Bad Request | Invalid parameter of field names in the request |
Example:
Request:
DELETE <root-uri>/userService/groupmanager/<groupName>/<organizationName> Response: 200 DELETED
Delete all groups
DELETE <root-uri>/userService/groupmanager/groups/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | Groups have been successfully deleted |
400 Bad Request | Invalid parameter of field names in the request |
Example:
Request:
DELETE <root-uri>/userService/groupmanager/groups/<organizationName> Response: 200 DELETED
Update group
POST <root-uri>/userService/groupmanager
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | Groups have been successfully updated |
304 Not Modified | Invalid parameter of field names in the request |
Example:
Request:
POST <root-uri>/userService/groupmanager Response: 200 UPDATED
Role Management
Create role
PUT <root-uri>/userService/rolemanager/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
200 Created | role was created |
400 Bad Request | Invalid parameter or field names in the request. |
Example:
Request:
PUT <root-uri>/userService/rolemanager/ Content-Type: application/json {“roleName” : “admin”}
Response:
HTTP/1.1 200 CREATED
List roles
GET <root-uri>/userService/rolemanager/roles/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | There was at least one role |
404 Not Found | No role is present |
Example:
Request:
GET <root-uri>/userService/organizationmanager/<organizationName> Response: HTTP/1.1 200 OK
Get roles of user
GET <root-uri>/userService/rolemanager/users/{userName}/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | User is present |
404 Not Found | User is not present |
Example:
Request:
GET <root-uri>/userService/rolemanager/users/<username>/<organizationName>
Response:
HTTP/1.1 200 OK
User Management
Create user
PUT <root-uri>/userService/usermanager/
Host:cloud.example.com Content-Type: application/json {"username":"newUser", "firstname":"ggg", "lastname":"ggg", "password":"ggg"}
Request Message Body:
|
|
|
|
username | JSON String | name of the user | mandatory |
firstname | JSON String | firstname of the user | mandatory |
lastname | JSON String | lastname of the user | mandatory |
password | JSON String | user chosen password | mandatory |
organizationName | JSON String | Organization of the user | optional |
certificate | JSON String | X509 Distinguished Name | optional |
HTTP Response:
Description:
HTTP Status | Description |
200 Created | User was created |
400 Bad Request | Invalid parameter or field names in the request. |
Example:
Request:
PUT <root-uri>/userService/usermanager/ Response: 200 CREATED
Update user
PUT <root-uri>/userService/usermanager/update
Host:cloud.example.com Content-Type: application/json {"username":"user1", "firstname":"ggg1", "lastname":"ggg2",
Request Message Body:
|
|
|
|
username | JSON String | name of the user | mandatory |
firstname | JSON String | firstname of the user | optional |
lastname | JSON String | lastname of the user | optional |
password | JSON String | user chosen password | optional |
organizationName | JSON String | Organization of the user | optional |
certificate | JSON String | X509 Distinguished Name | optional |
HTTP Response:
Description:
HTTP Status | Description |
200 Created | User was updated |
304 Not Modified | User was not updated. |
Example:
Request:
PUT <root-uri>/userService/usermanager/update Response: 200 CREATED
Get user
GET <root-uri>/userService/usermanager/{userName}/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | User was present already |
404 Not Found | User was not present |
Example:
Request:
GET <root-uri>/userService/usermanager/<userName>/<organizationName> Response: HTTP/1.1 200 OK
List users
GET <root-uri>/userService/usermanager/users/{organizationName} Content-Type: application/json
Request Message Body:
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | There was at least one user |
404 Not Found | No user was present |
Example:
Request:
GET <root-uri>/userService/usermanager/usermanager
Response:
HTTP/1.1 200 OK Content-Type: application/json {“users”:[“user1”,”user2”]}
Delete user
DELETE <root-uri>/userService/usermanager/{userName}/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | user was successfully deleted |
404 Not Found | user was not found |
400 Bad Request | Invalid parameter of field names in the request |
Example:
Request:
DELETE <root-uri>/userService/usermanager/<userName>/<organizationName> Response: 200 DELETED
Delete all users
DELETE <root-uri>/userService/usermanager/users/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | Users have been successfully deleted |
400 Bad Request | Invalid parameter of field names in the request |
Example:
Request:
DELETE <root-uri>/userService/usermanager/users/<organizationName> Response: 200 DELETED
Assign/dismiss role
PUT <root-uri>/userService/usermanager/roles/{username}/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | Role was successfully assigned/dismissed |
304 Not Modified | Invalid parameter of field names in the request |
Example:
Request:
PUT <root-uri>/userService/usermanager/roles/<userName>/<organizationName> Content-Type: application/json {“roleName”:”developer”}
Response:
HTTP/1.1 200 OK
Assign/dismiss group
PUT <root-uri>/userService/usermanager/groups/{username}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | Group was successfully assigned/dismissed |
304 Not Modified | Invalid parameter of field names in the request |
Example:
Request:
PUT <root-uri>/userService/usermanager/groups/<userName> Content-Type: application/json {“groupName”:”developers”}
Response:
HTTP/1.1 200 OK
Get users with role
GET <root-uri>/userService/usermanager/roles/{roleName}/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | There was at least one user |
404 Not Found | No user was present |
Example:
Request:
GET <root-uri>/userService/usermanager/roles/<roleName>/<organizationName>
Response:
HTTP/1.1 200 OK
Get users with group
GET <root-uri>/userService/usermanager/groups/{groupName}/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | There was at least one user |
404 Not Found | No user was present |
Example:
Request:
GET <root-uri>/userService/usermanager/groups/<groupName>/<organizationName>
Response:
HTTP/1.1 200 OK
Update credentials
PUT <root-uri>/userService/usermanager/{username}/{organizationName}
Request Message Body:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HTTP Response:
Description:
HTTP Status | Description |
HTTP/1.1 200 OK | Credentials have been successfully updated |
401 Unauthorized | Provided credentials were wrong |
400 Bad Request | Invalid parameter or field names in the request. |
Example:
Request:
PUT <root-uri>/userService/usermanager/<username>/<organizationName>
Response:
200 UPDATED