
Show HN: MockREST – Create REST APIs from Your JSON Content - jventura
http://mockrest.com/
======
jventura
Hi HN, I'm a teacher in a local university, and in one of my courses
(Service's-Oriented Mobile Development) I need the students to access a CRUD
API. Since some of them are not attending my other course (Backend
development), and the project is "open" (they can implement a CRUD mobile app
for any domain), I've built MockREST to allow them to mock APIs to their
wishes.

So, for a JSON like this:

    
    
        {
          "person": [
            {
              "id": 1,
              "name": "John Smith",
              "age": 22
            },
            {
              "id": 2,
              "name": "John Doe",
              "age": 23
            }
          ],
          "post": [
            {
              "id": 1,
              "title": "Hello World",
              "format": "text"
            },
            {
              "id": 2,
              "title": "Goodbye Cruel World",
              "format": "text"
            }
          ]
        }
    

It will allow you to access /api/person (/api/person/<id>/) and /api/post. You
can use all HTTP verbs such as GET/POST/PUT and DELETE to change the
information, and then access the modified json in the api backend.

I've polished it a little bit, and I'm trying to see if there is a larger
interest in this. If all goes well, I may add "pro" features such as longer
sessions (the API tokens only last 24h for now), password protection, etc.

Hope you like it, let me know if you find any errors, or have comments or
suggestions! Thanks!

~~~
GordonS
Looks useful!

Do you plan to open source this and/or try to commercialise it?

~~~
jventura
I'm mostly testing the waters, but if people find it useful in the long term,
I would like to commercialise it (probably as a SaaS), maybe by providing
"pro" features such as authentication, longer expiration dates for the API
tokens, things like that..

------
nklas
A small bug: if you hit the GO button without entering an apitoken, you get a
500 server error.

~~~
jventura
Fixed, thanks!

------
egfx
Doesn't work...

~~~
jventura
Ups, there's something wrong, I'll have to check..

Edit: it's working now! All new tokens were having the expiration date
incorrectly set.

Thanks for lettting me know!

