{"id":13879121,"url":"https://github.com/davidesantangelo/datoji","last_synced_at":"2025-07-22T23:33:57.779Z","repository":{"id":40080013,"uuid":"271289102","full_name":"davidesantangelo/datoji","owner":"davidesantangelo","description":"A tiny JSON storage service. Create, Read, Update, Delete and Search JSON data.","archived":false,"fork":false,"pushed_at":"2023-01-19T19:25:31.000Z","size":1571,"stargazers_count":225,"open_issues_count":30,"forks_count":5,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-29T20:39:42.837Z","etag":null,"topics":["api","fastjson","json","json-api","postgresql","rack-attack","rails","redis","rest-api","ruby","storage"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidesantangelo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"davidesantangelo","custom":"https://www.buymeacoffee.com/582rhJH"}},"created_at":"2020-06-10T13:47:23.000Z","updated_at":"2024-04-23T09:27:40.000Z","dependencies_parsed_at":"2023-02-11T18:30:24.211Z","dependency_job_id":null,"html_url":"https://github.com/davidesantangelo/datoji","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/davidesantangelo/datoji","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fdatoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fdatoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fdatoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fdatoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidesantangelo","download_url":"https://codeload.github.com/davidesantangelo/datoji/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fdatoji/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266590593,"owners_count":23952966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","fastjson","json","json-api","postgresql","rack-attack","rails","redis","rest-api","ruby","storage"],"created_at":"2024-08-06T08:02:10.498Z","updated_at":"2025-07-22T23:33:57.758Z","avatar_url":"https://github.com/davidesantangelo.png","language":"Ruby","funding_links":["https://github.com/sponsors/davidesantangelo","https://www.buymeacoffee.com/582rhJH","https://www.buymeacoffee.com/582rhJH)!"],"categories":["Ruby"],"sub_categories":[],"readme":"# DatoJi\n\nA FREE RESTful HTTP based JSON API. It lets you create, read, update, delete and search JSON data over HTTP APIs. Ideal for small hobbies projects, MVP or just for fun, where you don't need to create your personal data storage.\n\n\n## Schema\n\nAll API access is over HTTPS, and accessed from https://localhost:3000. All data is sent and received as JSON.\n\nBlank fields are included as null instead of being omitted.\n\nAll timestamps return in ISO 8601 format:\n\n``` ruby\nYYYY-MM-DDTHH:MM:SSZ\n```\n\nAll responses follow the [JSON:API](https://jsonapi.org/format/) guidelines:\n\nJSON:API is a specification for how a client should request that resources be fetched or modified, and how a server should respond to those requests.\n\nJSON:API is designed to minimize both the number of requests and the amount of data transmitted between clients and servers. This efficiency is achieved without compromising readability, flexibility, or discoverability.\n\n```\n{\n  \"data\": {\n    \"type\": \"entry\",\n    \"id\": \"1\",\n    \"attributes\": {\n      // ... this entry's attributes\n    },\n    \"relationships\": {\n      // ... this entry's relationships\n    }\n  }\n}\n```\n\n## Pagination\n\nRequests that return multiple items will be paginated to 20 items by default. You can specify further pages with the ```?page``` parameter. Pagination information is available inside **headers**. Example:\n\n```\nCurrent-Page: 1\nPer-Page: 20\nLink:\u003chttps://localhost:3000/packs/{PACK_ID}/entries?page=1\u003e; rel=\"first\", \u003chttps://localhost:3000/packs/{PACK_ID}/entries?page=24\u003e; rel=\"last\"\nTotal: 464\n```\n\n## Documentation\n\n**Authentication**\n\nAPI uses OAuth 2.0 token for user authorization and API authentication. Applications must be authorized and authenticated before they can fetch data.\n\n    \n```sh\n\ncurl -X POST 'https://localhost:3000/tokens' -H 'content-type: application/json'\n\n```\n\n\n```json\n\n{\n  \"data\": {\n    \"id\": \"b14e1665-5ab3-4b71-a669-b6280d64147e\",\n    \"type\": \"token\",\n    \"attributes\": {\n      \"key\": \"uBrcpRP3QVgEJeuffuENPeSc2ObAaGoO\",\n      \"created_at\": \"2020-06-12T12:51:18.971Z\"\n    }\n  }\n}\n\n```\n\n**Note**\n\nYou must use `Authorization: Token 80-Pk8MtTMLXT_ThBaCDuDtF1eTyVmQj` header for ALL requests.\n\n## CRUD PACKS\n\n**Create**\n\nA Pack is a container of all the entries. Before you can create the entries you must create the container to get the **ID** with which you can make the calls.\n\n```sh\n\ncurl -X POST 'https://localhost:3000/packs' -H 'content-type: application/json' -H 'Authorization: Token {KEY}'\n    \n```\n### Body\n\n```json\n{\n  \"entries\": [\n    { \n      \"entry\": \n        {\n          \"name\": \"Davide Santangelo\", \n          \"role\": \"Senior Team Lead\" \n        } \n    }\n  ]\n}\n```\n\n### result\n\n```json\n\n{\n  \"data\": {\n    \"id\": \"918f6a68-89f7-4f0c-aa6d-73b447d92819\",\n    \"type\": \"pack\",\n    \"attributes\": {\n      \"entries_count\": 0,\n      \"created_at\": \"2020-06-11T14:22:12.354Z\",\n      \"updated_at\": \"2020-06-11T14:22:12.354Z\"\n    }\n  }\n}\n\n```\n\n**Read**\n\n```sh\n\ncurl -X GET 'https://localhost:3000/packs/{PACK_ID}' -H 'content-type: application/json' -H 'Authorization: Token {KEY}'\n    \n```\n\n**Clear**\n\nWith the clear method you can clean the pack from all entries.\n\n```sh\n\ncurl -X POST 'https://localhost:3000/packs/{PACK_ID}/clear' -H 'content-type: application/json' -H 'Authorization: Token {KEY}'\n    \n```\n\n**Delete**\n\nWith the clear method you can clean the pack from all entries.\n\n```sh\n\ncurl -X DELETE 'https://localhost:3000/packs/{PACK_ID}' -H 'content-type: application/json' -H 'Authorization: Token {KEY}'\n    \n```\n\n## CRUD ENTRY\n\n**Create**\n\n```sh\n\ncurl -X POST 'https://localhost:3000/{PACK_ID}/entries' \\\n    -H 'content-type: application/json' \\\n    -H 'Authorization: Token {KEY}' \\\n    -d '{ \"entry\": { \"repo\": \"davidesantangelo/datoji\", \"private\": false, \"stargazers_count\": 0 } }'\n    \n```\n\n```json\n\n{\n  \"data\": {\n    \"id\": \"04b7992a-40de-496b-a994-a661a9893df7\",\n    \"type\": \"entry\",\n    \"attributes\": {\n      \"data\": {\n        \"repo\": \"davidesantangelo/datoji\",\n        \"private\": \"false\",\n        \"stargazers_count\": 0\n      },\n      \"created_at\": \"2020-06-11T14:37:34.857Z\",\n      \"updated_at\": \"2020-06-11T14:37:34.857Z\"\n    },\n    \"relationships\": {\n      \"pack\": {\n        \"data\": {\n          \"id\": \"918f6a68-89f7-4f0c-aa6d-73b447d92819\",\n          \"type\": \"pack\"\n        }\n      }\n    }\n  }\n}\n\n```\n\nYou can also create multiple records at once by passing an array.\n\n```sh\n\ncurl -X POST 'https://localhost:3000/{PACK_ID}/entries/bulk' \\\n    -H 'content-type: application/json' \\\n    -H 'Authorization: Token {KEY}' \\\n    -d '{ \"entries\": [{ \"repo\": \"davidesantangelo/datoji\" },{ \"repo\": \"davidesantangelo/tuns\" },{ \"repo\": \"davidesantangelo/emailhunter\" }]}'\n    \n```\n\nThe result in case of success is an array of IDs.\n\n```\n[\n  \"6403b952-ce7d-4759-96d9-c8a913e166ec\",\n  \"5993d6b2-16cd-4d78-a7c8-2aba0f27af0d\",\n  \"b5861049-7c4d-485d-b795-669b9578b78d\"\n]\n```\n\n**Read**\n\nUse HTTP GET to read all the records or a single record.\n\n\nYou can also specify a param **\u0026order=[asc/desc]** by *created_at* field. Can be one of asc or desc. Default: desc.\n\n\n```sh\n\ncurl -X GET 'https://localhost:3000/packs/{PACK_ID}/entries' -H 'Authorization: Token {KEY}'\n\n```\n\n```json\n\n{\n  \"data\": [\n    {\n      \"id\": \"beb31992-0268-48b4-b5bc-b2cad0add5c7\",\n      \"type\": \"entry\",\n      \"attributes\": {\n        \"data\": {\n          \"repo\": \"davidesantangelo/datoji\",\n          \"private\": \"false\",\n          \"stargazers_count\": 0\n        },\n        \"created_at\": \"2020-06-11T14:59:00.581Z\",\n        \"updated_at\": \"2020-06-11T14:59:00.581Z\"\n      },\n      \"relationships\": {\n        \"pack\": {\n          \"data\": {\n            \"id\": \"918f6a68-89f7-4f0c-aa6d-73b447d92819\",\n            \"type\": \"pack\"\n          }\n        }\n      }\n    },\n    {\n      \"id\": \"b858bf82-1abf-4cb0-a9e0-2a59f1b7f30d\",\n      \"type\": \"entry\",\n      \"attributes\": {\n        \"data\": {\n          \"repo\": \"davidesantangelo/feedirss-api\",\n          \"private\": \"false\",\n          \"stargazers_count\": 326\n        },\n        \"created_at\": \"2020-06-11T14:37:08.293Z\",\n        \"updated_at\": \"2020-06-11T14:37:08.293Z\"\n      },\n      \"relationships\": {\n        \"pack\": {\n          \"data\": {\n            \"id\": \"918f6a68-89f7-4f0c-aa6d-73b447d92819\",\n            \"type\": \"pack\"\n          }\n        }\n      }\n    }\n  ]\n}\n\n\n```\n\n```sh\n\ncurl -X GET 'https://localhost:3000/packs/{PACK_ID}/entries/{ENTRY_ID}' -H 'Authorization: Token {KEY}'\n\n```\n\n```json\n\n{\n  \"data\": {\n    \"id\": \"04b7992a-40de-496b-a994-a661a9893df7\",\n    \"type\": \"entry\",\n    \"attributes\": {\n      \"data\": {\n        \"repo\": \"davidesantangelo/feedirss-api\",\n        \"private\": \"false\",\n        \"stargazers_count\": 326\n       },\n      \"created_at\": \"2020-06-11T14:37:34.857Z\",\n      \"updated_at\": \"2020-06-11T14:37:34.857Z\"\n    },\n    \"relationships\": {\n      \"pack\": {\n        \"data\": {\n          \"id\": \"918f6a68-89f7-4f0c-aa6d-73b447d92819\",\n          \"type\": \"pack\"\n        }\n      }\n    }\n  }\n}\n\n```\n\n**Update**\n\nUse HTTP PUT to update record one by one. Please note that this will not patch the record, it is full update. \n\n``` sh\n\ncurl -X PUT 'https://localhost:3000/packs/{PACK_ID}/entries/{ENTRY_ID}' \\\n    -H 'content-type: application/json' \\\n    -H 'Authorization: Token {KEY}' \\\n    -d '{ \"entry\": { \"repo\": \"davidesantangelo/datoji\", \"private\": true, \"stargazers_count\": 10 } }'\n    \n```\n\n```json\n\n{\n  \"data\": {\n    \"id\": \"04b7992a-40de-496b-a994-a661a9893df7\",\n    \"type\": \"entry\",\n    \"attributes\": {\n      \"data\": {\n        \"entry\": {\n          \"repo\": \"davidesantangelo/datoji\",\n          \"private\": true,\n          \"stargazers_count\": 10\n        }\n      },\n      \"created_at\": \"2020-06-11T14:37:34.857Z\",\n      \"updated_at\": \"2020-06-11T14:43:45.153Z\"\n    },\n    \"relationships\": {\n      \"pack\": {\n        \"data\": {\n          \"id\": \"918f6a68-89f7-4f0c-aa6d-73b447d92819\",\n          \"type\": \"pack\"\n        }\n      }\n    }\n  }\n}\n\n```\n\n**Delete**\n\nTo delete a specific record use HTTP DELETE, you will receive in case of success a *204 No Content* code.\n\n```sh\n\ncurl -X DELETE 'https://localhost:3000/packs/{PACK_ID}/entries/{ENTRY_ID}' -H 'Authorization: Token {KEY}'\n\n```\n## Search\n\nYou can perform searches within the dataset.\n\nSupporting:\n\n- unquoted text: text not inside quote marks will be converted to terms separated by \u0026 operators, as if processed by plainto_tsquery.\n\n- \"quoted text\": text inside quote marks will be converted to terms separated by \u003c-\u003e operators, as if processed by phraseto_tsquery.\n\n- OR: logical or will be converted to the | operator.\n\n- -: the logical not operator, converted to the the ! operator.\n\n\n```sh\n\ncurl -X GET 'https://localhost:3000/packs/{PACK_ID}/search?q=datoji' -H 'Authorization: Token {KEY}'\n\n```\n\n```json\n\n{\n  \"data\": [\n    {\n      \"id\": \"b858bf82-1abf-4cb0-a9e0-2a59f1b7f30d\",\n      \"type\": \"entry\",\n      \"attributes\": {\n        \"data\": {\n          \"repo\": \"davidesantangelo/datoji\",\n          \"private\": true,\n          \"stargazers_count\": 10\n        }\n        \"created_at\": \"2020-06-11T14:37:08.293Z\",\n        \"updated_at\": \"2020-06-11T14:37:08.293Z\"\n      },\n      \"relationships\": {\n        \"pack\": {\n          \"data\": {\n            \"id\": \"918f6a68-89f7-4f0c-aa6d-73b447d92819\",\n            \"type\": \"pack\"\n          }\n        }\n      }\n    }\n  ]\n}\n\n```\n\n## Limitations\n* Requests are rate-limited to **400** per 5 minutes per IP address.\n* There is no limit imposed on the number of entries or packs records, but please **don't abuse** it since it's a service i offer free of charge. \n\n## Built With\n\n- [Ruby on Rails](https://github.com/rails/rails) \u0026mdash; Our back end API is a Rails app. It responds to requests RESTfully in JSON.\n- [PostgreSQL](https://www.postgresql.org/) \u0026mdash; Our main data store is in Postgres.\n- [Redis](https://redis.io/) \u0026mdash; We use Redis as a cache and for transient data.\n- [FastJSONAPI](https://github.com/Netflix/fast_jsonapi) \u0026mdash; A lightning fast JSON:API serializer for Ruby Objects.\n- [Textacular](https://github.com/textacular/textacular) \u0026mdash; Textacular exposes full text search capabilities from PostgreSQL.\n- [Rack::Attack](https://github.com/kickstarter/rack-attack) \u0026mdash; Rack middleware for blocking \u0026 throttling abusive requests.\n- [Pagy](https://github.com/ddnexus/pagy) \u0026mdash; The ultimate pagination ruby gem.\n\n## To Do\n\n- [x] Bulk Insert\n- [ ] GraphQL\n- [ ] Webhook\n\n## Buy me a coffee\n\nIf you want to support me in server costs, consider [buying me a coffee](https://www.buymeacoffee.com/582rhJH)! Thanks!\n\n## Spread The Voice\n\n[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=A%20tiny%20JSON%20storage%20service.%20Create,%20Read,%20Update,%20Delete%20and%20Search%20JSON%20data\u0026url=https://github.com/davidesantangelo/datoji\u0026hashtags=json,rest,rails,developers)\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/davidesantangelo/datoji. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidesantangelo%2Fdatoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidesantangelo%2Fdatoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidesantangelo%2Fdatoji/lists"}