Update User Information
/mobile/platform/users/{username}
Updates the currently authorized mobile user's information in Oracle Identity Cloud Service. You can update the firstName
, lastName
, and email
properties as well as all the properties that are defined in the Oracle Identity Cloud Service User schema except for the username
property.
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
true
username
.-
email(optional):
string
The email address for the user.
-
firstName(optional):
string
The first name of the user.
-
lastName(optional):
string
The last name of the user.
{
"lastName":"Smith",
"urn:ietf:params:scim:schemas:idcs:extension:custom:User:custom_attribute":"1076270704",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:employeeNumber":"245562716",
"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
true
username
.-
email(optional):
string
The email address for the user.
-
firstName(optional):
string
The first name of the user.
-
lastName(optional):
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(optional):
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
-
Array of:
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(optional):
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
-
Array of:
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(optional):
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
-
Array of:
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(optional):
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
-
Array of:
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(optional):
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
-
Array of:
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.
curl -i
-X PATCH
-u joe: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: Mon, 28 Jan 2019 18:08:57 GMT
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": "f77873187f7d4e839a4cc8ca5db3e7ae",
"username": "joe",
"email": "joe@example.invalid",
"firstName": "Joe",
"lastName": "Doe",
"links": [
{
"rel": "canonical",
"href": "/mobile/platform/platform/users/joe"
},
{
"rel": "self",
"href": "/mobile/platform/platform/users/joe"
}
],
"attributes": {
"idcsCreatedBy": {
"type": "App",
"display": "Client",
"value": "Client_APPID",
"$ref": "https://example.com/admin/v1/Apps/Client_APPID"
},
"id": "f77873187f7d4e839a4cc8ca5db3e7ae",
"meta": {
"created": "2017-02-26T14:00:06.907Z",
"lastModified": "2019-01-28T18:08:59.470Z",
"resourceType": "User",
"location": "https://example.com/admin/v1/Users/f77873187f7d4e839a4cc8ca5db3e7ae"
},
"active": true,
"displayName": "Joe Doe",
"idcsLastModifiedBy": {
"value": "d95ec1a6916943aebabe259cb69a7b6f",
"display": "mobilecssexampledefaultinstance1",
"type": "App",
"$ref": "https://example.com/admin/v1/Apps/d95ec1a6916943aebabe259cb69a7b6f"
},
"userName": "joe",
"urn:ietf:params:scim:schemas:oracle:idcs:extension:user:User": {
"isFederatedUser": false
},
"emails": [
{
"primary": true,
"value": "joe@example.invalid",
"type": "work",
"verified": false
},
{
"primary": false,
"value": "joe@example.invalid",
"type": "recovery",
"verified": false
}
],
"name": {
"givenName": "Joe",
"familyName": "Doe",
"formatted": "Joe Doe"
},
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
"employeeNumber": "245562716"
},
"urn:ietf:params:scim:schemas:oracle:idcs:extension:userState:User": {
"locked": {
"on": false
}
},
"urn:ietf:params:scim:schemas:idcs:extension:custom:User": {
"custom_attribute": "1076270704"
},
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:oracle:idcs:extension:userState:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
"urn:ietf:params:scim:schemas:oracle:idcs:extension:user:User",
"urn:ietf:params:scim:schemas:idcs:extension:custom:User"
]
}
}