How to define request headers in Kickstart?
-
I am writing a kickstart file, and I need to define the
X-FusionAuth-TenantId
header for the/api/application
endpoint.
However, I can find no documentation on how to do this in Kickstart, nor how I can get around this.Is this supported by Kickstart?
-
Hi @jan-meznik
Please find our kickstart documentation below for reference:
With kickstart, you can programmatically create almost anything you can create with our APIs. We have some good example kickstart files that demonstrate how to build with this tool.
https://github.com/FusionAuth/fusionauth-example-kickstart/blob/master/example-apps/joomla-sso.json
In the above example, since we are using only one tenant, we can define this in the variables section.
Additional information regarding using more than one tenant can be found in our documentation below.
Let us know sheds some light or if you have any other questions.
Thanks,
Josh -
Thanks for the reply @joshua.
Although I still don't know if it is possible to set POST Header fields, the Kickstart file allows to do this by defining the
tenantId
in the root of the request. I'll paste it here directly, to make it easier for other visitors{ "method": "POST", "url": "/api/application", "tenantId": "#{secondTenantId}", "body": { "application": { "name": "My Cool Application" } } }
-
-
@jan-meznik If there are other headers you need to set that are not supported, please file a github issue with the details: https://github.com/fusionauth/fusionauth-issues/issues