Updating Location Providers Data

To update a location provider we need to do a PUT request to /locationProviders/<Location Provider ID> with the application/json content-type request header and a JSON object containing the specified properties in the request body.

Properties

Name Mandatory Type Length Example
name true string 128 "Test"
details false string(*1) - "{\"email\":\"test@abc.com\"}"
locationsSource.endpoint false string(*2) 256 "http://remote.locations"
archivingPeriod true int(*3) - 7

Notes

  1. Must be well formed json, as specified in RFC 4627
  2. If specified then indicates that this is a remote location provider. Location services will use provided url to fetch locations.
  3. Archiving period must be in the range 1-30

Required Permission

can-update-location-providers

See Auth* (scopes).

Request

Update location provider:

PUT /locationProviders/68144875-24e5-4a31-ae74-f0924d2c513e
Content-Type: application/json
{
  "name": "Test",
  "details": "{\"tag\":\"test\"}",
  "locationsSource": {
    "endpoint": "http://remote-locations"
  },
  "archivingPeriod": 7
}

Response

Success

HTTP/1.1 200 OK
{
  "rel":"self",
  "href":"/locations/68144875-24e5-4a31-ae74-f0924d2c513e"
}

Failure

Request error; e.g. invalid JSON object:

HTTP/1.1 400 BAD REQUEST
{
"error":"Invalid property: 'deetails'"
}

User doesn't have the required permission:

HTTP/1.1 403 FORBIDDEN

Location provider does not exist:

HTTP/1.1 404 NOT FOUND

Other errors:

HTTP/1.1 500 INTERNAL SERVER ERROR

results matching ""

    No results matching ""