You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-24Lines changed: 20 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -22,41 +22,40 @@ This repository contains:
22
22
23
23
We hope to help people who want to use Looker as a platform get up and running quickly, largely by providing pre-built client SDKs in the most popular languages, and implementing consistency across all languages and platforms.
24
24
25
-
An [OpenAPI specification](https://github.com/OAI/OpenAPI-Specification) describes the Looker API. This specification is used to produce both Looker's interactive API Explorer, and the Looker API language bindings for the Looker REST API.
25
+
The Looker SDK has several parts:
26
26
27
-
A Looker SDK has several parts:
27
+
- The **Looker API**, described by an [OpenAPI specification](https://github.com/OAI/OpenAPI-Specification) (e.g., the Swagger 2.x representation found at
28
+
`https://<your-looker-domain>:19999/api/4.0/swagger.json`). The 4.0 API is our current & stable API. As of June 2022, [3.x is deprecated](https://developers.looker.com/api/advanced-usage/version-3x-deprecation).
28
29
29
-
-**Looker API** OpenAPI specification (e.g., found at
30
-
`https://<your-looker-endpoint>:19999/api/3.1/swagger.json`, although this is still the Swagger 2.x representation)
30
+
- The **Looker API Explorer**, an interactive reference, accessible either stand-alone at [developers.looker.com/api/explorer/](https://developers.looker.com/api/explorer/), or installable into your Looker instance as an extension from the Looker Marketplace.
31
31
32
-
-The **Looker API Docs viewer**, provided in the Looker web app directly from our version-specific OpenAPI specification, available on each Looker server instance.
32
+
-**Language SDKs**, "smarter" client language classes and methods to improve the experience of calling the Looker API in various popular coding languages. Some SDKs are [Looker-supported](https://docs.looker.com/reference/api-and-integration/api-sdk-support-policy#support_levels) whereas others are community-supported.
33
33
34
-
-**Language SDKs**, "smarter" client language classes and methods to improve the experience of calling the Looker API in various popular coding languages.
34
+
## SDK multi-API-version support
35
35
36
-
## Multi-API support with Looker 7.2 and later
36
+
The 4.0 version of the API is the current and stable version of the API, in addition to the 3.x API which is now [deprecated](https://developers.looker.com/api/advanced-usage/version-3x-deprecation).
37
37
38
-
Looker 7.2 introduced an **Experimental** version of API 4.0. Since that release, some SDKs now support multiple API versions in the same SDK package.
38
+
Some SDKs support and expose both API versions in the same SDK package, including all [Looker-supported SDKs](https://docs.looker.com/reference/api-and-integration/api-sdk-support-policy#language_sdks).
39
39
40
-
For all SDKs but Swift, API-specific SDKs are now created and put in the same SDK package, and share the same run-time code.
40
+
For SDKs that support multiple API versions, there will be `methods.*`and `models.*` collections generated for each API version. Each API version is exposed under a distinct class name from which to instantiate an initial SDK object.
41
41
42
-
At the time of this writing, API 3.1 and API 4.0 are included in most SDK packages. For an SDK that supports multiple API versions, there will be a `methods.*` and `models.*` generated for each API version.
42
+
API-version-specific files generally use shared Run-Time Library (RTL) code in the SDK package to minimize code duplication.
43
43
44
-
The class names representing these API versions are distinct, with version-named constructors for creating initialized SDK objects.
44
+
Regardless of which API version you use, API credentials are unchanged, and may continue to be referred to as "API3" credentials.
45
45
46
-
These API-specific files still use all the same Run-Time Library (RTL) code in the SDK package to minimize code duplication.
47
46
48
47
### Looker SDKs
49
48
50
49
Please review the following table for a breakdown of the options to initialize the desired SDK object.
|[Python](python)|`looker_sdk.init31()`|`looker_sdk.init40()`| Both API 3.1 and 4.0 are supported, and can be initialized with the functions shown|
55
-
|[TypeScript](packages/sdk)|`Looker31SDK()`, `LookerNodeSDK.init31()`, or `LookerBrowserSDK.init31()`|`Looker40SDK()`, `LookerNodeSDK.init40()` or `LookerBrowserSDK.init40()`| Both API 3.1 and 4.0 are supported and can be initialized with the functions shown.**Important** - See information on the [typescript SDK dependencies](#very-important-note-regarding-the-looker-typescript-sdk) at the bottom of this file. |
56
-
|[Kotlin](kotlin)|Do not use|`LookerSDK()`| API 4.0 was specifically created to correct the endpoint payloads for strongly-typed languages like Kotlin and Swift. Because Kotlin really requires API 4.0, API 4.0 is the default namespace for it|
57
-
|[Swift](swift/looker)| Not applicable|`Looker40SDK()`| Swift only has SDK definitions for API 4.0|
58
-
|[Look#](csharp)|`Looker31SDK()`|`Looker40SDK()`| Community-supported C# SDK for Looker|
59
-
|[GoLook](go)| Not applicable|`v4.NewLookerSDK()`| Community-supported GO SDK for Looker|
51
+
| SDK | API 3.1 [(deprecated)](https://developers.looker.com/api/advanced-usage/version-3x-deprecation)| API 4.0 | Notes |
|[TypeScript](packages/sdk)|`Looker31SDK()`, `LookerNodeSDK.init31()`, or `LookerBrowserSDK.init31()`|`Looker40SDK()`, `LookerNodeSDK.init40()` or `LookerBrowserSDK.init40()`|**Important** - See information on the [typescript SDK dependencies](#very-important-note-regarding-the-looker-typescript-sdk) at the bottom of this file. |
55
+
|[Kotlin](kotlin)|Not supported |`LookerSDK()`|Community-supported SDK. Uses API 4.0 exclusively. The initializer uses an unversioned name. |
56
+
|[Swift](swift/looker)| Not supported|`Looker40SDK()`| Community-supported SDK. Uses API 4.0 exclusively.|
57
+
|[Look#](csharp)|Not supported|`Looker40SDK()`| Community-supported SDK. Uses API 4.0 exclusively.|
58
+
|[GoLook](go)| Not supported|`v4.NewLookerSDK()`| Community-supported SDK. Uses API 4.0 exclusively.|
60
59
61
60
By supporting both API versions in the same SDK package, we hope the migration path to the latest API is simplified. Both SDK versions can be used at the same time, in the same source file, which should allow for iterative work to move to the new API version.
62
61
@@ -174,9 +173,7 @@ python
174
173
175
174
To generate a language currently not supported by Looker's SDK code generator with the OpenAPI generator:
176
175
177
-
- configure the desired language in [`codeGenerators.ts`](packages/sdk-codegen/src/codeGenerators.ts). Currently, only Go and C# have legacy language generation configured, and we now have a prototype Look# SDK that can be used instead of the legacy C# generator.
178
-
179
-
- the legacy generator defaults to using the API 4.0 specification, which is more accurate for strongly typed languages. To use API 3.1, put `api_version=3.1` in the `Looker` section of your `looker.ini`
176
+
- configure the desired language in [`codeGenerators.ts`](packages/sdk-codegen/src/codeGenerators.ts).
180
177
181
178
- use `yarn legacy` to call the OpenAPI generator. This will use the OpenAPI generator to output files to the `./api/*` path
182
179
@@ -281,7 +278,6 @@ The following table describes the environment variables. By default, the SDK "na
| LOOKERSDK_BASE_URL | A URL like `https://my.looker.com:19999`. No default value. |
284
-
| LOOKERSDK_API_VERSION | Version of the Looker API to use. Use `3.1` for now, which is the default and used to produce this SDK. |
285
281
| LOOKERSDK_VERIFY_SSL |`true`, `t`, `yes`, `y`, or `1` (case insensitive) to enable SSL verification. Any other value is treated as `false`. Defaults to `true` if not set. |
286
282
| LOOKERSDK_TIMEOUT | Request timeout in seconds. Defaults to `120` for most platforms. |
287
283
| LOOKERSDK_CLIENT_ID | API3 credentials `client_id`. This and `client_secret` must be provided in some fashion to the Node SDK, or no calls to the API will be authorized. No default value. |
Where `lookerVersion` is the version of Looker (like 7.10) and `apiVersion` is (currently) either `3.1` or `4.0`.
233
+
Where `lookerVersion` is the version of Looker (like 7.10) and `apiVersion` is (currently) either `4.0` or `3.1` ([deprecated](https://developers.looker.com/api/advanced-usage/version-3x-deprecation)).
234
234
235
-
This results in the agentTag appearing like `TS-SDK 7.10.3.1`.
235
+
This results in the agentTag appearing like `TS-SDK 22.6.4.0`.
236
236
237
237
Additional attributes can be added to the agent tag by separating them with semicolons. (`;`)
Copy file name to clipboardExpand all lines: docs/json.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@ We introduced API 4.0 to guarantee the JSON payload response types match the API
14
14
15
15
## Lookering forward
16
16
17
-
Current users of Looker SDKs may have noticed that some `id` properties are typed as `integer` and some are typed as `string`. For the stable (aka GA, generally available) release of API 4.0, all `id` references will be typed as `string`.
18
-
Using strings for all ID references will allow Looker to scale out Looker services in the future, once ID generation does not require an auto-increment numeric ID value from a monolithic instance.
17
+
Current users of Looker SDKs may have noticed that some `id` properties are typed as `integer` and some are typed as `string`. With the stable (aka GA, generally available) release of API 4.0, all `id` references have been typed as `string`.
18
+
Using strings for all ID references allows Looker to scale out Looker services in the future, once ID generation does not require an auto-increment numeric ID value from a monolithic instance.
19
19
20
20
We have worked to minimize the impact of this type change for all Looker-provided language SDKs. This document describes some JSON parsing requirements and how our SDKs support them.
0 commit comments