{"_id":"569752c769393517000c82cc","parentDoc":null,"editedParams2":true,"user":"56839cf74aecbd0d00a4659e","__v":3,"editedParams":true,"project":"5668fab608f90021008e882f","version":{"_id":"5668fab608f90021008e8832","__v":19,"project":"5668fab608f90021008e882f","createdAt":"2015-12-10T04:08:22.769Z","releaseDate":"2015-12-10T04:08:22.769Z","categories":["5668fab708f90021008e8833","569740f124490c3700170a64","569742b58560a60d00e2c25d","569742bd0b09a41900b2446c","569742cd69393517000c82b3","569742f459a6692d003fad8f","569743020b09a41900b2446d","5697430b69393517000c82b5","56a17776470ae00d00c30642","56a2c48a831e2a0d0069b1ad","56b535757bccae0d00e9a1cd","56e1ff6aa49fdc0e005746b5","57e1c88115bf6522002a5e4e","57fa65275ba65a17008b988f","57fbeea34002550e004c032e","58474584889b6c2d00fb86e9","58475dcc64157f0f002f1907","587e7b5158666c2700965d4e","58a349fc30852819007ba083"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.18.0","version":"1.18"},"category":{"_id":"569742f459a6692d003fad8f","pages":["56974f48d231880d00676e6a","56975101d231880d00676e6c","5697511369393517000c82c8","5697512159a6692d003fada0","569752668560a60d00e2c268","569752898560a60d00e2c26b","569752add231880d00676e70","569752bd8400d52d00dd56ab","569752c769393517000c82cc","56e9cf33fae86b0e00e5394f","56e9cfe2af392b170035f68f"],"project":"5668fab608f90021008e882f","version":"5668fab608f90021008e8832","__v":11,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-01-14T06:40:52.350Z","from_sync":false,"order":1,"slug":"api-integration-rest-api","title":"REST API (For App/Backend)"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-14T07:48:23.111Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -H \"Content-Type: application/json\" -X \"DELETE\" -d '{\n  \"apiKey\" : \"YOUR_API_KEY\", // REPLACE WITH YOUR API KEY AND DELETE THIS COMMENT\n  \"users\" : [\n    {\n      \"userId\" : \"alfred01\"\n    },\n    {\n      \"userId\" : \"chana\"\n    }\n  ]\n}' https://api.petametrics.com/v1/user | python -mjson.tool","language":"curl","name":"cURL correct request"},{"language":"curl","name":"cURL incorrect request that fails to specify the id field","code":"curl -H \"Content-Type: application/json\" -X \"DELETE\" -d '{\n   \"apiKey\": \"527ccb8c-0f33-47e5-bff8-d9c2bcaef59e\", \n   \"users\": [\n       {\n         \"username\" : \"alfred01\"\n       },\n       {\n         \"userId\" : \"gloria\"\n       }\n   ]\n}' https://api.petametrics.com/v1/user | python -mjson.tool"},{"code":"curl -H \"Content-Type: application/json\" -X \"DELETE\" -d '{\n  \"apiKey\" : \"a6f2ae1c-b2d8-4bce-a8e4-15b00bb26fa4\",\n  \"version\" : 1,\n  \"users\" : [\n    {\n      \"userId\" : \"alfred01\"\n    }\n  ]\n}' https://api.petametrics.com/v1/user | python -mjson.tool\n","language":"curl","name":"cURL rejected some users because of missing organization setting"}]},"method":"delete","results":{"codes":[{"status":200,"language":"json","code":"{\n    \"diagnosticMsg\": \"Users marked for deletion should be deleted within a minute.\",\n    \"numItemsMarkedForDeletion\": 2,\n    \"numItemsRequestedForDeletion\": 2,\n    \"organization\": \"liftigniter\",\n    \"status\": \"2/2 users marked for delete.\",\n    \"statusCode\": 200,\n    \"userIdField\": \"userId\"\n}","name":"Response to correct request"},{"name":"","status":400,"language":"json","code":"{\n    \"diagnosticMsg\": \"Some users could not be deleted, possibly because of a missing id field.\",\n    \"numUsersMarkedForDeletion\": 1,\n    \"numUsersRequestedForDeletion\": 2,\n    \"organization\": \"liftigniter\",\n    \"status\": \"1/2 users marked for delete.\",\n    \"statusCode\": 400,\n    \"userIdField\": \"userId\"\n}"},{"name":"Rejected because of missing organization setting","status":403,"language":"json","code":"{\n    \"diagnosticMsg\": \"No users attempted for insertion, because we did not detect user data settings for keytesting. Please contact support:::at:::liftigniter.com for fixing the user data settings\",\n    \"organization\": \"keytesting\",\n    \"status\": \"Forbidden: 0 users deleted.\",\n    \"statusCode\": 403\n}"}]},"settings":"569740d169393517000c82b0","auth":"required","params":[{"_id":"56975b550b09a41900b24490","ref":"","in":"body","required":true,"desc":"Your LiftIgniter API key.","default":"","type":"string","name":"apiKey"},{"_id":"56975b550b09a41900b2448f","ref":"","in":"body","required":true,"desc":"List of user data.","default":"","type":"array_object","name":"users"}],"url":"/user"},"isReference":true,"order":10,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"When the deletion request is sent, our API does not check for whether or not the user exists. Rather, it simply marks the user for deletion. If theuser does not exist, this has no effect. If the item does exist, then the deletion is carried out.\\n\\nThe main advantage of this is that you can send a deletion command for a large number of users, and we can immediately accept this rather than checking for the existence of each of the users in the list you sent.\\n\\nYou can use our [user GET endpoint](doc:userid) to check for the existence of a user prior to deletion.\",\n  \"title\": \"A user can be marked for deletion even if that user does not exist\"\n}\n[/block]","excerpt":"","slug":"user-1","type":"endpoint","title":"/user"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

apiKey:
required
string
Your LiftIgniter API key.
users:
required
array of objects
List of user data.

Examples


Result Format


Documentation

[block:callout] { "type": "warning", "body": "When the deletion request is sent, our API does not check for whether or not the user exists. Rather, it simply marks the user for deletion. If theuser does not exist, this has no effect. If the item does exist, then the deletion is carried out.\n\nThe main advantage of this is that you can send a deletion command for a large number of users, and we can immediately accept this rather than checking for the existence of each of the users in the list you sent.\n\nYou can use our [user GET endpoint](doc:userid) to check for the existence of a user prior to deletion.", "title": "A user can be marked for deletion even if that user does not exist" } [/block]

User Information

Try It Out

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