I am starting to write some scripts to automate tasks using a few different APIs, and I am getting a bit confused by how the documentation wants me to format the URLs.
Sometimes an API wants the user ID built directly into the URL structure itself, like /api/users/12345. Other times, the API wants the data tacked onto the very end after a question mark, like /api/users?id=12345. Why are there two completely different ways to send information to the server? Is there an actual rule for when to use a path variable versus a query parameter, or does it just depend on whoever built the API?