Update User Information
/mobile/platform/users/{username}
Deprecated. Use the Oracle Identity Cloud Service to update user information.
Permissions
The authorized user must be a mobile user that has a role that's associated with the mobile backend.
Request
- application/json
-
username: string
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 theAuthorization
HTTP request header.
object
User Information to Modify
-
email:
string
The email address for the user.
-
firstName:
string
The first name of the user.
-
lastName:
string
The last name of the user.
{
"lastName":"Smith",
"email":"Smith12345@domain.xxx"
}
Response
- application/json
200 Response
-
Content-Type: string
The media type of the object, which is
application/json
. This is the same media type that will be returned when the object is requested.
object
User Information to Modify
-
email:
string
The email address for the user.
-
firstName:
string
The first name of the user.
-
lastName:
string
The last name of the user.
{
"firstName":"Joe",
"lastName":"Smith",
"links":[
{
"rel":"canonical",
"href":"/mobile/platform/users/joe"
},
{
"rel":"self",
"href":"/mobile/platform/users/joe"
}
],
"id":"295e450a-63f0-41fa-be43-cd2dbcb21598",
"email":"Smith12345@domain.xxx",
"username":"joe"
}
400 Response
The operation can't be performed due to one of the following reasons:
- The user doesn't exist.
- The content isn't a correctly formed JSON object.
- The call used Basic Auth but the
Oracle-Mobile-Backend-ID
HTTP request header wasn't specified.
-
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
The service's error code.
-
o:errorDetails:
array o:errorDetails
Minimum Number of Items:
0
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
-
[0]:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
The service's 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.
{
"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/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.
-
Content-Type: string
The media type of 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
The service's error code.
-
o:errorDetails:
array o:errorDetails
Minimum Number of Items:
0
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
-
[0]:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
The service's 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.
{
"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/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 a role that's associated with the mobile backend.
- The value of the
Authorization
HTTP request header that follows either theBearer
orBasic
authentication scheme is either missing or invalid. - The property can't be changed. For example, you can't change
username
.
404 Response
-
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
The service's error code.
-
o:errorDetails:
array o:errorDetails
Minimum Number of Items:
0
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
-
[0]:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
The service's 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.
{
"o:errorCode":"MOBILE-58026",
"detail":"We cannot find the active mobile backend for the given clientId fd4cc0cf-0a72-4ed6-aab6-295133b8904e and BASIC schema. Specify a valid clientId and try again.",
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Mobile Backend not found",
"o:errorPath":"/mobile/platform/users/joe",
"o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000033b529, 0",
"status":404
}
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 is supported.
-
Content-Type: string
The media type of 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
The service's error code.
-
o:errorDetails:
array o:errorDetails
Minimum Number of Items:
0
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
-
[0]:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
The service's 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.
{
"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 is supported.",
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Unsupported media type",
"o:errorPath":"/mobile/platform/users/joe",
"o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000033ddba, 0",
"status":406
}
415 Response
The MIME media type isn't supported or wasn't specified. Only application/json
is 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
The service's error code.
-
o:errorDetails:
array o:errorDetails
Minimum Number of Items:
0
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
-
[0]:
object Error Detail
Title:
Error Detail
object
Error Detail
-
instance:
string
URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
The service's 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.
{
"o:errorCode":"MOBILE-92515",
"detail":"The MIME media type isn't supported, only application/json is supported. Specify a media type that is supported.",
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Unsupported media type",
"o:errorPath":"/mobile/platform/users/joe",
"o:ecid":"cde040005cd5983e:4372d958:14c8c4c2d6c:-8000-000000000033ba73, 0",
"status":415
}
Examples
The following example shows how to update the current user's last name by submitting a PATCH request on the REST resource using cURL. The ~
(tilde) gets the user name for the current user from the Authorization
header. For more information about cURL, see Use cURL.
curl -i -X PATCH -u mobile.user@example.com:password -d users.json -H "Content-Type: application/json; charset=utf-8" -H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce" https://fif.cloud.oracle.com/mobile/platform/users/~
Example of Request Body
The following example shows the contents of the request body..
{ "lastName": "Doe" }
Example of Response Header
The following shows an example of the response header.
200 OK Content-Type: application/json Date: Thu, 18 Jun 2015 00:26:10 GMT Oracle-Mobile-Runtime-Version: 15.4.1-201506162222
Example of Response Body
The following example shows, in JSON format, the contents of the response body, which lists all the basic property values for the user:
{ "id": "23e77f1d-0def-483f-bc77-a7742cd155b6", "username": "mobile.user", "email": "mobile.user@example.com", "firstName": "John", "lastName": "Doe", "links": [ { "rel": "canonical", "href": "/mobile/platform/users/mobile.user" } ] }