• I think I'm having a hard time understanding how the different concepts introduced in the reading (APIs, JSON, REST, Ajax, Flask, and Python) are connected to each other and work together.

    Who could blame you? I'll try to draw some pictures.

  • Does Ajax have its own API? How does Ajax relate to REST API?

    They're different ideas, though related.

  • How is jsonify() different from json.dumps()?

    Very similar. Jsonify also wraps up the result in a proper response object.

  • Is it necessary for the developer to specify all status codes or can the browser recognize them itself?

    The front-end developer? The browser already knows all the codes, but it doesn't necessarily handle them in a nice, graceful way.

    And, of course, your JS code is on its own. So, your Ajax code may need to detect error status code and handle them appropriately (retry, notify the user, etc)

  • Can you go over more about the difference between post and put? Is post used for an initial creation? And put can be used over and over again?

    Yes, that's right. We can use POST is all kinds of ways, but in a REST API, it should be used for creating an entity, while PUT is used for updating an enemy.

    But these are more guidelines than actual rules, per se.