{{getMsg('Help_YouAreHere')}}:
/
{{page.title}}
{{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}}
{{helpModel.downloadHelpPdfDataStatus}}
User Details
Request the details of a user from the Users and Groups application.
GET /api/usersandgroups/users/<UserID>
POST /api/usersandgroups/users/<UserID>
Request the details of a user using the following data:
Request Field | Value Type | Description |
---|---|---|
fields | list<string> | An optional list of strings to request additional fields from the given user |
Note: If an empty list of fields is given, a list of available fields for the given user is provided in the response. The list of available fields varies depending on the available plugins installed in the i-net CoWork server.
Response Field | Value Type | Description |
---|---|---|
type | string | The user account type |
displayName | string | The display name of the user |
fields | map<string,object> | An optional map of user fields and their value, if requested using the fields request key. |
availableFields | list<string> | An optional list of user fields, if an empty list is send for the request field fields . |
Example Request
# Request POST /api/usersandgroups/users/9pupvpj7bkbcg1qnbjbonivc9 HTTP/1.1 Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u Content-Type: application/json { "fields":[] } # Response HTTP/1.1 200 OK Content-Type: application/json [ { "type": "Standard", "displayName": "Volker Berlin", "availableFields": [ "stayloggedin", "firstname", "lastname", "email" ] } ]
Application Example
# Browser access http://127.0.0.1:9000/api/usersandgroups/users/9pupvpj7bkbcg1qnbjbonivc9 # Shell access using curl curl -Ls "http://127.0.0.1:9000/api/usersandgroups/users/9pupvpj7bkbcg1qnbjbonivc9" \ --header 'Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u' \ --header "Content-Type: application/json" \ --request POST \ --data '{"fields":[]}' # Shell access using curl with username and password curl -Lsu username:password "http://127.0.0.1:9000/api/usersandgroups/users/9pupvpj7bkbcg1qnbjbonivc9" \ --header "Content-Type: application/json" \ --request POST \ --data '{"fields":[]}'