Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Commit 58f3947

Browse files
author
John Kaster
authored
Chore: Updated readme.me and authentication.md to no longer use API version 3.0 (#106)
Hi all, I just wanted to submit a quick PR for the readmes. I know we are trying to get end users to not use the Legacy api 3.0 anymore, so I updated the readme's to know point to 4.0. We have seen on chat quite a few people still use this and I know the codegen repo only refers to 3.1 and 4.0.
2 parents cee1e2f + 28b20c0 commit 58f3947

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

authentication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Note that API 3 tokens should be created for 'regular' Looker users and *not* vi
2222

2323

2424
### Ensure that the API is accessible
25-
Looker versions 3.4 (and beyond) expose the 3.0 API via a port different from the port used by the web app.
25+
Looker versions 3.4 (and beyond) expose the API via a port different from the port used by the web app.
2626
The default port is 19999. It may be necessary to have the Ops team managing the looker instance ensure that this
2727
port is made accessible network-wise to client software running on non-local hosts.
2828

@@ -78,14 +78,14 @@ Content-Length: 99
7878
{"access_token":"4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4","token_type":"Bearer","expires_in":3600}
7979
8080
# Use an access_token (the token can be used over and over for API calls until it expires)
81-
> curl -i -H "Authorization: token 4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4" https://localhost:19999/api/3.0/user
81+
> curl -i -H "Authorization: token 4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4" https://localhost:19999/api/4.0/user
8282
HTTP/1.1 200 OK
8383
Content-Type: application/json;charset=utf-8
8484
Vary: Accept-Encoding
8585
X-Content-Type-Options: nosniff
8686
Content-Length: 502
8787
88-
{"id":14,"first_name":"Plain","last_name":"User","email":"[email protected]","models_dir":null,"is_disabled":false,"look_access":[14],"avatar_url":"https://www.gravatar.com/avatar/b7f792a6180a36a4058f36875584bc45?s=156&d=mm","credentials_email":{"email":"[email protected]","url":"https://localhost:19999/api/3.0/users/14/credentials_email","user_url":"https://localhost:19999/api/3.0/users/14","password_reset_url":"https://localhost:19999/api/3.0"},"url":"https://localhost:19999/api/3.0/users/14"}
88+
{"id":14,"first_name":"Plain","last_name":"User","email":"[email protected]","models_dir":null,"is_disabled":false,"look_access":[14],"avatar_url":"https://www.gravatar.com/avatar/b7f792a6180a36a4058f36875584bc45?s=156&d=mm","credentials_email":{"email":"[email protected]","url":"https://localhost:19999/api/4.0/users/14/credentials_email","user_url":"https://localhost:19999/api/4.0/users/14","password_reset_url":"https://localhost:19999/api/4.0"},"url":"https://localhost:19999/api/4.0/users/14"}
8989
9090
# Logout to revoke an access_token
9191
> curl -i -X DELETE -H "Authorization: token 4QDkCyCtZzYgj4C2p2cj3csJH7zqS5RzKs2kTnG4" https://localhost:19999/logout

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ require 'looker-sdk'
4141
sdk = LookerSDK::Client.new(
4242
:client_id => "4CN7jzm7yrkcy2MC4CCG",
4343
:client_secret => "Js3rZZ7vHfbc2hBynSj7zqKh",
44-
:api_endpoint => "https://mygreatcompany.looker.com:19999/api/3.0"
44+
:api_endpoint => "https://mygreatcompany.looker.com:19999/api/4.0"
4545
)
4646

4747
# If you don't want to provide explicit credentials: (trust me you don't)
@@ -55,7 +55,7 @@ sdk = LookerSDK::Client.new(
5555
sdk = LookerSDK::Client.new(
5656
:netrc => true,
5757
:netrc_file => "~/.net_rc",
58-
:api_endpoint => "https://mygreatcompany.looker.com:19999/api/3.0",
58+
:api_endpoint => "https://mygreatcompany.looker.com:19999/api/4.0",
5959

6060
# Set longer timeout to allow for long running queries. The default is 60 seconds and can be problematic.
6161
:connection_options => {:request => {:timeout => 60 * 60, :open_timeout => 30}},

0 commit comments

Comments
 (0)