IHTSDO / SNOMED-in-5-minutes

Easy-to-use tutorials for accessing SNOMED APIs within 5 min using various programming languages
Other
123 stars 56 forks source link

Python example code returns HTTP Errror 423 #37

Closed nilskre closed 8 months ago

nilskre commented 8 months ago

Hello, when copying the Python example code, I get a HTTP Error 423. Thus the resource is locked somehow. How can I overcome this? Thanks in advance!

nilskre commented 8 months ago

Just realized, that there is already a PR fixing this.

kaicode commented 8 months ago

This is related to the firewall on the public Snowstorm server. I have merged the PR.

If possible please use an agent header that our DevOps team can use to identify you and your implementation. For example: `'User-Agent','Python3, Joe's SNOMED Utility, joe@example.com' That way if there is any issue with throttling they can reach out to you rather than just blocking the traffic.

nilskre commented 8 months ago

This is related to the firewall on the public Snowstorm server. I have merged the PR.

If possible please use an agent header that our DevOps team can use to identify you and your implementation. For example: `'User-Agent','Python3, Joe's SNOMED Utility, joe@example.com' That way if there is any issue with throttling they can reach out to you rather than just blocking the traffic.

Thanks a lot! Now everything is working as expected again.

nilskre commented 7 months ago

Unfortunately, the error is back and I get again HTTP Error 423 (I have changed nothing). In the requests I have included a descriptive message for debugging this case. You can filter your logs by Python3, use copy of snomed in 5 min python code -> results in HTTP Error 423. I have also included my email if there are any further questions.

Thanks in advance!

pgwilliams commented 7 months ago

Sorry about that @nilskre, we're in a bit of a weapons race with bad actors who machine scrape our public browser. Why they bother I've no idea. It would be so much quicker and easier to get hold of SNOMED CT as a complete zip file.

I'll raise a ticket internally with our DevOps team to discuss your particular situation.

pgwilliams commented 7 months ago

That said, if you're looking to implement some sort of ongoing application that uses our public server as a back end, that is not what it's provisioned for. It's really just for human speed browsing and perhaps trying out the odd script, proof of concept style. For anything more demanding or "production level", you could look at hosting your own terminology server. We've made Snowstorm available in a Docker image that's really quick to get going. You'd get better performance there too, and not be affected by our highly variable traffic load.

nilskre commented 7 months ago

Thanks for your fast and helpful response! My application is at the moment just using your public server for a fast proof of concept (so nothing production level planned here). Nevertheless, I will think about how I can move to a solution with a local Snomed CT file or a local terminology server.

kaicode commented 7 months ago

If you have an MLDS login and would like a SNOMED CT FHIR Terminology server up in Docker in just 5 minutes give Snowstorm Lite a try!

nilskre commented 7 months ago

If you have an MLDS login and would like a SNOMED CT FHIR Terminology server up in Docker in just 5 minutes give Snowstorm Lite a try!

Thanks! I will check it out.