Update Asset

put

/mobile/system/locationManagement/assets/{id}

Updates the asset 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 asset. This ID must be an existing asset ID.

Body ()
Root Schema : Update Asset
Type: object
Title: Update Asset
The asset 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 : devices
Type: array
Minimum Number of Items: 0
IDs of devices that are associated with this asset. Typically one device ID, but there can be multiple associated devices.
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
Example Request (application/json)
{
    "lastKnownLocation":{
        "gpsPoint":{
            "longitude":-121.1566,
            "latitude":37.5548
        }
    },
    "devices":[
        1435
    ]
}
Back to Top

Response

Supported Media Types

200 Response

The location assets were updated successfully.
Body ()
Root Schema : Asset
Type: object
Title: Asset
The created or updated asset.
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 : devices
Type: array
Minimum Number of Items: 0
The devices that are associated with this asset. Typically one device, but there can be multiple associated devices.
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 : Associated Location Device
Type: object
Title: Associated Location Device
The properties for an associated location device. Note that this object doesn't contain the `asset` and `place` properties.
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
Nested Schema : gpsPoint
Type: object
GPS point.
Show Source
Example Response (application/json)
{
    "id":111,
    "createdOn":"2015-08-06T18:37:59.424Z",
    "modifiedOn":"2015-08-06T18:37:59.424Z",
    "lastKnownLocation":{
        "gpsPoint":{
            "longitude":-121.1566,
            "latitude":37.5548
        }
    },
    "createdBy":"jdoe",
    "modifiedBy":"jdoe",
    "description":"Beacon #23 in the FixItFast Warehouse in Redwood City",
    "name":"RC_WH_01_F01_B023",
    "label":"beacon",
    "links":[
        {
            "rel":"canonical",
            "href":"/mobile/platform/location/assets/111"
        },
        {
            "rel":"self",
            "href":"/mobile/platform/location/assets/111"
        }
    ],
    "properties":{
        "EquipmentManufacturer":"Radius Networks",
        "beaconID":"AE2924505-66045"
    },
    "devices":[
        {
            "id":1435,
            "createdOn":"2016-03-03T21:31:28.836+0000",
            "modifiedOn":"2016-03-03T21:31:28.836+0000",
            "createdBy":"bsmith",
            "modifiedBy":"bsmith",
            "description":"Beacon on 2nd Floor in FixitFast Warehouse in Redwood City",
            "name":"RC_WH_01_F01_B006",
            "links":[
                {
                    "rel":"canonical",
                    "href":"/mobile/platform/location/devices/1435"
                },
                {
                    "rel":"self",
                    "href":"/mobile/platform/location/devices/1435"
                }
            ],
            "properties":{
                "manufacturerId":"10D39AE7-020E-4467-9CB2-DD36366F899D",
                "status":"Active",
                "manufacturer":"RadiusNetworks",
                "mac":"7C-7A-91-E2-A9-7D"
            },
            "beacon":{
                "altBeacon":{
                    "id2":"AFF9",
                    "id1":"B9407F30-F5F8-466E",
                    "id3":"25556B57FE6D"
                }
            }
        }
    ]
}

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

Asset 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 an asset 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/assets/32

Example of Request Body

The following example shows the contents of the request body. This example associates the asset with a device.

{
	"devices": [32]
}

Example of Response Header

The following shows an example of the response header.

200 OK
Content-Length: 911
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, which now includes the associated device:

{
    "id": 32,
    "createdOn": "2017-09-19T21:48:21.173Z",
    "createdBy": "administrator",
    "modifiedOn": "2017-09-22T00:08:30.080Z",
    "modifiedBy": "administrator",
    "name": "exc15",
    "label": "Excavator #15",
    "description": "Hydraulic excavator",
    "lastKnownLocation": null,
    "devices": [
        {
            "id": 32,
            "createdOn": "2017-09-21T23:29:41.903Z",
            "createdBy": "administrator",
            "modifiedOn": "2017-09-21T23:29:41.903Z",
            "modifiedBy": "administrator",
            "name": "RC_WH_01_F01_B002",
            "description": "iBeacon",
            "beacon": {
                "iBeacon": {
                    "major": "1.0",
                    "minor": "1.1",
                    "uuid": "B9407F30-F5F8-466E-AFF9-25556B57AB1D"
                }
            },
            "attributes": {
                "status": "Available",
                "manufacturer": "Gimbal"
            },
            "links": [
                {
                    "rel": "canonical",
                    "href": "/mobile/platform/location/devices/32"
                },
                {
                    "rel": "self",
                    "href": "/mobile/platform/location/devices/32"
                }
            ]
        }
    ],
    "attributes": {
        "cylinders": "4",
        "serial number": "13A3168G"
    },
    "links": [
        {
            "rel": "canonical",
            "href": "/mobile/platform/location/assets/32"
        },
        {
            "rel": "self",
            "href": "/mobile/platform/location/assets/32"
        }
    ]
}
Back to Top