{{sidenavigation.sidenavigationExpandLabel}}
{{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. The Web API does not provide values for user fields, except if it is asked for them. Using an empty JSON query with at least {} will provide a list of available user fields. Depending on the logged-in users' permissions, not all user fields will be available. Only users with the Users and Groups Administrative Permission have access to all user fields - but must also query them explicitly.

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 HelpDesk 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"
    ]
  }
]
# Request
POST /api/usersandgroups/users/9pupvpj7bkbcg1qnbjbonivc9 HTTP/1.1
Authorization: Bearer VGhpcyBpcyBqdXN0IGEgZGVtbyBhY2Nlc3MgdG9rZW4u
Content-Type: application/json
 
{
    "fields":['firstname']
}
 
# Response
HTTP/1.1 200 OK
Content-Type: application/json
 
[
  {
    "type": "Standard",
    "displayName": "Volker Berlin",
    "fields": {
      "firstname": "Volker"
    }
  }
]

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":[]}'
i-net HelpDesk
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - /<UserID>