Skip to content

Instantly share code, notes, and snippets.

@toddway
Last active December 15, 2015 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toddway/5240560 to your computer and use it in GitHub Desktop.
Save toddway/5240560 to your computer and use it in GitHub Desktop.
(function ($) {
//request user 1 in JSON format
$.getJSON('http://mysite.com/rest/user/1.json', function(data) {
console.log(data); //print the JSON response object to the console
});
})(jQuery);
{
"uid":"1",
"name":"admin",
"mail":"admin@mysite.com",
"theme":"",
"signature":"",
"signature_format":"filtered_html",
"created":"1354058561",
"access":"1363899033",
"login":"1363725854",
"status":"1",
"timezone":"America/Chicago",
"language":"",
"picture":"0",
"init":"admin@intranet.local",
"roles":{
"2":"authenticated user"
},
}
[
"Access denied for user anonymous"
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment