{"_id":"5b1f2cbdfd653400031d8d9e","project":"55e67aaa9cc7c62b00c4a1ea","version":{"_id":"5b1f2cbdfd653400031d8d9f","project":"55e67aaa9cc7c62b00c4a1ea","__v":0,"forked_from":"55e67aab9cc7c62b00c4a1ed","createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z","categories":["5b1f2cbdfd653400031d8d42","5b1f2cbdfd653400031d8d43","5b1f2cbdfd653400031d8d44","5b1f2cbdfd653400031d8d45","5b1f2cbdfd653400031d8d46","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","5b1f2cbdfd653400031d8d47","5b1f2cbdfd653400031d8d48","5af0fe494ca2730003cbc98a","5af0fe55ec80af0003804ca2"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"rebrand","version_clean":"1.3.0","version":"1.3"},"category":{"_id":"5b1f2cbdfd653400031d8d44","__v":20,"pages":["5b1f2cbdfd653400031d8d59","55ed079b0d968e2100de8339","5b1f2cbdfd653400031d8d5a","55ed0bb078319821005005cf","5b1f2cbdfd653400031d8d5b","5b1f2cbdfd653400031d8d5c","5b1f2cbdfd653400031d8d5d","5b1f2cbdfd653400031d8d5e","5b1f2cbdfd653400031d8d5f","5b1f2cbdfd653400031d8d60","5b1f2cbdfd653400031d8d61","5b1f2cbdfd653400031d8d62","5b1f2cbdfd653400031d8d63","5b1f2cbdfd653400031d8d64","5b1f2cbdfd653400031d8d65","5b1f2cbdfd653400031d8d66","5b1f2cbdfd653400031d8d67","5b1f2cbdfd653400031d8d6f","5b1f2cbdfd653400031d8d70","5b1f2cbdfd653400031d8d78"],"project":"55e67aaa9cc7c62b00c4a1ea","version":"5b1f2cbdfd653400031d8d9f","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-02T04:30:21.948Z","from_sync":false,"order":5,"slug":"rest-api","title":"REST API"},"user":"59095404643cd30f00aa3945","__v":9,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-05-14T02:10:36.605Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"name":"","code":"{\n  \"device\": {\n    \"id\": \":device_id\",\n    \"user_id\": null,\n    \"email\": null,\n    \"platform\": \"Unknown\",\n    \"last_opened\": null,\n    \"installed_at\": null,\n    \"push_enabled\": false,\n    \"user_attributes\": {},\n    \"user_events\": {},\n    \"location\": {\n      \"gps\": {},\n      \"geoip\": {\n        \"lat\": null,\n        \"lng\": null,\n        \"city\": null,\n        \"country\": null\n      }\n    },\n    \"erased_at\": \"0000-00-00T00:00:00.000Z\",\n    \"push_token\": null,\n    \"tags\": []\n  }\n}","language":"json","status":200},{"name":"","code":"{\n  \"error\":\"unauthorized\"\n}","language":"json","status":401},{"code":"{\n  \"error\":\"your api client does not have the correct roles\"\n}","language":"json","status":403}]},"method":"post","examples":{"codes":[{"name":"","code":"curl -X POST -u :API_KEY https://api.carnivalmobile.com/v5/devices/:device_id/erase","language":"curl"}]},"auth":"required","params":[{"_id":"561daa59e4dabd1700703c1d","ref":"","in":"path","required":false,"desc":"The Carnival Device ID","default":"","type":"string","name":"device_id"}],"url":"/devices/:device_id/erase"},"isReference":true,"order":7,"body":"[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"Once erased, all device data will be gone forever. Any request trying to update the device will return the HTTP error 451.\",\n  \"title\": \"This operation cannot be reverted\"\n}\n[/block]\nUse this API to remove any data related to a device ID. The user will still be able to use the app integrated to our SDK, but any data related to its device is going to be removed from our system.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Deleted devices doesn't count as uninstalls\",\n  \"body\": \"As the device is removed from our system straight away, this device will never count as an Uninstall in our analytics even after the user uninstalls the app from their phone.\"\n}\n[/block]","excerpt":"Endpoint used to purge all device data.","slug":"devices-erase","type":"endpoint","title":"Devices / Erase"}

postDevices / Erase

Endpoint used to purge all device data.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

device_id:
string
The Carnival Device ID

Examples


Result Format


Documentation

[block:callout] { "type": "danger", "body": "Once erased, all device data will be gone forever. Any request trying to update the device will return the HTTP error 451.", "title": "This operation cannot be reverted" } [/block] Use this API to remove any data related to a device ID. The user will still be able to use the app integrated to our SDK, but any data related to its device is going to be removed from our system. [block:callout] { "type": "warning", "title": "Deleted devices doesn't count as uninstalls", "body": "As the device is removed from our system straight away, this device will never count as an Uninstall in our analytics even after the user uninstalls the app from their phone." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}