Update Device

put

/mobile/system/locationManagement/devices/{id}

Updates the device that matches the ID.

Permissions

Only team members with the MobileEnvironment_System role can access the Location Management API.

Request

Supported Media Types
Path Parameters
  • The ID of the device. This ID must be an existing device ID.

Body ()
Root Schema : Update Location Device
Type: object
Title: Update Location Device
The device fields to be updated.
Show Source
Nested Schema : Attributes
Type: object
Title: Attributes
Additional Properties Allowed
Show Source
The attributes entered in the MCS UI, as key/value pairs.
Show Source
Nested Schema : Beacon
Type: object
Title: Beacon
Device's identifying information.
Match One
Show Source
Nested Schema : iBeacon
Type: object
iBeacon device.
Show Source
Nested Schema : altBeacon
Type: object
AltBeacon device.
Show Source
Nested Schema : eddystone
Type: object
Eddystone device.
Show Source
Nested Schema : eddystoneUid
Type: object
Device's UID.
Show Source
Nested Schema : eddystoneUrl
Type: object
Device's URL.
Show Source
Example Request (application/json)
{
    "attributes":{
        "status":"InActive",
        "visibility":"Private"
    }
}
Back to Top

Response

Supported Media Types

200 Response

The location device was updated successfully.
Body ()
Root Schema : Location Device
Type: object
Title: Location Device
The created or updated device.
Show Source
Nested Schema : Associated Asset
Type: object
Title: Associated Asset
The properties for an associated asset. This object doesn't include the `devices` property because the associated device is the containing object.
Show Source
Nested Schema : Attributes
Type: object
Title: Attributes
Additional Properties Allowed
Show Source
The attributes entered in the MCS UI, as key/value pairs.
Show Source
Nested Schema : Beacon
Type: object
Title: Beacon
Device's identifying information.
Match One
Show Source
Nested Schema : Associated Place
Type: object
Title: Associated Place
The properties for an associated place. This object doesn't include the `devices` property because the associated device is the containing object.
Show Source
Nested Schema : Last Known Location
Type: object
Title: Last Known Location
Last known location of the asset.
Match One
Show Source
Nested Schema : gpsPoint
Type: object
GPS point.
Show Source
Nested Schema : iBeacon
Type: object
iBeacon device.
Show Source
Nested Schema : altBeacon
Type: object
AltBeacon device.
Show Source
Nested Schema : eddystone
Type: object
Eddystone device.
Show Source
Nested Schema : eddystoneUid
Type: object
Device's UID.
Show Source
Nested Schema : eddystoneUrl
Type: object
Device's URL.
Show Source
Nested Schema : Place's Address
Type: object
Title: Place's Address
GPS address of the place.
Match One
Show Source
Nested Schema : gpsCircle
Type: object
GPS circle.
Show Source
Nested Schema : gpsPolygon
Type: object
GPS polygon.
Show Source
Nested Schema : vertices
Type: array
Minimum Number of Items: 1
GPS polygon's vertices.
Show Source
Nested Schema : latitudeLongitudePair
Type: object
Pair of latitude and longitude values for a place.
Show Source
Example Response (application/json)
{
    "id":12345,
    "createdOn":"2015-08-06T18:37:59.424Z",
    "modifiedOn":"2015-08-08T07:22:44.654Z",
    "createdBy":"jdoe",
    "modifiedBy":"tsmith",
    "description":"Beacon on 1st Floor in FixitFast Warehouse in Redwood City",
    "name":"RC_WH_01_F01_B001",
    "links":[
        {
            "rel":"canonical",
            "href":"/mobile/platform/location/devices/12345"
        },
        {
            "rel":"self",
            "href":"/mobile/platform/location/devices/12345"
        }
    ],
    "beacon":{
        "iBeacon":{
            "minor":"1.1",
            "uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D",
            "major":"1.0"
        }
    },
    "attributes":{
        "manufacturerId":"10D39AE7-020E-4467-9CB2-DD36366F899D",
        "status":"InActive",
        "visibility":"Private",
        "manufacturer":"Abc Company"
    },
    "place":{
        "id":111,
        "createdOn":"2015-08-06T18:37:59.424Z",
        "modifiedOn":"2015-08-06T18:37:59.424Z",
        "createdBy":"jdoe",
        "address":{
            "gpsPoint":{
                "longitude":-121.1566,
                "latitude":37.5548
            }
        },
        "modifiedBy":"jdoe",
        "description":"FixitFast Warehouse in Redwood City",
        "name":"FixitFast Redwood City Warehouse",
        "label":"FixitFast Warehouse",
        "links":[
            {
                "rel":"canonical",
                "href":"/mobile/platform/location/places/111"
            },
            {
                "rel":"self",
                "href":"/mobile/platform/location/places/111"
            }
        ],
        "attributes":{
            "equipmentManufacturer":"Abc Corp"
        },
        "parentPlace":42
    }
}

400 Response

Bad request.

Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by Mobile Cloud 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

404 Response

Device ID not found.

Body ()
Root Schema : Error
Type: object
Title: Error
The error JSON object returned by Mobile Cloud 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
Back to Top

Examples

The following example shows how to update a device by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL.

curl -i
-X PUT 
-u administrator@example.com:mypassword
-d update.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/system/locationManagement/devices/32

Example of Request Body

The following example shows the contents of the request body. This example associates the device with a place and changes its status.

{
    "place": 51,
    "properties": {
        "status": "Active"
    }
}

Example of Response Header

The following shows an example of the response header.

200 OK
Content-Length: 955
Content-Type: application/json
Date: Fri, 22 Sep 2017 00:08:29 GMT

Example of Response Body

The following example shows, in JSON format, the contents of the response body with the new status and associated place:

{
    "id": 32,
    "createdOn": "2017-09-21T23:29:41.903Z",
    "createdBy": "administrator",
    "modifiedOn": "2017-09-22T00:28:08.930Z",
    "modifiedBy": "administrator",
    "name": "RC_WH_01_F01_B002",
    "description": "iBeacon",
    "place": {
        "id": 51,
        "createdOn": "2017-09-21T23:19:53.045Z",
        "createdBy": "administrator",
        "modifiedOn": "2017-09-21T23:19:53.045Z",
        "modifiedBy": "administrator",
        "name": "entranceSouth",
        "label": "public access",
        "description": "South Entrance New City",
        "hasChildren": false,
        "address": {
            "gpsPoint": {
                "longitude": -121.7845,
                "latitude": 37.845
            }
        },
        "attributes": {
            "guardStation": "true"
        },
        "links": [
            {
                "rel": "canonical",
                "href": "/mobile/platform/location/places/51"
            },
            {
                "rel": "self",
                "href": "/mobile/platform/location/places/51"
            }
        ]
    },
    "beacon": {
        "iBeacon": {
            "major": "1.0",
            "minor": "1.1",
            "uuid": "B9407F30-F5F8-466E-AFF9-25556B57AB1D"
        }
    },
    "attributes": {
        "status": "Active",
        "manufacturer": "Gimbal"
    },
    "links": [
        {
            "rel": "canonical",
            "href": "/mobile/platform/location/devices/32"
        },
        {
            "rel": "self",
            "href": "/mobile/platform/location/devices/32"
        }
    ]
}
Back to Top