API Node - Getting Request headers

Bader
Bader Registered Posts: 46 ✭✭✭✭✭

Hi All,

I have built an Api and deployed into separate api-node. everything works fine but I would like to get the requester headers (Query Headers or body) to verify some values before proceed.

Could you please support in this

Thanks

Best Answer

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭
    Answer ✓

    Hi,

    Thanks for explaining your objective.

    Unfortunately, this is not possible. I have passed your request to our product team.

    Cheers,

    Alex

Answers

  • Alex_Combessie
    Alex_Combessie Alpha Tester, Dataiker Alumni Posts: 539 ✭✭✭✭✭✭✭✭✭
    Hi,The documentation of the API node user API is https://doc.dataiku.com/dss/api/7.0/apinode-user/.What specifically would you like to verify? Is it about how to send a request to the API node? Or to add custom logic to a prediction endpoint?Cheers,Alex
  • Bader
    Bader Registered Posts: 46 ✭✭✭✭✭

    Hi Alex,

    No, I would like to get information about who is calling my api node, the brwoser information etc .. (Please see the attachment)

    def api_py_function():
    #adding logic to get the request headers
    #Something like this get_auth_info_from_browser_headers(request_headers)

    return "Works fine"
  • Bader
    Bader Registered Posts: 46 ✭✭✭✭✭

    Thank Alex, please let us know if you decide to add this feature.

    Kind regards

    Bader

  • Philip
    Philip Registered Posts: 1

    Hi Team,

    Is it still not possible to get request headers inside "my_api_function" ?

    Would be a very appreciated feature.

    Many thanks,

    Philippe

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023, Circle Member Posts: 2,722 Neuron

    Is it still not possible to get request headers inside "my_api_function" ? => Yes.

Setup Info
    Tags
      Help me…