{"__v":0,"_id":"588f722cbcace50f0052ba20","category":{"version":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","_id":"588f722bbcace50f0052b9e6","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-02-25T18:09:36.891Z","from_sync":false,"order":4,"slug":"dashboard-api","title":"Dashboard API"},"parentDoc":null,"project":"565f5fa26bafd40d0030a064","user":"565f3941ea46251700972783","version":{"__v":1,"_id":"588f722bbcace50f0052b9e1","project":"565f5fa26bafd40d0030a064","createdAt":"2017-01-30T17:04:43.410Z","releaseDate":"2017-01-30T17:04:43.410Z","categories":["588f722bbcace50f0052b9e2","588f722bbcace50f0052b9e3","588f722bbcace50f0052b9e4","588f722bbcace50f0052b9e5","588f722bbcace50f0052b9e6","588f722bbcace50f0052b9e7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"5.3.0","version":"5.3.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-22T23:23:59.016Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -b cookies.txt -c cookies.txt -H \"Content-Type: application/json\" -X PUT -d '{\"user\":{\"name\":\"Fizz Buzz\",\"email\":\"fizzbuzz:::at:::nanoscale.io\",\"password\":null,\"password_confirmation\":null,\"admin\":true,\"confirmed\":true}}' \"https://api.nanoscale.io/users/95\"","language":"curl"}]},"method":"put","results":{"codes":[{"status":200,"language":"json","code":"{\n    \"user\": {\n        \"id\": 95,\n        \"name\": \"Fizz Buzz\",\n        \"email\": \"fizzbuzz@nanoscale.io\",\n        \"admin\": true,\n        \"confirmed\": true\n    }\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"56cb9912245b841300806fa6","ref":"","in":"path","required":true,"desc":"The user's id","default":"","type":"string","name":"id"}],"url":"/users/:id"},"isReference":true,"order":4,"body":"Updates a single user.\n\nHere is a list of fields that can be provided.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"key\",\n    \"h-1\": \"type\",\n    \"h-2\": \"description\",\n    \"0-0\": \"name\",\n    \"1-0\": \"email\",\n    \"2-0\": \"password\",\n    \"3-0\": \"password_confirmation\",\n    \"4-0\": \"admin\",\n    \"5-0\": \"confirmed\",\n    \"0-1\": \"`string`\",\n    \"1-1\": \"`string`\",\n    \"2-1\": \"`string`\",\n    \"3-1\": \"`string`\",\n    \"4-1\": \"`boolean`\",\n    \"5-1\": \"`boolean`\",\n    \"0-2\": \"The name of the user.\",\n    \"1-2\": \"The email of the user.\",\n    \"4-2\": \"Indicates if the user is an administrator.\",\n    \"5-2\": \"Indicates if the user has confirmed their account.\",\n    \"2-2\": \"The updated password of the user.\",\n    \"3-2\": \"The updated password of the user.\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]\nHere is an example of the `JSON` used to update a user:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"user\\\": {\\n        \\\"name\\\": \\\"Fizz Buzz\\\",\\n        \\\"email\\\": \\\"fizzbuzz@nanoscale.io\\\",\\n        \\\"password\\\": null,\\n        \\\"password_confirmation\\\": null,\\n        \\\"admin\\\": true,\\n        \\\"confirmed\\\": true\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"usersid-1","type":"endpoint","title":"/users/:id"}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
string
The user's id

Examples


Result Format


Documentation

Updates a single user. Here is a list of fields that can be provided. [block:parameters] { "data": { "h-0": "key", "h-1": "type", "h-2": "description", "0-0": "name", "1-0": "email", "2-0": "password", "3-0": "password_confirmation", "4-0": "admin", "5-0": "confirmed", "0-1": "`string`", "1-1": "`string`", "2-1": "`string`", "3-1": "`string`", "4-1": "`boolean`", "5-1": "`boolean`", "0-2": "The name of the user.", "1-2": "The email of the user.", "4-2": "Indicates if the user is an administrator.", "5-2": "Indicates if the user has confirmed their account.", "2-2": "The updated password of the user.", "3-2": "The updated password of the user." }, "cols": 3, "rows": 6 } [/block] Here is an example of the `JSON` used to update a user: [block:code] { "codes": [ { "code": "{\n \"user\": {\n \"name\": \"Fizz Buzz\",\n \"email\": \"fizzbuzz@nanoscale.io\",\n \"password\": null,\n \"password_confirmation\": null,\n \"admin\": true,\n \"confirmed\": true\n }\n}", "language": "json" } ] } [/block]