Esri's Geotrigger Service is replacing Geoloqi! Learn More | FAQ

De-Duplication and Extra Parameters

De-Duplication

Layers, places, triggers and users support a "key" parameter that can be used to de-duplicate data.

If you are importing data from an external dataset, where you don't have an intermediate database, it can be useful to use Geoloqi to handle de-duplicating data. Rather than keep track of which objects you've already sent to Geoloqi, you can use the key parameter to automatically dedupe the dataset.

/1/layer/create

Request:
{
  "name":"My Event Calendar",
  "key":"my_events"
}

Response:
HTTP/1.1 409 Conflict
{
  "id":"G83"
}

To use this feature, find a unique identifier in your dataset, such as an absolute URI from an RSS feed, or a unique database ID from an external database, and send that in the "key" parameter.

Any time you run layer/create, place/create, or trigger/create and provide this key, the API will not create a new record if an item already exists with the given key. Instead, you will get the same object back as if you had created the item new, but the HTTP header will be set to 409 Conflict indicating the object already exists. This means your code can proceed as if a new object was created, and Geoloqi will not have created a duplicate entry.

For more information on using the "key" with user accounts, please refer to the "Unique Key" section of Creating User Accounts.

Extra Data

Many objects can have custom data associated with them. When this is the case, there is an "extra" key available in the object's info.

For example, places can have additional data so that you can associate a place with an internal record.

{
  place_id: "1aa",
  name: "Backspace",
  latitude: 45.524072,
  longitude: -122.675577,
  radius: 40,
  display_name: "Backspace",
  time_from: "00:00:00",
  time_to: "00:00:00",
  active: 1,
  extra: {
    phone: "(503) 248-2900"
  },
  description: "Backspace is an active music venue featuring a wide variety of musical styles.",
}

You can use the "extra" property to store any key/value data. Typically you should store only simple data types as values (numbers and strings). You will be able to filter objects by these keys. If you store an object, the object will be returned in JSON format just like it was sent, however you will not be able to filter based on the object's properties.

The following objects support the "extra" parameter: users, layers, places, triggers

See the following pages for more details: