I need to write a very simple web site. There will be no frontend side, the site should only give several API endpoints — the only request is that it should work with JSON serialized data. So I don't have to worry about html, css, js.

There should be API endpoints that return info about some entries. The user should be able to request some specific entry with id, or to get list of all entires. The number of entries can be huge, so there should be some paging.

Some users should be able to edit enties.

So this is a super common task. I can easily implement it by writing all the things by myself, but this time I don't want to reinvetnt the wheel, I want to use as much already created things as possible.

I will use JSON (this is the reqirement), but what other things should I use? I known something about REST, but maybe there is something simplier? What API versioning scheme should be implemented? How should I show errors? How should I check authorization?

All my questions are not about internatl implementation, but about the way the API will look like for the user. There are a lot of ways of solving this task, but maybe there are some well established simple things that should be used?


In reply to Standards for JSON API by bessarabov

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.