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
I think from the perspective of this library things are working as intended. static_discovery=True can only be used with APIs listed in the public directory of Google APIs: https://www.googleapis.com/discovery/v1/apis.
If an API is outside that list (API is private and/or not listed in the directory), there are two options:
1. Use discovery.build_from_document() with a copy of a discovery doc JSON for the API.
@parthea and I were discussing automatically setting static_discovery=False if discoveryServiceUrl is passed. With that change folks would do something like this:
@busunkim96 Is there an ETA on when we can call private API without specifying static_discovery=False (i.e. entirely backward compatible for client library 2.0 in terms of building the discovery client) ?
Activity
busunkim96 commentedon Mar 5, 2021
Hi,
I think from the perspective of this library things are working as intended.
static_discovery=Truecan only be used with APIs listed in the public directory of Google APIs: https://www.googleapis.com/discovery/v1/apis.If an API is outside that list (API is private and/or not listed in the directory), there are two options:
1. Use
discovery.build_from_document()with a copy of a discovery doc JSON for the API.It looks like https://github.com/google/earthengine-api/blob/114dcad4bdd2edd7cf604c39e33019baab15436d/python/ee/_cloud_api_utils.py#L156-L179 does this, but only for tests.
Pros:
Cons:
2. Use
discovery.build()and pass bothdiscoveryServiceUrlandstatic_discovery=False.This results in behavior equivalent to 1.x of this library.
Pros:
Cons:
@parthea Would you mind adding some information to the docs clarifying which APIs are available with
static_discovery=True?parthea commentedon Mar 5, 2021
Will do. In addition, there is an internal inquiry open for making the EarthEngine API discovery document public. Googlers see b/179047744
busunkim96 commentedon Mar 5, 2021
Googlers,
If you're an API owner and your users are broken by v2 please make sure:
As an added bonus you will get client libraries in the other languages with Discovery-based generators. :)
Ark-kun commentedon Mar 8, 2021
What can we do for private APIs?
busunkim96 commentedon Mar 8, 2021
Hi @Ark-kun,
Please see #1225 (comment).
Right now, you would do something like this to call a private API:
@parthea and I were discussing automatically setting
static_discovery=FalseifdiscoveryServiceUrlis passed. With that change folks would do something like this:wyk9787 commentedon Mar 11, 2021
@busunkim96 Is there an ETA on when we can call private API without specifying
static_discovery=False(i.e. entirely backward compatible for client library 2.0 in terms of building the discovery client) ?[-]Missed earthengine.v1alpha.json[/-][+]Unable to access private APIs[/+]busunkim96 commentedon Mar 12, 2021
@wyk9787 I think by the end of this month. It should be a relatively small change in
discovery.build().docs: Distinguish between public/private docs in 2.0 guide (#1226)
fix: Change default of `static_discovery` when `discoveryServiceUrl` …