Retrieve Extended User Information
/mobile/platform/extended/users/{username}
Retrieves information about the current authorized user, including the user's roles.
- When the user is an MCS mobile user, this operation retrieves the user name, first name, last name, roles, and email address as well as the custom properties that were added to the realm that the user belongs to.
- When the user is a virtual user, this operation retrieves the user name and roles.
- When the user is a social user (that is, signed in using social identity), this operation retrieves the user's MCS ID, identity provider, and access token.
If you don't know the user name, then use ~
for the username
path parameter to indicate the current user.
For security reasons, you can call this operation only from custom API implementations by using the custom code SDK. You can't make direct requests from client applications. This API is included in this reference merely to describe the request and response bodies for the custom code SDK calls.
Permissions
The authorized user must be either an MCS mobile user that is a member of the realm that is associated with the mobile backend or a virtual or social user.
Request
-
username: string
The user name of the client applicaton user, which is the user in the
Authorization
HTTP request header. Use~
to indicate the current user. If you specify the user name, it must match the user name that is in theAuthorization
HTTP request header.
-
fields(optional): string
You can use this parameter to request a subset of the MCS mobile user properties. This parameter doesn't apply to virtual or social users.
Example:
To retrieve only the properties
firstName
andlastName
for an MCS mobile user, the call would pass the following query parameter:/mobile/platform/users/~?fields=firstName,lastName
The call returns a response like this:
{ "firstName": "Joe", "lastName": "Doe" }
Response
- application/json
200 Response
object
Extended User Information
-
object Mobile User Extended Information
Title:
Mobile User Extended Information
Additional Properties Allowed: additionalPropertiesInformation that is returned when the current user is an MCS mobile user. -
object Virtual User Extended Information
Title:
Virtual User Extended Information
Information that is returned when the current user is a virtual user. -
object Social User Information
Title:
Social User Information
Additional Properties Allowed: additionalPropertiesInformation that is returned when the current user is a social user (that is, signed in using social identity).
object
Mobile User Extended Information
-
email(optional):
string
The email address for the user.
-
firstName(optional):
string
The first name of the user.
-
id:
string
The MCS unique identifier for the user.
-
lastName(optional):
string
The last name of the user.
-
links:
array Links that each reference a single object.
Title:
Links that each reference a single object.
Minimum Number of Items:1
Unique Items Required:true
-
roles(optional):
array roles
The roles associated with the mobile user.
-
username:
string
Pattern:
[a-zA-Z0-9][a-zA-Z0-9\-_\.\@]*
The user name for the user.
object
Virtual User Extended Information
-
roles(optional):
array roles
The roles associated with the virtual user.
-
username:
string
Pattern:
[a-zA-Z0-9][a-zA-Z0-9\-_\.\@]*
The user name for the user.
array
Links that each reference a single object.
1
true
-
Array of:
object Paging Link
Title:
Paging Link
A single link used for pagination.
array
-
Array of:
string
The name of a single role.
object
Paging Link
array
-
Array of:
string
The name of a single role.
object
Identity Provider
-
facebook(optional):
object Facebook Social User Information
Title:
Facebook Social User Information
Additional Properties Allowed: additionalPropertiesFacebook social user information.
object
Facebook Social User Information
{
"id":"295e450a-63f0-41fa-be43-cd2dbcb21598",
"lastName":"Doe",
"username":"joe",
"email":"joe@example.com",
"roles":[
"Customer",
"Trial"
],
"links":[
{
"rel":"canonical",
"href":"/mobile/extended/platform/users/joe"
},
{
"rel":"self",
"href":"/mobile/extended/platform/users/joe"
}
],
"firstName":"Joe"
}
400 Response
The operation can't be performed due to one of the following reasons:
- The
Oracle-Mobile-Backend-ID
HTTP request header was not specified. - The query parameter
fields
was specified and one of the properties given isn't defined for the realm that the user belongs to.
-
Content-Type: string
The media type of the error message, which is
application/json
.
object
Error
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorDetails(optional):
array o:errorDetails
Minimum Number of Items:
0
List of the issues that cause the error. Included when the error is caused by multiple issues. -
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
array
0
-
Array of:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
The URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
{
"title":"Cannot call API",
"detail":"Unable to use API virtualization for calls without any mobile backend context.",
"status":400,
"o:errorCode":"MOBILE-58060",
"o:errorPath":"/mobile/platform/extended/users/joe",
"o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000032b9d5, 0",
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1"
}
401 Response
The operation can't be performed due to one of the following reasons:
- The user doesn't exist.
- The password is incorrect.
- The
Authorization
HTTP request header wasn't specified. - The user name doesn't match the user name in the
Authorization
HTTP request header.
-
Content-Type: string
The media type of the error message, which is
application/json
.
object
Error
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorDetails(optional):
array o:errorDetails
Minimum Number of Items:
0
List of the issues that cause the error. Included when the error is caused by multiple issues. -
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
array
0
-
Array of:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
The URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
{
"title":"Unauthorized",
"detail":"401 - Unauthorized",
"status":401,
"o:errorCode":"MOBILE-15209",
"o:errorPath":"/mobile/platform/extended/users/joe",
"o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000033b51c, 0",
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1"
}
403 Response
The operation can't be performed due to one of the following reasons:
- The user doesn't belong to the realm that's associated with the mobile backend.
- The value of the
Authorization
HTTP request header that followsBasic
or 'Bearer' is either missing or invalid.
406 Response
The MIME media type isn't supported. Only application/json
is supported. Either remove the Accept
header or specify a media type that's supported.
-
Content-Type: string
The media type of the error message, which is
application/json
.
object
Error
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorDetails(optional):
array o:errorDetails
Minimum Number of Items:
0
List of the issues that cause the error. Included when the error is caused by multiple issues. -
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
array
0
-
Array of:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
The URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
Mobile Cloud Service error code.
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
{
"title":"Unsupported media type",
"detail":"The MIME media type isn't supported, only application/json is supported. Either remove the Accept header or specify a media type that is supported.",
"status":406,
"o:errorCode":"MOBILE-92516",
"o:errorPath":"/mobile/platform/extended/users/joe",
"o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000033ddba, 0",
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1"
}