{"id":13447403,"url":"https://github.com/vasanthv/jsonbox","last_synced_at":"2025-10-01T12:31:09.032Z","repository":{"id":41280900,"uuid":"206067456","full_name":"vasanthv/jsonbox","owner":"vasanthv","description":"HTTP-based JSON storage.","archived":true,"fork":false,"pushed_at":"2023-02-07T17:18:43.000Z","size":2109,"stargazers_count":2492,"open_issues_count":13,"forks_count":173,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-09-19T05:19:14.357Z","etag":null,"topics":["json","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"https://jsonbox.io","language":"JavaScript","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/vasanthv.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,"governance":null},"funding":{"patreon":"vasanthv","custom":"https://www.paypal.me/vsnthv"}},"created_at":"2019-09-03T12:04:08.000Z","updated_at":"2024-09-16T15:46:38.000Z","dependencies_parsed_at":"2023-01-30T01:16:02.217Z","dependency_job_id":"548eec91-0c33-446c-bb35-3292436c5a8f","html_url":"https://github.com/vasanthv/jsonbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasanthv%2Fjsonbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasanthv%2Fjsonbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasanthv%2Fjsonbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasanthv%2Fjsonbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vasanthv","download_url":"https://codeload.github.com/vasanthv/jsonbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219866620,"owners_count":16554249,"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","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":["json","mongodb","nodejs"],"created_at":"2024-07-31T05:01:16.634Z","updated_at":"2025-10-01T12:31:03.743Z","avatar_url":"https://github.com/vasanthv.png","language":"JavaScript","funding_links":["https://patreon.com/vasanthv","https://www.paypal.me/vsnthv"],"categories":["JavaScript","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"\u003e :warning: Jsonbox.io cloud instance was shut down on May 31st, 2021 due to a lack of maintenance time. The Jsonbox.io's source code will continue to be open-sourced in this repository.\n\n# jsonbox.io\n\nA HTTP based JSON storage. It lets you store, read \u0026 modify JSON data over HTTP APIs for FREE. Ideal for small projects, prototypes or hackathons, where you don't have to spin up your own data store.\n\nWith the new protected boxes (introduced in v2), you can even power your websites with jsonbox.io.\n\n## API Documentation\n\nBase URL: `https://jsonbox.io/`\n\n### Create\n\nYou can create a record (or add a record) to a box by using HTTP post to `jsonbox.io/${BOX_ID}`.\n\n```sh\ncurl -X POST 'https://jsonbox.io/demobox_6d9e326c183fde7b' \\\n    -H 'content-type: application/json' \\\n    -d '{\"name\": \"Jon Snow\", \"age\": 25}'\n```\n\nResponse:\n\n```json\n{\n  \"_id\": \"5d776a25fd6d3d6cb1d45c51\",\n  \"name\": \"Jon Snow\",\n  \"age\": 25,\n  \"_createdOn\": \"2019-09-10T09:17:25.607Z\"\n}\n```\n\nYou can also create multiple records at once by passing an array\n\n```sh\ncurl -X POST 'https://jsonbox.io/demobox_6d9e326c183fde7b' \\\n    -H 'content-type: application/json' \\\n    -d '[{\"name\": \"Daenerys Targaryen\", \"age\": 25}, {\"name\": \"Arya Stark\", \"age\": 16}]'\n```\n\n```json\n[\n  {\n    \"_id\": \"5d776b75fd6d3d6cb1d45c52\",\n    \"name\": \"Daenerys Targaryen\",\n    \"age\": 25,\n    \"_createdOn\": \"2019-09-10T09:23:01.105Z\"\n  },\n  {\n    \"_id\": \"5d776b75fd6d3d6cb1d45c53\",\n    \"name\": \"Arya Stark\",\n    \"age\": 16,\n    \"_createdOn\": \"2019-09-10T09:23:01.105Z\"\n  }\n]\n```\n\nYou can also pass in an optional collections parameter in the URL to group records `jsonbox.io/${BOX_ID}/${COLLECTION}`.\n\n_Note: A valid `${BOX_ID}` \u0026 `${COLLECTION}` should contain only alphanumeric characters \u0026 \\_. `${BOX_ID}` should be at least 20 characters long._\n\n### Read\n\nUse HTTP GET to read all the records or a single record. You can also query \u0026 sort the records.\n\n```sh\ncurl -X GET 'https://jsonbox.io/demobox_6d9e326c183fde7b'\n```\n\n```json\n[\n  {\n    \"_id\": \"5d776b75fd6d3d6cb1d45c52\",\n    \"name\": \"Daenerys Targaryen\",\n    \"age\": 25,\n    \"_createdOn\": \"2019-09-10T09:23:01.105Z\"\n  },\n  {\n    \"_id\": \"5d776b75fd6d3d6cb1d45c53\",\n    \"name\": \"Arya Stark\",\n    \"age\": 16,\n    \"_createdOn\": \"2019-09-10T09:23:01.105Z\"\n  },\n  {\n    \"_id\": \"5d776a25fd6d3d6cb1d45c51\",\n    \"name\": \"Jon Snow\",\n    \"age\": 25,\n    \"_createdOn\": \"2019-09-10T09:17:25.607Z\"\n  }\n]\n```\n\nTo get all records inside a collection _Sample collection name: \"users\"_:\n\n```sh\ncurl -X GET 'https://jsonbox.io/demobox_6d9e326c183fde7b/users'\n```\n\nTo sort the records by a specific field use `sort` query param. In the below example the output will be sorted in the descending order of the age.\n\n```sh\ncurl -X GET 'https://jsonbox.io/demobox_6d9e326c183fde7b?sort=-age'\n```\n\nTo read a specific record use `jsonbox.io/${BOX_ID}/${RECORD_ID}`.\n\n```sh\ncurl -X GET 'https://jsonbox.io/demobox_6d9e326c183fde7b/5d776a25fd6d3d6cb1d45c51'\n```\n\nTo query records, you have to pass the key \u0026 value as shown below.\n\n```sh\ncurl -X GET 'https://jsonbox.io/demobox_6d9e326c183fde7b?q=name:arya%20stark'\n```\n\nAll the accepted query params are as follows.\n\n| Param | Description                                                                                   | Default      |\n| ----- | --------------------------------------------------------------------------------------------- | ------------ |\n| sort  | Used to sort the result set by the specific field. Add a prefix \"-\" to sort in reverse order. | -\\_createdOn |\n| skip  | Used to skip certain no. of records. Can be used for pagination.                              | 0            |\n| limit | Used to limit the results to a specific count. Can be used for pagination. Max. is 1000.      | 20           |\n| q     | Query for filtering values. Check out the format below.                                       |              |\n\n#### Filtering\n\nYou can pass a filter in a query by passing them in URL param `q` as shown below:\n\n```sh\ncurl -X GET 'https://jsonbox.io/demobox_6d9e326c183fde7b?q=name:arya%20stark,age:\u003e13'\n```\n\nThe above sample will look for the name `arya stark` and age greater than 13. You can filter on `Number`, `String` \u0026 `Boolean` values only.\n\nDifferent filters for Numeric values.\n\n|                                                                      | Sample                       |\n| -------------------------------------------------------------------- | ---------------------------- |\n| To filter values greater than or less than a specific value          | `q=age:\u003e10` or `q=age:\u003c10`   |\n| To filter values greater (or less) than or equal to a specific value | `q=age:\u003e=10` or `q=age:\u003c=10` |\n| To filter values that match a specific value.                        | `q=age:=10`                  |\n\nDifferent filters for String values.\n\n|                                                                    | Sample                |\n| ------------------------------------------------------------------ | --------------------- |\n| Filter values that start with a specific string                    | `q=name:arya*`        |\n| Filter values that end with a specific string                      | `q=name:*stark`       |\n| Filter values where a specific string appears anywhere in a string | `q=name:*ya*`         |\n| Filter values that match a specific string                         | `q=name:arya%20stark` |\n\nYou can combine multiple fields by separating them with commas as shown below:\n\n```\nhttps://jsonbox.io/demobox_6d9e326c183fde7b?q=name:arya%20stark,age:\u003e13,isalive:true\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. _A Bulk update is not supported yet._\n\n```sh\ncurl -X PUT 'https://jsonbox.io/demobox_6d9e326c183fde7b/5d776b75fd6d3d6cb1d45c53' \\\n    -H 'content-type: application/json' \\\n    -d '{\"name\": \"Arya Stark\", \"age\": 18}'\n```\n\n### Delete\n\nTwo approaches are available for delete\n\n- To delete a specific record use HTTP DELETE with jsonbox.io/${BOX_ID}/${RECORD_ID}\n\n```sh\ncurl -X DELETE 'https://jsonbox.io/demobox_6d9e326c183fde7b/5d776b75fd6d3d6cb1d45c53'\n```\n\n- To delete based on a filter use HTTP DELETE with jsonbox.io/\\${BOX_ID}?q={QUERY}\n\n```sh\ncurl -X DELETE 'https://jsonbox.io/demobox_6d9e326c183fde7b?q=name:arya%20stark,age:\u003e13'\n```\n\n### Protected Box\n\nA **protected box** is similar to a regular box, but you need an API-KEY to create / update / delete records. _Reading records is open and does not need API-KEY_. Pass the API-KEY using the `X-API-KEY` HTTP header.\n\n```sh\ncurl -X POST 'https://jsonbox.io/demobox_6d9e326c183fde7b' \\\n    -H 'content-type: application/json' \\\n  --H 'x-api-key: 7b3b910b-a7ad-41e8-89d6-5e28e2e34e70' \\\n    -d '{\"name\": \"Jon Snow\", \"age\": 25}'\n```\n\nYou can also use `Authorization: API-KEY 7b3b910b-a7ad-41e8-89d6-5e28e2e34e70` header. _An API-KEY should be a valid GUID/UUID._\n\n#### How to create a protected box?\n\nYou create a protected box by pushing your first record to a new box with an API-KEY. All the subsequent write requests to that box expect the API-KEY to be passed. _You cannot change a public box to protected or vice versa._\n\n### Getting Box metadata\n\nUse `/_meta/${BOX_ID}` in a `GET` request to get metadata of a box\n\n```\nhttps://jsonbox.io/_meta/demobox_6d9e326c183fde7b\n```\n\nThe result will have the following format\n\n```json\n{\n  \"_count\": 3,\n  \"_createdOn\": \"2020-03-12T04:45:22.000Z\",\n  \"_updatedOn\": \"2020-03-12T06:23:26.000Z\"\n}\n```\n\n- `_count` - the record count in the box\n- `_createdOn` - the oldest record's created date\n- `_updatedOn` - the most recent updated date\n\n### Optional IP Filtering\nWhen running your own instance localy, you could define IP Address filtering.  \nSet the value of `FILTER_IP_SET` in config.js to the set of allowed IP addresses.\n\nSingle IP:\n```\nFILTER_IP_SET: ['192.168.1.123']\n```\n\nUsing CIDR subnet masks for ranges:\n```\nFILTER_IP_SET: ['127.0.0.1/24']\n```\n\nUsing IP ranges:\n```\nFILTER_IP_SET: [['127.0.0.1', '127.0.0.10']]\n```\n\nUsing wildcard ip ranges and nginx forwarding:\n```\nFILTER_IP_SET: ['10.1.*.*', '123.??.34.8*']\n```\n\n### Limitations\n\nThis is FREE service, so we have to have some limitations to avoid abuse and stay free forever.\n\n1. The request body cannot be more than 50KB.\n2. Can't push or pull more than 1000 records at a time.\n3. `POST` requests are rate-limited to 100 per hour per IP address\n4. There is no limit on the number of records you store in a box, but please don't abuse the API by storing large datasets of more than **5000** records. This is meant for small projects and that's why it is offered FREE of cost.\n5. 30 days of data retention. \n6. No backup. If your data is lost due to some technical issues, its lost forever.\n\n### Wrappers\n\n_Note: The wrappers listed here are from other sources and have not been tested or validated by us_\n\n- **Go**: [peteretelej/jsonbox](https://godoc.org/github.com/peteretelej/jsonbox) ([GitHub](https://github.com/peteretelej/jsonbox))\n- **Java**:\n  1. [https://search.maven.org/artifact/io.jsonbox/jsonbox](https://search.maven.org/artifact/io.jsonbox/jsonbox) ([GitHub](https://github.com/leonardiwagner/jsonbox-java))\n  2. [https://github.com/leeu1911/jsonbox-java](https://github.com/leeu1911/jsonbox-java)\n- **JavaScript (Node + browser)**: [https://www.npmjs.com/package/jsonbox-client](https://www.npmjs.com/package/jsonbox-client) ([GitHub](https://github.com/jsejcksn/jsonbox-client))\n- **JavaScript (Node)**: [https://www.npmjs.com/package/jsonbox-node](https://www.npmjs.com/package/jsonbox-node) ([GitHub](https://github.com/0xflotus/jsonbox-node))\n- **JavaScript (React)**: [https://www.npmjs.com/package/react-jsonbox](https://www.npmjs.com/package/react-jsonbox) ([GitHub](https://github.com/SaraVieira/react-jsonbox))\n- **PHP**: [https://packagist.org/packages/anper/jsonbox](https://packagist.org/packages/anper/jsonbox) ([GitHub](https://github.com/perevoshchikov/jsonbox))\n- **Python**: [https://pypi.org/project/jsonbox/](https://pypi.org/project/jsonbox/) ([GitHub](https://github.com/harlev/jsonbox-python))\n- **Rust**: [https://crates.io/crates/jsonbox](https://crates.io/crates/jsonbox) ([GitHub](https://github.com/kuy/jsonbox-rs))\n\n### How to run locally\n\nFork this repo and then clone it:\n\n```\ngit clone https://github.com/\u003cyour_name\u003e/jsonbox.git\n```\n\nYou need MongoDB to run this application. If you don't already have MongoDB, go to the [official documentation](https://docs.mongodb.com/manual/installation/) and follow the instructions there. Once you have MongoDB installed, run\n\n```\nmongo\n```\n\nto start the MongoDB instance. Then `cd` into directory where the repo was cloned and install the dependencies:\n\n```\nnpm install\n```\n\nThen just run\n\n```\nnpm start\n```\n\nto start the development server on port `3000`. Your jsonbox instance will be running on `http://localhost:3000`. Alternatively you can run the application using docker with `docker-compose up`.\n\n### LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasanthv%2Fjsonbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasanthv%2Fjsonbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasanthv%2Fjsonbox/lists"}