Version: 24.10
POST Query Current User
Retrieve the user currently logged in to the portal. This query only returns one result.
Request
HTTP request
POST https://<JM_SERVER>/workspaces/secure/api/v1/current-user/query
Request body
The POST request must contain an empty JSON structure as the query.
This API uses HTTP Content Type: application/json
.
Response
If successful, this operation returns a response with a HTTP 200 OK
status code.
Error messages
Error key | Error | HTTP status code |
---|---|---|
currentUserNotFound | Unable to resolve user from request | 400 Bad Request |
internalError | Please see Error Log ID {number} | 500 Internal Server Error |
unableToResolvePortal | Unable to resolve portal from request | 400 Bad Request |
Error responses
HTTP status code | Description |
---|---|
400 Bad Request | Bad request or request parameter. Check error message for details. |
404 Not Found | Ensure the URL endpoint is entered correctly. |
500 Internal Server Error | Exception occurred in current user query. Contact administrator. |
Example
Example successful response
{
"fetchLimit": 1,
"durationMs": 607,
"result": {
"email": "[email protected]",
"givenName": "firstName",
"groups": [
"Job Applicants",
"Job Managers",
"Job Reviewers"
],
"loginName": "testUser",
"mobile": "",
"prefs": {
"lastPage": "Help Desk",
"defaultGroup": "CCA Reviewers",
"defaultStartDate": "-20d"
},
"profiles": {
"Given Name": "firstName",
"Email": "[email protected]",
"Family Name": "lastName",
"Mobile": null
},
"roles": [],
"userKey": "4d393a11121785ca6afat976flk41d9a"
}
}