Retrieve Extended User Information

get

/mobile/platform/extended/users/{username}

Deprecated. Use Retrieve My Profile (GET /mobile/platform/users/me) instead.

Retrieves information about the current authorized user, including the user's roles.

  • When the user is a mobile user, this operation retrieves the user name, first name, last name, roles, and email address.
  • 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 ID, and identity provider.

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

To perform this operation, you must be a mobile user that has a role that's associated with the mobile backend or you must be a virtual or social user.

Request

Path Parameters
  • The user name of the current 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's in the Authorization HTTP request header.

Query Parameters
  • You can use this parameter to request a subset of the mobile user properties. This parameter doesn't apply to virtual or social users.

    Example:

    To retrieve only the properties firstName and lastName for a 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

Supported Media Types

200 Response

The user information was retrieved successfully.
Body ()
Information about the current user.
Root Schema : userExtended
Type: object
Information about the current user.
Match One
Show Source
Nested Schema : mobileUserExtended
Type: object
Information that's returned when the current user is a mobile user.
Show Source
Nested Schema : virtualUserExtended
Type: object
Information that's returned when the current user is a virtual user.
Show Source
Nested Schema : Social User Information
Type: object
Title: Social User Information
Additional Properties Allowed: true
Information that's returned when the current user is a social user (that is, signed in using social identity).
Show Source
Nested Schema : Links that each reference a single object.
Type: array
Title: Links that each reference a single object.
Minimum Number of Items: 1
Unique Items Required: true
Show Source
Nested Schema : roles
Type: array
The roles associated with the user.
Show Source
Nested Schema : roles
Type: array
The roles associated with the user.
Show Source
Nested Schema : mobileExtended
Type: object
Show Source
Nested Schema : Identity Provider
Type: object
Title: Identity Provider
Additional Properties Allowed: true
The provider through which the current social user signed in.
Show Source
Nested Schema : Facebook Information
Type: object
Title: Facebook Information
Additional Properties Allowed: true
Facebook social user information.
Show Source
Example Response (application/json)
{
    "firstName":"Joe",
    "lastName":"Doe",
    "roles":[
        "Customer",
        "Trial"
    ],
    "links":[
        {
            "rel":"canonical",
            "href":"/mobile/extended/platform/users/joe"
        },
        {
            "rel":"self",
            "href":"/mobile/extended/platform/users/joe"
        }
    ],
    "id":"295e450a-63f0-41fa-be43-cd2dbcb21598",
    "email":"joe@example.com",
    "username":"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 doesn't exist.
Headers
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by the service.
Show Source
Nested Schema : o:errorDetails
Type: array
Minimum Number of Items: 0
List of the issues that cause the error. Included when the error is caused by multiple issues.
Show Source
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source
Example Response (application/json)
{
    "o:errorCode":"MOBILE-58060",
    "detail":"Unable to use API virtualization for calls without any mobile backend context.",
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Cannot call API",
    "o:errorPath":"/mobile/platform/extended/users/joe",
    "o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000032b9d5, 0",
    "status":400
}

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.
Headers
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by the service.
Show Source
Nested Schema : o:errorDetails
Type: array
Minimum Number of Items: 0
List of the issues that cause the error. Included when the error is caused by multiple issues.
Show Source
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source
Example Response (application/json)
{
    "o:errorCode":"MOBILE-15209",
    "detail":"401 - Unauthorized",
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Unauthorized",
    "o:errorPath":"/mobile/platform/extended/users/joe",
    "o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000033b51c, 0",
    "status":401
}

403 Response

The operation can't be performed due to one of the following reasons:

  • The user doesn't have the role that's associated with the mobile backend.
  • The value of the Authorization HTTP request header that follows Basic 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.

Headers
Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by the service.
Show Source
Nested Schema : o:errorDetails
Type: array
Minimum Number of Items: 0
List of the issues that cause the error. Included when the error is caused by multiple issues.
Show Source
Nested Schema : Error Detail
Type: object
Title: Error Detail
Show Source
Example Response (application/json)
{
    "o:errorCode":"MOBILE-92516",
    "detail":"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.",
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Unsupported media type",
    "o:errorPath":"/mobile/platform/extended/users/joe",
    "o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000033ddba, 0",
    "status":406
}