Unable to access private APIs
See original GitHub issueThere is no possibility to use earthengine
api with default behavior (static_discovery=True), because corresponded file is missed in discovery_cache.
In addition this changes broke earthengine-api, see issues/157
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Resolve connection issues with API Gateway private ...
1. Verify that an API Gateway execute-api VPC endpoint exists in the VPC. · 2. Verify that the client invoking the private API...
Read more >amazon web services - Unable to Access AWS Private Api
I have created an internal private api and want to access it from ec2 instance. For this, I have create an endpoint and...
Read more >Troubleshooting API Gateway Private API
This article give details on various reasons and steps to troubleshooting API Gateway Private APIs for access related issues.
Read more >How to invoke a private API - Amazon API Gateway
Private APIs are accessible only from within your VPCs, and the resource policies must allow access from the VPCs and VPC endpoints you...
Read more >AWS Private API GW & how VPCEs do not extend out of VPC
You need to have a private AWS API gateway running. If you have whitelisted the VPCIE ID in the API GW resource policy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
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.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 bothdiscoveryServiceUrl
andstatic_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
?Hi @Ark-kun,
Please see https://github.com/googleapis/google-api-python-client/issues/1225#issuecomment-791045487.
Right now, you would do something like this to call a private API:
@parthea and I were discussing automatically setting
static_discovery=False
ifdiscoveryServiceUrl
is passed. With that change folks would do something like this: