For example, GET /tickets/12/messages/5 has these advantages over api_get_message_from_ticket?ticket_id=12&message_id=5<p>Avoids writing everything twice: you don't need to name the data fields both in the base URL and in the query string<p>If there are several parameters, writing everything twice may make the URL longer than one physical line in a text editor<p>The ? and & characters need to be quoted in most shells<p>The _ characters are sometimes hard to read if the entire URL is underlined<p>Names with api_json don't make it clear whether the request body must be sent as JSON, the response will be JSON, or both
I need input on this new API design, i call if 'Functional APIs(fAPIs)'<p>Given that hacker news is mostly developer-oriented i would like your opinion as to why we don't use "HTTP APIs" as mostly single functions instead of the REST and GraphQL horrors i see on a weekly basis.<p>why not:<p><a href="https://example.org/api_json_create_new_user" rel="nofollow">https://example.org/api_json_create_new_user</a><p>body -> {
'name': 'new user'
'email': 'email@gmail.com'
'password_hash': '50e721e49c013f00c62cf59f2163542a9d8df02464efeb615d31051b0fddc326'
...
}<p>200 OK<p>instead of<p><a href="https://example.org/v1/users/create/new" rel="nofollow">https://example.org/v1/users/create/new</a>
<body><p>200 OK<p>i attached a PDF link with more details.<p>criticism is welcomed.