Hi @vmiletic ,
I agree with Peter, 2 should be completely doable.
I have seen something recently in the API documentation that ?may? allow you to achieve one. There are now web-hook subscriptions available Webhooks Subscriptions - Canvas LMS REST API Documentation where you can subscribe to know that a change has taken place.
You could (conceivably) use the web hooks to have your external tool be notified of a new quiz submitted (using the QUIZ_SUBMITTED Event Type) which you can then have your tool do the rest of the interactions with the API to push the mark back.
I have never authored something like this before, but, conceivably quite doable. I would note that Canvas in this case won't call the external tool and expect a response, it will more call the external tool to say 'hey something has happened' and then rely on your tool to do the heavy lifting once it is told of an event (such as doing the grading, and then using the parameters in the initial notification to mark using the API).
I would be very curious to see how you go if you can get this up and running!
Hope that helps,
Stuart