Is there an API service to obtain global city data? - api

Is there an API service to obtain global city data?

Related

Rate limit a public API endpoint in Kong

We currently use Kong as an API gateway with all endpoints requiring authentication.
We need to build a public facing web app that retrieves information from a service and we want to use the Kong API gateway and other technologies that are familiar to us.
Some of the options we are considering are:
Use api key authentication having the api key exposed via the internet on the public website (this will at least allow us to rate limit as we are likely to have a multiple consumers of this service)
Use anonymous authentication on the endpoint
Build another web app and use it as a proxy to kong with basic authentication between the two (i.e user -> web app -> kong -> internal api, rather than user -> kong -> internal app)
I wanted some feedback or suggestions on what way we should go.

JWT token changes when passing through the GCP API gateway

I am sending a JWT token in api header. I designed this to pass through GCP api gateway and hit cloudrun service. But when passing through api gateway, the whole JWT token changes every time. There is no effect when I call the cloudrun directly without an api gateway. Any ideas about this?
You have several use cases
If you consider that your Cloud Run requires an authentication, but the access to API Gateway doesn't, the API Gateway is able to generate an identity token, based on the service account in its configuration, and add it to the request forwarded to Cloud Run
If you consider that your Cloud Run requires an authentication and you want to use API Gateway as authentication proxy (for instance, all the users that request the API gateway must be authorized by API gateway (by API key, by FirebaseAuth, by JWT token,...), but the users aren't directly granted on the Cloud RUn service, API Gateway is able to generate an identity token, based on the service account in its configuration, and add it to the request forwarded to Cloud Run
If you consider that your Cloud Run requires an authentication and API Gateway is simply a passthrough to centralise the APIs definition, you can set in your x-google-backend definition, the parameter disable_auth to true. That time, API Gateway won't generate an identity token and won't add it in the forwarded request. The identity token received in entry is forwarded to Cloud RUn (it must be a valid token for Cloud Run)
Note: when API Gateway generate an identity token, the initial authorization token is forwarded in a new header: X-Apigateway-Api-Userinfo

API Access in Medallia

How can I get client id and client secret for accessing API in Medallia?
I am only having access to the app that is created in medalllia. What to do get api access in medallia.

Securing applications rest with ambassador

I have an application with rest api secured by ambassador, my filter required all requests to provide username and password in header. Now I want to add additional service that will use the same endpoint as the users. Since my other service does not act as a user, can I configure it with some sort of api key to use ambassador or od I need to create a service account and use username/password headers in requests?

How to get Office 365 service location via API

I am trying to find the region of an Office 365 service. Microsoft's Office 365 documentation states that the data storage regions are disclosed to the customer.
Is it possible to find a service's region via an API request?
I've been looking through documentation on the Service Communications API, the reporting web service, and the unified API, but have found no mention on how to get the service's region.
Thanks!
There currently isn't an API to get the service region.
You can get this information using powershell:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Get-Mailbox -Identity magrom#contoso.onmicrosoft.com | fl
You can look at the OrganizationId field to see which region your tenant is in.