Get Loggedin User Using GET

Get Loggedin User Using GET

Get principal user information.
Principal user is identified via a token. The token should be passed in a header called csp-auth-token.If expandProfile is passed in the request user profile information will be also returned.

Access Policy

Role User Accounts Service Accounts (Client Credentials Applications)
All Roles ✔️
Request
URI
GET
https://{api_host}/csp/gateway/am/api/loggedin/user
COPY
Query Parameters
string
expand
Optional

Indicates if response should be expanded, value is ignored - only the existence of parameter is checked. Includes the address details of the user only if the user is non-federated(vmwareid). If the user is federated, this flag is ignored.

string
expandProfile
Optional

Indicates if the response should be expanded with the user profile; the value is ignored, only the existence of parameter is checked. Includes the profile details of the user in the userProfile attribute. This userProfile attribute consists of the same output as calling "/am/api/loggedin/user/profile".


Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns UserDto of type(s) application/json
{
    "acct": "string",
    "address": "string",
    "city": "string",
    "company": "string",
    "country": "string",
    "countryCode": "string",
    "countryName": "string",
    "customerNumber": "string",
    "email": "string",
    "emailVerified": false,
    "eulaInfo": "string",
    "firstName": "string",
    "lastName": "string",
    "password": "string",
    "refLink": "string",
    "state": "string",
    "stateCode": "string",
    "stateName": "string",
    "tnc": false,
    "tradeId": "string",
    "userId": "string",
    "userProfile": {
        "alternativeEmail": "string",
        "customerNumber": "string",
        "defaultOrgId": "string",
        "isFederated": false,
        "language": "string",
        "linkedUserIdAccount": "string",
        "locale": "string"
    },
    "username": "string",
    "website": "string",
    "workPhone": "string",
    "zipcode": "string"
}
string
acct
Optional

The identifier of the user, configured to log in to the Identity provider.

string
address
Required

The address.

string
city
Required

The city.

string
company
Required

The company.

string
country
Required

The country.

string
countryCode
Optional

The country code.

string
countryName
Optional

The country name.

string
customerNumber
Optional

The customer number.

string
email
Optional

The email address of the user.

boolean
emailVerified
Optional

True if the user's e-mail address has been verified.

string
eulaInfo
Optional

The end-user license agreement information.

string
firstName
Required

The first name of the user.

string
lastName
Required

The last name of the user.

string
password
Required

The password. Combination of characters, numbers and special symbols that is hard to guess.

string
refLink
Optional

The reference link to the user profile.

string
state
Optional

The user's state.

string
stateCode
Optional

The user's state code.

string
stateName
Optional

The user's state name.

boolean
tnc
Optional

Terms and conditions.

string
tradeId
Optional

The trade ID.

string
userId
Optional

The unique identifier of the user, on behalf of which the token was issued.

userProfile
Optional

Define user profile with default organization, locale and language.

string As email As (?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
username
Required

The username of the user.

string
website
Optional

The web site.

string
workPhone
Required

The work phone number.

string
zipcode
Required

The ZIP code.


401

The user is not authorized to use the API

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


403

The user is forbidden to use the API

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


404

No user with given token exists

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


429

The user has sent too many requests

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


500

An unexpected error has occurred while processing the request

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode