Skip to main content

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 keyErrorHTTP status code
currentUserNotFoundUnable to resolve user from request400 Bad Request
internalErrorPlease see Error Log ID {number}500 Internal Server Error
unableToResolvePortalUnable to resolve portal from request400 Bad Request

Error responses

HTTP status codeDescription
400 Bad RequestBad request or request parameter. Check error message for details.
404 Not FoundEnsure the URL endpoint is entered correctly.
500 Internal Server ErrorException 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"
}
}