FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    How to define request headers in Kickstart?

    Scheduled Pinned Locked Moved Solved
    Q&A
    3
    4
    448
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jan.meznik
      last edited by

      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?

      joshuaJ 1 Reply Last reply Reply Quote 0
      • joshuaJ
        joshua @jan.meznik
        last edited by

        Hi @jan-meznik

        Please find our kickstart documentation below for reference:

        • https://fusionauth.io/docs/v1/tech/installation-guide/kickstart/

        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.

        • https://fusionauth.io/docs/v1/tech/installation-guide/kickstart/#tenants

        Let us know sheds some light or if you have any other questions.

        Thanks,
        Josh

        J 1 Reply Last reply Reply Quote 1
        • J
          jan.meznik @joshua
          last edited by

          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"
                  }
                }
              }
          
          danD 1 Reply Last reply Reply Quote 2
          • J jan.meznik has marked this topic as solved on
          • danD
            dan @jan.meznik
            last edited by

            @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

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            1 Reply Last reply Reply Quote 0
            • First post
              Last post