Skip to main content
Committed ⭐️⭐️
Aug 25, 2023 7:32 AM UTC
Solved

Hosting a web-hook endpoint in a cognite function

Hi, is it possible to host a web-hook endpoint in a Cognite function?
And is it a good idea?

    Practitioner ⭐️⭐️⭐️
    Aug 30, 2023 9:03 AM UTC

    Hello Czach! 

    When you say “host a web-hook endpoint”, do you mean spinning up an API endpoint in the Cognite Function, for instance using Flask or FastAPI? Can you help me understand your specific use case? 

    You won’t be able to keep this server alive, as each Cognite Function invocation has a specific execution time limit. 

    Regards, 
    Ivar Stangeby

    2 replies

    Practitioner ⭐️⭐️⭐️
    Aug 30, 2023 9:03 AM UTC

    Hello Czach! 

    When you say “host a web-hook endpoint”, do you mean spinning up an API endpoint in the Cognite Function, for instance using Flask or FastAPI? Can you help me understand your specific use case? 

    You won’t be able to keep this server alive, as each Cognite Function invocation has a specific execution time limit. 

    Regards, 
    Ivar Stangeby

    Expert ⭐️⭐️⭐️⭐️
    Sep 11, 2023 5:48 AM UTC

    Hi @czach, would you be able to help out with some details?