Update Place

put

/mobile/system/locationManagement/places/{id}

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

Body ()
Root Schema : Update Place
Type: object
Title: Update Place
The place fields to be updated.
Show Source
Nested Schema : Place's Address
Type: object
Title: Place's Address
GPS address of the place.
Match One
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 place. Typically one device, but there can be multiple devices.
Show Source
Nested Schema : gpsPoint
Type: object
GPS point.
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 Request (application/json)
{
    "address":{
        "gpsPoint":{
            "longitude":-121.1566,
            "latitude":37.5548
        }
    },
    "devices":[
        1111
    ]
}
Back to Top

Response

Supported Media Types

200 Response

The location place was updated successfully.
Body ()
Root Schema : Place
Type: object
Title: Place
The created or updated place.
Show Source
Nested Schema : Place's Address
Type: object
Title: Place's Address
GPS address of the place.
Match One
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 : children
Type: array
Minimum Number of Items: 0
Places that are the child places of this place. This includes the full hierarchy of places that descend from this place.
Show Source
Nested Schema : devices
Type: array
Minimum Number of Items: 0
Devices associated with this place. Typically one device, but there can be multiple devices.
Show Source
Nested Schema : gpsPoint
Type: object
GPS point.
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
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
Example Response (application/json)
{
    "createdOn":"2015-08-06T18:37:59.424Z",
    "id":111,
    "modifiedOn":"2015-08-06T18:37:59.424Z",
    "createdBy":"jdoe",
    "address":{
        "gpsPoint":{
            "longitude":-121.1566,
            "latitude":37.5548
        }
    },
    "description":"FixitFast Warehouse in Redwood City",
    "modifiedBy":"jdoe",
    "name":"FixitFast Redwood City Warehouse",
    "links":[
        {
            "rel":"canonical",
            "href":"/mobile/platform/location/places/111"
        },
        {
            "rel":"self",
            "href":"/mobile/platform/location/places/111"
        }
    ],
    "label":"FixitFast Warehouse",
    "properties":{
        "equipmentManufacturer":"Abc Corp"
    },
    "devices":[
        {
            "id":1111,
            "createdOn":"2016-03-03T21:31:28.758+0000",
            "modifiedOn":"2016-03-03T21:31:28.758+0000",
            "createdBy":"jdoe",
            "modifiedBy":"jdoe",
            "description":"Beacon on 1st Floor in FixitFast Warehouse in Redwood City",
            "name":"RC_WH_01_F01_B004",
            "links":[
                {
                    "rel":"canonical",
                    "href":"/mobile/platform/location/devices/1111"
                },
                {
                    "rel":"self",
                    "href":"/mobile/platform/location/devices/1111"
                }
            ],
            "properties":{
                "manufacturerId":"10D39AE7-020E-4467-9CB2-DD36366F899D",
                "status":"Active",
                "visibility":"Public",
                "manufacturer":"Gimbal"
            },
            "beacon":{
                "iBeacon":{
                    "minor":"1.1",
                    "uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D",
                    "major":"1.0"
                }
            }
        }
    ],
    "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

Place 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 place 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/places/32

Example of Request Body

The following example shows the contents of the request body. This example associates the place with a parent place.

{
    "parentPlace": 51
}

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 parent place:

{
    "id": 32,
    "createdOn": "2017-09-19T23:23:43.238Z",
    "createdBy": "administrator",
    "modifiedOn": "2017-09-22T00:50:17.360Z",
    "modifiedBy": "administrator",
    "name": "l1b1",
    "label": "lot 1 block 1",
    "parentPlace": 51,
    "description": "Lot 1 block 1 New City",
    "hasChildren": false,
    "address": {
        "gpsCircle": {
            "longitude": -120.8745,
            "latitude": 37.9856,
            "radius": 29999.99999998
        }
    },
    "attributes": {
        "acres": ".25"
    },
    "links": [
        {
            "rel": "canonical",
            "href": "/mobile/platform/location/places/32"
        },
        {
            "rel": "self",
            "href": "/mobile/platform/location/places/32"
        }
    ]
}
Back to Top