The Geofencing Rest API¶
Geofences¶
-
PATCH
/atlas/geofences/
(string: fence_id)¶
-
PATCH
/atlas/geofences
¶ Handles the updates to existing resources. Request data must be formatted as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
PATCH /atlas/geofences/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - radius (int) – distance in meters.
- group-id (int) – geofence group id.
- token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – OK
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
POST
/atlas/geofences/
(string: fence_id)¶
-
POST
/atlas/geofences
¶ Handles the creation of a single geofence resource objects. Below is an example request and response. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
POST /atlas/geofences/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 201 Created Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "relationships": { "content": { "data": { "type": "content-message", "id": "57db107c46e6da0c82e15592" }, "links": { "related": "/pandora/content-messages/57db107c46e6da0c82e15596" } }, "content-pool": {} }, "attributes": { "direction": "entry", "address-components": { "country_abbv": "USA", "street_number": "5534", "locality": "Chicago", "country": "United States", "route": "North Kenmore", "colloquial_area": "Edgewater", "adminArea1": "Illinois", "adminArea2": "Cook", "adminArea3": "Midwest", "postal_code": "60640", "neighbourhood": "Edgewater", "route_abbv": "N Kenmore", "intersection": "Broadway and Kenmore", "sublocality": "" }, "center": { "type": "Point", "coordinates": [ -77.336733, 25.063592 ] }, dwell: { "device_id": "abc12334", "start": "2016-10-12 13:29:33" "end": "2016-10-12 17:29:33" }, "extra": {}, "deleted": null, "last-modified-dt": "2016-09-15T16:19:53.556000+00:00", "labels": [], "group-id": 20, "radius": 100, "created-dt": "2016-09-15T16:19:53.556000+00:00", "expiration-dt": null, "dynamic-content": false, "triggers": { "temp_range": [ { "end": 35, "start": 0 } ], "active_time_windows": [ { "start": { "sec": 0, "hour": 0, "min": 30 }, "end": { "sec": 0, "hour": 23, "min": 30 }, "tzname": "America/Chicago" } ], "precipitation": { "snow": { "end": 0.99, "start": 0 }, "rain": { "end": 0.99, "start": 0 } } } }, "type": "geofence", "id": "57db107c46e6da0c82e15595", "links": { "self": "/atlas/geofences/57db107c46e6da0c82e15595" } } }
Parameters: - center (string) – GeoJson string representing the center of the circular geofence - mandatory.
- radius (int) – distance in meters.
- group-id (int) – geofence group id.
- active_time_windows (string) – JSON encoded string representing an list of active time windows
- temp_windows (string) – JSON encoded string representing an list of active temperature windows
- precipitation (string) – JSON encoded string representing the chance of precipitation
- address (string) – json encoded string consisting of key value pairs of address components.
- street-number (string) – json encoded string consisting of key value pairs of address components.
- route (string) – route or street name.
- intersection (string) – route or street name.
- neighborhood route (string) – route or street name.
- postal-code (string) – route or street name.
- locality (string) – city or township.
- admin-area-1 (string) – county level name
- admin-area-2 (string) – state or province
- admin-area-3 (string) – region level name
- country (string) – state or province
- token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 201 Created – created
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
DELETE
/atlas/geofences/
(string: fence_id)¶
-
DELETE
/atlas/geofences
¶ Deletes an exisiting geofence.
DELETE /atlas/geofences/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 204 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/atlas/geofences/
(string: fence_id)¶
-
GET
/atlas/geofences
¶ - Read only queries against the Geofence resource collection. The example response below is for a single geofence.
- For queries returning multiple geofences a json encoded array of geofences will be returned.
All responses will be in json API format.
GET /atlas/geofences/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /atlas/geofences/g123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "relationships": { "content": { "data": { "type": "content-message", "id": "57db107c46e6da0c82e15592" }, "links": { "related": "/pandora/content-messages/57db107c46e6da0c82e15596" } }, "content-pool": {} }, "attributes": { "direction": "entry", "address-components": { "country_abbv": "USA", "street_number": "5534", "locality": "Chicago", "country": "United States", "route": "North Kenmore", "colloquial_area": "Edgewater", "adminArea1": "Illinois", "adminArea2": "Cook", "adminArea3": "Midwest", "postal_code": "60640", "neighbourhood": "Edgewater", "route_abbv": "N Kenmore", "intersection": "Broadway and Kenmore", "sublocality": "" }, "center": { "type": "Point", "coordinates": [ -77.336733, 25.063592 ] }, dwell: { "device_id": "abc12334", "start": "2016-10-12 13:29:33" "end": "2016-10-12 17:29:33" }, "extra": {}, "deleted": null, "last-modified-dt": "2016-09-15T16:19:53.556000+00:00", "labels": [], "group-id": 20, "radius": 100, "created-dt": "2016-09-15T16:19:53.556000+00:00", "expiration-dt": null, "dynamic-content": false, "triggers": { "temp_range": [ { "temp_end": 35, "temp_start": 0 } ], "active_timewindows": [ { "start": { "sec": 0, "hour": 0, "min": 30 }, "end": { "sec": 0, "hour": 23, "min": 30 }, "tzname": "America/Chicago" } ], "precipitation": { "snow": { "end": 0.99, "st": 0 }, "rain": { "end": 0.99, "st": 0 } } } }, "type": "geofence", "id": "57db107c46e6da0c82e15595", "links": { "self": "/atlas/geofences/57db107c46e6da0c82e15595" } } }
Parameters: - filter – json encoded string of attributes to filter the collection by. See JSON Parameters below for values.
- query (string) – name of pre-defined query to be executed. See Query Parameters below for values.
- lat (double) – latitude coordinate - used in named queries.
- lon (double) – longitude coordinate - used in named queries.
- radius (int) – distance in meters - used in named queries.
JSON Parameters: - lat (filter-param-float) – positional latitude coordinate
- lon (filter-param-float) – positional longitude coordinate
- address (filter-param-json-string) – json enconded string of address components. See fence schema for more info.
- radius (filter-param-float) – radial distance in meters
- group-id (filter-param-int) – group id of geofence group
- tag (filter-param-int) – geofence tag
Query Parameters: - geofences-in-radius – returns all geofences within the radial distance from a given {lon, lat}
- closest-geofences – returns all geofences within the radial distance from a given {lon, lat}
- enclosing-geofences – returns all geofences that are enclosing the position {lon, lat}
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – no error
- 204 No Content – no data
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/atlas/geofences/
(string: id)/relationships/content-message
¶ Returns the content message for a specified Geofence
-
GET
/atlas/geofences/
(string: id)/relationships/content-pool
¶ Returns the content pool for a specified Geofence
Triggers¶
-
POST
/atlas/trigger/
¶ Registers the detection of a geofence trigger event from a mobile client and responds with the appropriate or most relevant content message. Below is an example request and response. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
POST /atlas/triggers/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 201 Created Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "included": [ { "relationships": { "coupon-group": {}, "media": { "data": [], "links": { "related": "/pandora/content-messages/57dc2e6e46e6da1c04e72227/media" } }, "messages": { "data": [], "links": { "related": "/pandora/content-messages/57dc2e6e46e6da1c04e72227/text/message" } }, "pool": { "data": [ { "type": "content-pool", "id": "57dc2e6e46e6da1c04e72226" } ], "links": { "related": "/pandora/content-messages/57dc2e6e46e6da1c04e72227/content-pools" } }, "notification-text": { "data": null, "links": { "related": "/pandora/content-messages/57dc2e6e46e6da1c04e72227/text/notification" } } }, "attributes": { "redirect": "http://www.dgtl-factory.com", "status": null, "likes": [], "description": null, "extra": {}, "demographics": null, "labels": [], "comments": [], "layout-id": 0, "expiration-dt": null, "webview": false, "name": "testContent" }, "type": "content-message", "id": "57dc2e6e46e6da1c04e72227", "links": { "self": "/pandora/content-messages/57dc2e6e46e6da1c04e72227" } } ], "data": { "relationships": { "content-message": { "data": { "type": "content-message", "id": "57dc2e6e46e6da1c04e72227" }, "links": { "related": "/atlas/triggers/test1234/content-messages" } } }, "attributes": { "created-at": "2016-09-16 17:39:58.741805" }, "type": "fence-trigger", "id": "test1234", "links": { "self": "/atlas/trigger/test1234" } } }
Parameters: - device-id (string) – region level name
- fence-id (string) – state or province
- direction (string) – direction of detected geofence trigger
- app-name (string) – direction of detected geofence trigger
- token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 201 Created – created
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
POST
/atlas/trigger/
(id)¶ Registers the detection of a geofence trigger event from a mobile client and responds with the appropriate or most relevant content message. Below is an example request and response. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
POST /atlas/triggers/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 201 Created Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "included": [ { "relationships": { "coupon-group": {}, "media": { "data": [], "links": { "related": "/pandora/content-messages/57dc2e6e46e6da1c04e72227/media" } }, "messages": { "data": [], "links": { "related": "/pandora/content-messages/57dc2e6e46e6da1c04e72227/text/message" } }, "pool": { "data": [ { "type": "content-pool", "id": "57dc2e6e46e6da1c04e72226" } ], "links": { "related": "/pandora/content-messages/57dc2e6e46e6da1c04e72227/content-pools" } }, "notification-text": { "data": null, "links": { "related": "/pandora/content-messages/57dc2e6e46e6da1c04e72227/text/notification" } } }, "attributes": { "redirect": "http://www.dgtl-factory.com", "status": null, "likes": [], "description": null, "extra": {}, "demographics": null, "labels": [], "comments": [], "layout-id": 0, "expiration-dt": null, "webview": false, "name": "testContent" }, "type": "content-message", "id": "57dc2e6e46e6da1c04e72227", "links": { "self": "/pandora/content-messages/57dc2e6e46e6da1c04e72227" } } ], "data": { "relationships": { "content-message": { "data": { "type": "content-message", "id": "57dc2e6e46e6da1c04e72227" }, "links": { "related": "/atlas/triggers/test1234/content-messages" } } }, "attributes": { "created-at": "2016-09-16 17:39:58.741805" }, "type": "fence-trigger", "id": "test1234", "links": { "self": "/atlas/trigger/test1234" } } }
Parameters: - device-id (string) – region level name
- fence-id (string) – state or province
- direction (string) – direction of detected geofence trigger
- app-name (string) – direction of detected geofence trigger
- token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 201 Created – created
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/atlas/triggers/
(id)/content-messages
¶ Returns the geofence for a specified trigger id.
-
GET
/atlas/triggers/
(id)/geofence
¶ Returns the geofence for a specified trigger id.
Content-Messages¶
-
PATCH
/pandora/content-messages/
(string: content_id)¶
-
PATCH
/pandora/content-messages
¶ The response data structure is the same as the GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
PATCH /pandora/content-messages HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - name (string) – latitude coordinate - mandatory.
- media (string) – database id of image or video data to include
- notification-text (string) – distance in meters.
- message-text (string) – main message text to be displayed in the body of the content message/offer when opened in the app.
- description (string) – description of the content-message or offer.
- postal-code (string) – route or street name.
- android_deep_link (uri) – specified address where the content should redirect to when opened on the phone.
- ios-deep-link (uri) – specified address where the content should redirect to when opened on the phone.
- pool (string) – id of the content pool to assign the content message to
- redirect (string) – final redirect that the user should be taken to once clicked in the app
- token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – OK
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
POST
/pandora/content-messages/
(string: content_id)¶
-
POST
/pandora/content-messages
¶ Handles the creation of a single content-message resource objects. The response is the same as that in a GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
POST /pandora/content-messages HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 201 Created Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - name (string) – latitude coordinate - mandatory.
- media (string) – database id of image or video data to include
- notification-text (string) – distance in meters.
- message-text (string) – main message text to be displayed in the body of the content message/offer when opened in the app.
- description (string) – description of the content-message or offer.
- postal-code (string) – route or street nam
- deep-link (uri) – specified address where the content should redirect to when opened on the phone.
- pool (string) – id of the content pool to assign the content message to
- redirect (string) – final redirect that the user should be taken to once clicked in the app
- token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 201 Created – created
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
DELETE
/pandora/content-messages/
(string: content_id)¶
-
DELETE
/pandora/content-messages
¶ Deletes an existing content message but not the component objects such as media, message text etc...
DELETE /pandora/content-messages/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 204 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/pandora/content-messages/
(string: content_id)¶
-
GET
/pandora/content-messages
¶ Read only queries against the Content Message resource collection. The example response below is for a single Content Message Resource Object. For queries returning multiple Content Messages a json encoded array of objects will be returned. All responses will be in json API format.
GET /pandora/content-messages/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/content-messages/e2749c3e-2eb5-48c8-917d-0540d9b7769b HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "relationships": { "media": { "data": [ { "type": "media", "id": "57e1708f46e6da6e71a97854" } ], "links": { "related": "/pandora/content-messages/57e1708f46e6da6e71a97858/media" } }, "messages": { "data": [ { "type": "message-text", "id": "57e1708f46e6da6e71a97855" } ], "links": { "related": "/pandora/content-messages/57e1708f46e6da6e71a97858/text/message" } }, "pool": { "data": [ { "type": "content-pool", "id": "57e1708f46e6da6e71a97857" } ], "links": { "related": "/pandora/content-messages/57e1708f46e6da6e71a97858/content-pools" } }, "notification-text": { "data": { "type": "notification-text", "id": "57e1708f46e6da6e71a97856" }, "links": { "related": "/pandora/content-messages/57e1708f46e6da6e71a97858/text/notification" } } }, "attributes": { "redirect": "http://www.dgtl-factory.com", "status": "active", "description": "Demo content based around the Pepsi brand", "deep-link": { "com.dgtl_factory.android.dev.dfgeofencing": "contentHandler", "com.dFactory.DFGeofencing": "contentHandler", "com.dgtl_factory.ios.dev.dfgeofencing": "contentHandler" }, "extra": {}, "demographics": null, "labels": [], "comments": [ { "comment": "This offer is great!", "author": "1234" } ], "likes": [ { "consumer": "1234", "like": true } ], "expiration-dt": 1600363570, "webview": false, "name": "Pepsi Demo" }, "type": "content-message", "id": "e2749c3e-2eb5-48c8-917d-0540d9b7769b", "links": { "self": "/pandora/content-messages/e2749c3e-2eb5-48c8-917d-0540d9b7769b" } }, "links": { "self": "/pandora/content-messages/e2749c3e-2eb5-48c8-917d-0540d9b7769b" } }
Parameters: - filter – json encoded string of attributes to filter the collection by. See JSON Parameters below for values options.
- query (string) – name of pre-defined query to be executed. See Query Parameters below for more information.
JSON Parameters: - name (filter-param-string) – name of content message or offer.
- description (filter-param-string) – text used to describe the purpose of the content messgae or offer.
- expiration-dt (filter-param-string) – date that the content message cannot be used after.
- message (filter-param-objectID) – id of the message text used in the content message/offer.
- media (filter-param-objectID) – id of the image or video object used in the content message or offer.
- notification-text (filter-param-objectID) – id of the notification text object used content message or offer.
- pool (filter-param-objectID) – id. Appended field meaning that multiple values will be appended when recieved by the server.
Query Parameters: - custom-query – not implemented
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – no error
- 204 No Content – no data
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
Multimedia¶
-
PATCH
/pandora/media/
(string: media_id)¶
-
PATCH
/pandora/media
¶ - The response data structure is the same as the GET request. Request data must be formated as a json api resource
- object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
PATCH /pandora/media/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, application/x-www-form-urlencoded, text/*
Example response:
HTTP/1.1 200 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Keyword string kwargs: See schema for all possible attribute values to be updated
Form Parameters: - string token – OAuth token must be provided if not included in request header and user not logged into session.
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – OK
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
POST
/pandora/media/
(string: media_id)¶
-
POST
/pandora/media
¶ Handles the creation of a single multimedia resource object. The response is the same as that in a GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
POST /pandora/media/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, application/x-www-form-urlencoded, text/*
Example response:
HTTP/1.1 201 Created Content-Type: application/vnd.api+json
Form Parameters: - string name – latitude coordinate - mandatory.
- string filename – name of the file being uploaded including the file extension
- string content-type – internet mime type for payload data
- string account-id – Optional field needed only when a user has been logged in to a session
- string token – OAuth token must be provided if not included in request header and user not logged into session.
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 201 Created – created
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
DELETE
/pandora/media/
(string: media_id)¶
-
DELETE
/pandora/media
¶ Deletes an existing content message but not the component objects such as media, message text etc...
DELETE /pandora/media/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 204 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/pandora/media/
(string: media_id)¶
-
GET
/pandora/media
¶ Read only queries against the Pandora Multimedia Resource Collection. The example response below is for a single geofence. For queries returning multiple geofences a json encoded array of geofences will be returned. All responses will be in json API format.
GET /pandora/media/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
{ "data": [ { "attributes": { "s3bucket": "df-demo-utest", "name": "Pepsi Demo", "extra": {}, "position_id": null, "filename": "lovePepsiLanding.jpg", "s3url": "https://s3.amazonaws.com/df-demo-utest/lovePepsiLanding.jpg", "media_type": "image/jpeg", "thumbnail": "<GridFSProxy: (no file)>" }, "type": "multimedia", "id": "d21e9047-be07-402c-82cc-f0a3f84432f3", "links": { "self": "/pandora/media/d21e9047-be07-402c-82cc-f0a3f84432f3" } }, { "attributes": { "s3bucket": "df-demo-utest", "name": "Que Romantico", "extra": {}, "position_id": null, "filename": "QUE ROMANTICO.mp4", "s3url": "https://s3.amazonaws.com/df-demo-utest/QUE+ROMANTICO.mp4", "media_type": "video/mp4", "thumbnail": "<GridFSProxy: (no file)>" }, "type": "multimedia", "id": "8008649f-36a8-4628-80cd-51971ceaaf2b", "links": { "self": "/pandora/media/8008649f-36a8-4628-80cd-51971ceaaf2b" } }, { "attributes": { "s3bucket": "df-demo-utest", "name": "Telcel", "extra": {}, "position_id": null, "filename": "lovePepsiLanding.jpg", "s3url": "https://s3.amazonaws.com/df-demo-utest/Telcel-offer.jpg", "media_type": "image/jpeg", "thumbnail": "<GridFSProxy: (no file)>" }, "type": "multimedia", "id": "9d03bf49-043c-4c4c-9eda-d54b14f008e5", "links": { "self": "/pandora/media/9d03bf49-043c-4c4c-9eda-d54b14f008e5" } } ], "links": { "self": "/pandora/media" } }
GET /pandora/media/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "attributes": { "s3bucket": "df-demo-utest", "name": "Pepsi Demo", "extra": {}, "position_id": null, "filename": "lovePepsiLanding.jpg", "s3url": "https://s3.amazonaws.com/df-demo-utest/lovePepsiLanding.jpg", "media_type": "image/jpeg", "thumbnail": "<GridFSProxy: (no file)>" }, "type": "multimedia", "id": "05de7e7d-5795-45e9-a89f-d70cfa6226ca", "links": { "self": "/pandora/media/05de7e7d-5795-45e9-a89f-d70cfa6226ca" } }, "links": { "self": "/pandora/media/05de7e7d-5795-45e9-a89f-d70cfa6226ca" } }
Parameters: - filter – json encoded string of attributes to filter the collection by. See JSON Parameters below for values options.
- query (string) – name of pre-defined query to be executed. See Query Parameters below for more information.
JSON Parameters: - name (filter-param-string) – positional latitude coordinate
- users (filter-param-float) – user id. Appended field meaning that multiple values will be appended when recieved by the server.
- address (filter-param-json-string) – json enconded string of address components. See fence schema for more info.
Query Parameters: - custom-query – not implemented
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – no error
- 204 No Content – no data
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
Text¶
-
PATCH
/pandora/text/
(string: text_id)¶
-
PATCH
/pandora/text
¶ The response data structure is the same as the GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
PATCH /pandora/media/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, application/x-www-form-urlencoded, text/*
Example response:
HTTP/1.1 200 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Keyword string kwargs: See schema for all possible attribute values to be updated
Form Parameters: - string token – OAuth token must be provided if not included in request header and user not logged into session.
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – OK
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
POST
/pandora/text/
(string: text_id)¶
-
POST
/pandora/text
¶ Handles the creation of a single text resource object. The response is the same as that in a GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
POST /pandora/media/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, application/x-www-form-urlencoded, text/*
Example response:
HTTP/1.1 201 Created Content-Type: application/vnd.api+json
Form Parameters: - string content-type – internet mime type for payload data
- string account-id – Optional field needed only when a user has been logged in to a session
- string token – OAuth token must be provided if not included in request header and user not logged into session.
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 201 Created – created
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
DELETE
/pandora/text/
(string: text_id)¶
-
DELETE
/pandora/text
¶ Deletes an existing resource but not the component object.
DELETE /pandora/message-text/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 204 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/pandora/text/
(string: text_id)¶
-
GET
/pandora/text
¶ Read only queries against the Message-Text resource collection. The example response below is for a single message-text document. For queries returning multiple resources objects a json encoded array of message-text resources will be returned. All responses will be in json API format.
GET /pandora/message-text/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/message-text/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "attributes": { "position_id": null, "text": "Buy a Pepsi!", "name": "Pepsi Demo", "extra": { "tags": [ "spirits", "soda", "Pepsi", "pop" ] } }, "type": "text", "id": "57e12b2e46e6da64e4f3662f", "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } }, "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } } .. sourcecode:: http GET /pandora/message-text/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/message-text/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "attributes": { "position_id": null, "text": "Buy a Pepsi!", "name": "Pepsi Demo", "extra": { "tags": [ "spirits", "soda", "Pepsi", "pop" ] } }, "type": "text", "id": "57e12b2e46e6da64e4f3662f", "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } }, "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } }
GET /pandora/notification-text/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/notification-text/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
- {
- “data”: {
- “attributes”: {
“text”: “I love Pepsi”, “name”: “Pepsi Demo”, “position-id”: null, “extra”: {
- “tags”: [
- “spirits”, “soda”, “Pepsi”, “pop”
]
}
}, “type”: “notification-text”, “id”: “57e12e0d46e6da654434b7dc”, “links”: {
“self”: “/pandora/text/57e12e0d46e6da654434b7dc”}
}, “links”: {
“self”: “/pandora/text/notifications/57e12e0d46e6da654434b7dc”}
}
Parameters: - filter – json encoded string of attributes to filter the collection by. See JSON Parameters below for values options.
- query (string) – name of pre-defined query to be executed. See Query Parameters below for more information.
JSON Parameters: - name (filter-param-string) – name of text document
- text (filter-param-string) – text body of the document
- labels (filter-param-string) – label attibutes.
Query Parameters: - custom-query – not implemented
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – no error
- 204 No Content – no data
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
PATCH
/pandora/text/messages/
(string: text_id)¶
-
PATCH
/pandora/text/messages
¶ The response data structure is the same as the GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
PATCH /pandora/media/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, application/x-www-form-urlencoded, text/*
Example response:
HTTP/1.1 200 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Keyword string kwargs: See schema for all possible attribute values to be updated
Form Parameters: - string token – OAuth token must be provided if not included in request header and user not logged into session.
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – OK
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
POST
/pandora/text/messages/
(string: text_id)¶
-
POST
/pandora/text/messages
¶ Handles the creation of a single text resource object. The response is the same as that in a GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
POST /pandora/media/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, application/x-www-form-urlencoded, text/*
Example response:
HTTP/1.1 201 Created Content-Type: application/vnd.api+json
Form Parameters: - string content-type – internet mime type for payload data
- string account-id – Optional field needed only when a user has been logged in to a session
- string token – OAuth token must be provided if not included in request header and user not logged into session.
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 201 Created – created
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
DELETE
/pandora/text/messages/
(string: text_id)¶
-
DELETE
/pandora/text/messages
¶ Deletes an existing resource but not the component object.
DELETE /pandora/message-text/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 204 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/pandora/text/messages/
(string: text_id)¶
-
GET
/pandora/text/messages
¶ Read only queries against the Message-Text resource collection. The example response below is for a single message-text document. For queries returning multiple resources objects a json encoded array of message-text resources will be returned. All responses will be in json API format.
GET /pandora/message-text/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/message-text/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "attributes": { "position_id": null, "text": "Buy a Pepsi!", "name": "Pepsi Demo", "extra": { "tags": [ "spirits", "soda", "Pepsi", "pop" ] } }, "type": "text", "id": "57e12b2e46e6da64e4f3662f", "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } }, "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } } .. sourcecode:: http GET /pandora/message-text/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/message-text/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "attributes": { "position_id": null, "text": "Buy a Pepsi!", "name": "Pepsi Demo", "extra": { "tags": [ "spirits", "soda", "Pepsi", "pop" ] } }, "type": "text", "id": "57e12b2e46e6da64e4f3662f", "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } }, "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } }
GET /pandora/notification-text/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/notification-text/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
- {
- “data”: {
- “attributes”: {
“text”: “I love Pepsi”, “name”: “Pepsi Demo”, “position-id”: null, “extra”: {
- “tags”: [
- “spirits”, “soda”, “Pepsi”, “pop”
]
}
}, “type”: “notification-text”, “id”: “57e12e0d46e6da654434b7dc”, “links”: {
“self”: “/pandora/text/57e12e0d46e6da654434b7dc”}
}, “links”: {
“self”: “/pandora/text/notifications/57e12e0d46e6da654434b7dc”}
}
Parameters: - filter – json encoded string of attributes to filter the collection by. See JSON Parameters below for values options.
- query (string) – name of pre-defined query to be executed. See Query Parameters below for more information.
JSON Parameters: - name (filter-param-string) – name of text document
- text (filter-param-string) – text body of the document
- labels (filter-param-string) – label attibutes.
Query Parameters: - custom-query – not implemented
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – no error
- 204 No Content – no data
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
PATCH
/pandora/text/notifications/
(string: text_id)¶
-
PATCH
/pandora/text/notifications
¶ The response data structure is the same as the GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
PATCH /pandora/media/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, application/x-www-form-urlencoded, text/*
Example response:
HTTP/1.1 200 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Keyword string kwargs: See schema for all possible attribute values to be updated
Form Parameters: - string token – OAuth token must be provided if not included in request header and user not logged into session.
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – OK
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
POST
/pandora/text/notifications/
(string: text_id)¶
-
POST
/pandora/text/notifications
¶ Handles the creation of a single text resource object. The response is the same as that in a GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
POST /pandora/media/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, application/x-www-form-urlencoded, text/*
Example response:
HTTP/1.1 201 Created Content-Type: application/vnd.api+json
Form Parameters: - string content-type – internet mime type for payload data
- string account-id – Optional field needed only when a user has been logged in to a session
- string token – OAuth token must be provided if not included in request header and user not logged into session.
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 201 Created – created
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
DELETE
/pandora/text/notifications/
(string: text_id)¶
-
DELETE
/pandora/text/notifications
¶ Deletes an existing resource but not the component object.
DELETE /pandora/message-text/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 204 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/pandora/text/notifications/
(string: text_id)¶
-
GET
/pandora/text/notifications
¶ Read only queries against the Message-Text resource collection. The example response below is for a single message-text document. For queries returning multiple resources objects a json encoded array of message-text resources will be returned. All responses will be in json API format.
GET /pandora/message-text/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/message-text/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "attributes": { "position_id": null, "text": "Buy a Pepsi!", "name": "Pepsi Demo", "extra": { "tags": [ "spirits", "soda", "Pepsi", "pop" ] } }, "type": "text", "id": "57e12b2e46e6da64e4f3662f", "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } }, "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } } .. sourcecode:: http GET /pandora/message-text/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/message-text/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "attributes": { "position_id": null, "text": "Buy a Pepsi!", "name": "Pepsi Demo", "extra": { "tags": [ "spirits", "soda", "Pepsi", "pop" ] } }, "type": "text", "id": "57e12b2e46e6da64e4f3662f", "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } }, "links": { "self": "/pandora/text/messages/57e12b2e46e6da64e4f3662f" } }
GET /pandora/notification-text/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /pandora/notification-text/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
- {
- “data”: {
- “attributes”: {
“text”: “I love Pepsi”, “name”: “Pepsi Demo”, “position-id”: null, “extra”: {
- “tags”: [
- “spirits”, “soda”, “Pepsi”, “pop”
]
}
}, “type”: “notification-text”, “id”: “57e12e0d46e6da654434b7dc”, “links”: {
“self”: “/pandora/text/57e12e0d46e6da654434b7dc”}
}, “links”: {
“self”: “/pandora/text/notifications/57e12e0d46e6da654434b7dc”}
}
Parameters: - filter – json encoded string of attributes to filter the collection by. See JSON Parameters below for values options.
- query (string) – name of pre-defined query to be executed. See Query Parameters below for more information.
JSON Parameters: - name (filter-param-string) – name of text document
- text (filter-param-string) – text body of the document
- labels (filter-param-string) – label attibutes.
Query Parameters: - custom-query – not implemented
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – no error
- 204 No Content – no data
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
Accounts¶
-
PATCH
/zeus/accounts/
(account_id)¶
-
PATCH
/zeus/accounts
¶ Handles the updates to existing resources. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
PATCH /zeus/accounts/123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - name (string) – latitude coordinate - mandatory.
- city (string) – longitude coordinate - mandatory.
- street-number (string) – distance in meters.
- address (json-obj) – json encoded string consisting of key value pairs of address components.
- street-number – json encoded string consisting of key value pairs of address components.
- route (string) – route or street name.
- postal-code (string) – route or street name.
- city – city or township.
- country (string) – state or province
- token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – OK
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
POST
/zeus/accounts/
(account_id)¶
-
POST
/zeus/accounts
¶ Handles the creation of a single geofence resource objects. The response is the same as that in a GET request. Request data must be formated as a json api resource object or encoded as form data. All responses will be in json API format. See http://jsonapi.org/format/#crud for more information.
POST /zeus/accounts/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 201 Created Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - name (string) – latitude coordinate - mandatory.
- city (string) – longitude coordinate - mandatory.
- street-number (string) – distance in meters.
- address (json-obj) – json encoded string consisting of key value pairs of address components.
- street-number – json encoded string consisting of key value pairs of address components.
- route (string) – route or street name.
- postal-code (string) – route or street name.
- city – city or township.
- country (string) – state or province
- token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 201 Created – created
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
DELETE
/zeus/accounts/
(account_id)¶
-
DELETE
/zeus/accounts
¶ Deletes an exisiting geofence.
DELETE /zeus/accounts/abc123 HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 204 OK Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded
Parameters: - token (string) – OAuth token must be provided if not included in request header
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/zeus/accounts/
(account_id)¶
-
GET
/zeus/accounts
¶ - Read only queries against the Geofence resource collection. The example response below is for a single geofence.
- For queries returning multiple geofences a json encoded array of geofences will be returned.
All responses will be in json API format.
GET /zeus/accounts/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
GET /zeus/accounts/123/ HTTP/1.1 Host: example.com Accept: application/vnd.api+json, application/json, text/*
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/vnd.api+json, application/json, application/x-www-form-urlencoded { "data": { "relationships": { "campaigns": { "links": { "related": "/zeus/accounts/1/campaigns" } }, "users": { "data": [ { "type": "user", "id": "1" } ], "links": { "related": "/zeus/accounts/1/users" } } }, "attributes": { "city": "Chicago", "name": "test_account 0", "country": "USA", "thumbnail": "https://example.com/thumbnail/0", "phone": null, "state": "Illinois", "postal-code": null, "street-number": null, "email": null }, "type": "account", "id": 1, "links": { "self": "/zeus/accounts/1" } } }
Parameters: - filter – json encoded string of attributes to filter the collection by. See JSON Parameters below for values options.
- query (string) – name of pre-defined query to be executed. See Query Parameters below for more information.
JSON Parameters: - name (filter-param-string) – positional latitude coordinate
- users (filter-param-float) – user id. Appended field meaning that multiple values will be appended when recieved by the server.
- address (filter-param-json-string) – json enconded string of address components. See fence schema for more info.
Query Parameters: - custom-query – not implemented
Request Headers: - Accept – the response content type depends on Accept header
- Authorization – optional OAuth token to authenticate. Must be present if not included in request body.
Response Headers: - Content-Type – this depends on Accept header of request
Status Codes: - 200 OK – no error
- 204 No Content – no data
- 400 Bad Request – bad request
- 403 Forbidden – not authorized
-
GET
/zeus/accounts/
(account_id)/campaigns
¶ Returns the set of campaigns mapped to the account
-
GET
/zeus/accounts/
(account_id)/geofences
¶ Returns the set of geofences managed by the account
-
GET
/zeus/accounts/
(account_id)/users
¶ Returns the set of admin users which have access to the account
-
GET
/zeus/campaigns/
(campaign_id)/geofences
¶ Returns the set of geofences managed by the cspecified campign.