Skip to content

Instantly share code, notes, and snippets.

@toddway
Last active December 15, 2015 09:39
Show Gist options
  • 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":"[email protected]",
"theme":"",
"signature":"",
"signature_format":"filtered_html",
"created":"1354058561",
"access":"1363899033",
"login":"1363725854",
"status":"1",
"timezone":"America/Chicago",
"language":"",
"picture":"0",
"init":"[email protected]",
"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