Change verbose name in apache superset via API - api

I am trying to change the verbose name or column name in apache superset via api. Is there any way to change it within url or has a api?
Searching for an API to change column name with API in superset. I had checked the docs but I couldn't find any solution.

Related

Forward requested subdomain/host from GCP Load Balancer to Cloud Run

I have an Express app used by several companies. Each company has its own subdomain to call the app api, such as company1.mydomain.com, company2.mydomain.com. In Express we read the value of the subdomain to determine the custom operation that we have to do for that company.
We are moving this app to GCP using Cloud Run with a GCP Load Balancer, setting all subdomains on the latter. We are now trying to read the subdomain but it contains the subdomain value of the Cloud Run URL (xxxxx.a.run.app). We are trying to figure out how to get the subdomain the user is requesting (the one configured in the Load Balancer) but that value doesn't seem to be forwarded to Cloud RUN.
Are there any settings that we are missing or something that help us to read the subdomain value from Cloud Run?
PD: We tried using Load Balancer's Custom Header but there is no option related to subdomain value
PD2: We also tried checking the other headers (including the X-Somethingxx GCP headers) and found nothing
I found a solution. It's based on a recent article that I wrote.
The solution is:
Create a HTTPS load balancer
Define an internet NEG that call run.app
In the backend, use this NEG and add custom header host, with the value of the fully qualified URL of your Cloud Run service xxxxx.a.run.app (like described in my article)
Add another custom header (this one that you want, for example x-forwarded-host) with the value {tls_sni_hostname}

Is there any way to get the original Host header value?

This article says:
With these added headers, Cloudflare passes on all HTTP headers as is
from the client to the origin.
However, there doesn't appear to be a standard way to get the Host from the original request.
Is there a way to do this, either via standard options or enterprise option?

Standard header for public address with an API Gateway

Let's say you are using an API gateway like Apigee or Amazon API Gateway and your public address for your API is http://my.public.dns.com/path/v1/articles. This gets routed through your gateway to an internal host http://some.internal.host.com/v1/articles. Now if your internal API returns relative links to itself then when they get served to the client they will be incorrect as they are based on its path not the actual public path. I know I can resolve this by transforming the response using the tools available in the respective gateway.
The question I have is; is there a standard way for a gateway to communicate the public path to the downstream component? I was thinking there might be a similar HTTP header to X-Forwarded-For.
There is no standard similar header.
Note that I think you mean if the back-end returns absolute links. If the links were relative, they'd already be correct. Relative links use no leading / thus are "relative" to the current directory -- whatever it may be - and so any external prefix is retained by the browser and the links transparently remain valid. Relative links can also backtrack a directory level with a ../ path prefix for each level.
Note also that API Gateway doesn't require any path prefix if you're using a custom domain name for your API This necessarily limits you to deploying a single "stage," but that's a reasonable tradeoff for a more flexible path... so the easiest solution might be to use a path in your API matching those internal paths.

Can I use a custom domain name for API in Parse.com?

I’ve read the Parse documentation regarding custom domain names, and I understand that I can host web content at a custom domain name.
Is it also possible to use the Parse REST API, or Cloud Functions, via a custom domain name?
Example:
https://api.myshoewarehouse.com/v1/shoes/
instead of…
https://api.parse.com/1/shoes/
Looks like it is not allowed by parse.com directly. The only way to do it is to configure proxy server somewhere on your machine, like here.
Another way is to set api.myshoewarehouse.com domain record to CNAME pointing at api.parse.com. But then you need to:
ignore certificate check, e.g. with curl -k option, which obviously isn't safe thing
forget about changing URL path (e.g. /1/shoes/ can't be changed to /v1/shoes/)

bulk posting to wordpress via scripts

In current project i need to make bulk posts to wordpress (from text files) and need to add dates of mine own choice .
What is best way to do it ?
Use XML-RPC. You can build a script that reads the text file, then makes an XML-RPC request to the WordPress server to create the post. You'll need to have a valid username and password to make this work (and will need to enable XML-RPC on the WordPress site as well).
The API is fairly well-defined. You make an XML-RPC call to metaWeblog.newPost and pass in the blog information, the post content, and your username and password. WordPress does the rest. You can also specify the date the post was/will be published as an optional field.
Further reading
XML-RPC Support « WordPress Codex
WordPress XML-RPC MetaWeblog API « My own documentation of the API
RFC: MetaWeblog API « Further documentation of the API