Comments (8)
Works for me...
jband@ ~/looker/src/looker-sdk/shell (master)$ ruby shell.rb
Connecting to Looker at 'https://localhost:19999/api/3.0/'
Looker is alive!
[1] pry(main)> sdk.user_credentials_email(9)
=> {:email=>"[email protected]",
:created_at=>2014-02-28 11:05:10 -0800,
:logged_in_at=>2015-09-08 12:00:15 -0700,
:type=>"email",
:is_disabled=>false,
:password_reset_url=>nil,
:url=>"https://localhost:19999/api/3.0/users/9/credentials_email",
:user_url=>"https://localhost:19999/api/3.0/users/9",
:can=>{}}
Please explain your problem a bit more, perhaps I can help.
from looker-sdk-ruby.
Ah - parameter on user_credentials_email. I thought it was a method off of a user.
from looker-sdk-ruby.
Connecting to Looker at 'https://localhost:19999/api/3.0/'
Looker is alive!
[1] pry(main)> sdk.user_credentials_email(3)
LookerSDK::NotFound: GET https://localhost:19999/api/3.0/users/3/credentials_email: 404 - Not found // See: http://docs.looker.com/
from /opt/boxen/rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/bundler/gems/looker-sdk-ruby-abff0fb200a4/lib/looker-sdk/response/raise_error.rb:15:in `on_complete'
from looker-sdk-ruby.
Bit more, just to show that there's a user with id = 3:
$ ruby shell.rb
Connecting to Looker at 'https://localhost:19999/api/3.0/'
Looker is alive!
[1] pry(main)> sdk.alive
=> 200
[2] pry(main)> sdk.user(3)
=> {:id=>3,
:first_name=>"John",
:last_name=>"Norman",
:avatar_url=>
"https://www.gravatar.com/avatar/b9f047098e4ffbbc812a9ca9caba82e6?s=156&d=mm",
:url=>"https://localhost:19999/api/3.0/users/3",
:can=>{}}
[3] pry(main)> sdk.user_credentials_email(3)
LookerSDK::NotFound: GET https://localhost:19999/api/3.0/users/3/credentials_email: 404 - Not found // See: http://docs.looker.com/
from /opt/boxen/rbenv/versions/1.9.3-p550/lib/ruby/gems/1.9.1/bundler/gems/looker-sdk-ruby-abff0fb200a4/lib/looker-sdk/response/raise_error.rb:15:in `on_complete'
[4] pry(main)>
from looker-sdk-ruby.
Maybe that user is an API user.
from looker-sdk-ruby.
The user is not an API user, but the user is a SAML user. Would that make this request return a 404?
from looker-sdk-ruby.
Yes. If the resource does not exist then you will get a NotFound. So, if the user exists, but has no credentials_email then the resource you are asking for does not exist. This makes sense if your user only has credentials_saml, for instance, Same thing if the user making the request does not have permissions to access the resource - which might be part of the issue here... We show all users a limited view of all other users: names, email, avatar_url. But, only admins and the self-same user can see all the info about a specific user.
from looker-sdk-ruby.
Very good.
The user is question was an API user, but did not have the admin role. I
added admin
and it works now.
I think these constraints would be worthy for docs.
On Tue, Sep 8, 2015 at 9:37 PM, John Bandhauer [email protected]
wrote:
Yes. If the resource does not exist then you will get a NotFound. So, if
the user exists, but has no credentials_email then the resource you are
asking for does not exist. This makes sense if your user only has
credentials_saml, for instance, Same thing if the user making the request
does not have permissions to access the resource - which might be part of
the issue here... We show all users a limited view of all other users:
names, email, avatar_url. But, only admins and the self-same user can see
all the info about a specific user.—
Reply to this email directly or view it on GitHub
#33 (comment)
.
John G. Norman • Chief Software Architect at Iora Health
http://www.iorahealth.com
Note: We’ve moved -- new address:
101 Tremont Street, 6th floor, Boston, MA 02108
from looker-sdk-ruby.
Related Issues (20)
- post/put/patch methods must specify all headers if present in options passed to method
- Login endpoint appears to be incorrect in the authentication.md file
- Dependency problem with faraday 1.0.0 HOT 3
- travis doesn't seem to work right for pull requests here
- Conversion of "date like" string data to datetime is too aggressive
- Exception thrown when calling #alive HOT 2
- Consider an option to bypass/replace Sawyer
- How do I convert my Rest webservice spring mvc application from swagger 1.0 to swagger 2.0. HOT 1
- Missing tags for looker-sdk HOT 1
- Sawyer version HOT 1
- Consider getting rid of the client CONVENIENCE_HEADERS handling
- Option to includes roles for user(user_id) and all_users? HOT 1
- Release new version of the gem HOT 4
- Reduce output volume of sdk.inspect HOT 1
- Model good error handling practices in examples HOT 11
- Faraday dependency makes the SDK incompatible with gems HOT 3
- Undefined method look or run_look for Looker::Client HOT 1
- v0.0.6 doesn't work on Ruby 1.9.3
- NoMethodError for LookerSDK::Client HOT 9
- api key and secret should be sent via body, not query string HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from looker-sdk-ruby.