{"id":20461996,"url":"https://github.com/denvercoder1/php-simple-crud-api","last_synced_at":"2025-03-05T11:32:23.378Z","repository":{"id":51316354,"uuid":"328347961","full_name":"DenverCoder1/php-simple-crud-api","owner":"DenverCoder1","description":"Simple API for storing and retrieving labeled data (grouped key-value pairs)","archived":false,"fork":false,"pushed_at":"2021-05-15T22:41:26.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-16T00:40:05.621Z","etag":null,"topics":["api","crud-api","database","key-value","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/DenverCoder1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-10T09:39:01.000Z","updated_at":"2023-04-08T16:22:04.000Z","dependencies_parsed_at":"2022-09-24T19:10:21.658Z","dependency_job_id":null,"html_url":"https://github.com/DenverCoder1/php-simple-crud-api","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/DenverCoder1%2Fphp-simple-crud-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenverCoder1%2Fphp-simple-crud-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenverCoder1%2Fphp-simple-crud-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenverCoder1%2Fphp-simple-crud-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DenverCoder1","download_url":"https://codeload.github.com/DenverCoder1/php-simple-crud-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242018938,"owners_count":20058706,"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":["api","crud-api","database","key-value","php"],"created_at":"2024-11-15T12:29:26.205Z","updated_at":"2025-03-05T11:32:23.123Z","avatar_url":"https://github.com/DenverCoder1.png","language":"PHP","readme":"# PHP Simple CRUD API\n\nSimple API for storing and retrieving labeled data.\n\n- [✏️ Create](#️-create)\n  - [Parameters](#parameters)\n  - [Example request](#example-request)\n  - [Successful response](#successful-response)\n  - [Unsuccessful response](#unsuccessful-response)\n- [👀 Read](#-read)\n  - [Parameters](#parameters-1)\n  - [Example requests](#example-requests)\n  - [Successful response](#successful-response-1)\n  - [Unsuccessful response](#unsuccessful-response-1)\n- [📤 Update](#-update)\n  - [Parameters](#parameters-2)\n  - [Example request](#example-request-1)\n  - [Successful response](#successful-response-2)\n  - [Unsuccessful response](#unsuccessful-response-2)\n- [🗑️ Delete](#️-delete)\n  - [Parameters](#parameters-3)\n  - [Example request](#example-request-2)\n  - [Successful response](#successful-response-3)\n  - [Unsuccessful response](#unsuccessful-response-3)\n- [⚙️ Config](#️-config)\n  - [Configuration options](#configuration-options)\n  - [Using secrets](#using-secrets)\n\n## ✏️ Create\n\n### Parameters\n\n| Parameter          | Description                                                                                            |\n| ------------------ | ------------------------------------------------------------------------------------------------------ |\n| `tag` (required)   | Choose a tag name which can be used for filtering. This is like a category for a group of similar data |\n| `key` (required)   | The key for labeling the data. This will be used for accessing it later                                |\n| `value` (required) | The data to store at the specified key                                                                 |\n\n### Example request\n\n```\n/insert?tag=timers\u0026key=123\u0026value=1610278082\n```\n\n### Successful response\n\n| Key            | Value                   |\n| -------------- | ----------------------- |\n| `responseType` | \"success\"               |\n| `data`         | The data in JSON format |\n\n```json\n{\n  \"responseType\": \"success\",\n  \"data\": {\n    \"timers\": {\n      \"123\": \"1610278082\",\n      \"1234\": \"1610278082\"\n    }\n  }\n}\n```\n\n### Unsuccessful response\n\n| Key            | Value                                                              |\n| -------------- | ------------------------------------------------------------------ |\n| `responseType` | \"error\"                                                            |\n| `message`      | A description of the error                                         |\n| `data`         | The data in JSON format  (only if the error involves a data value) |\n\n```json\n{\n  \"responseType\": \"error\",\n  \"message\": \"key '123' already exists in tag 'timers'\",\n  \"data\": {\n    \"timers\": {\n      \"123\": \"1610278082\",\n      \"1234\": \"1610278082\"\n    }\n  }\n}\n```\n\n## 👀 Read\n\n### Parameters\n\n| Parameter        | Description                           |\n| ---------------- | ------------------------------------- |\n| `tag` (optional) | The tag name to filter by             |\n| `key` (optional) | A specific key you want the value for |\n\n### Example requests\n\n#### Get all data in all tags\n\n```\n/get\n```\n\n#### Get all data within a tag\n\n```\n/get?tag=timers\n```\n\n#### Get a single entry\n\n```\n/get?tag=timers\u0026key=123\n```\n\n### Successful response\n\n#### Get all data in all tags\n\n\n| Key            | Value                   |\n| -------------- | ----------------------- |\n| `responseType` | \"success\"               |\n| `data`         | The data in JSON format |\n\n```json\n{\n  \"responseType\": \"success\",\n  \"data\": {\n    \"timers\": {\n      \"123\": \"1610278082\",\n      \"1234\": \"1610278082\"\n    }\n  }\n}\n```\n\n#### Get all data within a tag\n\n| Key            | Value                                         |\n| -------------- | --------------------------------------------- |\n| `responseType` | \"success\"                                     |\n| `data`         | The data in JSON format for the requested tag |\n\n```json\n{\n  \"responseType\": \"success\",\n  \"data\": {\n    \"123\": \"1610278082\",\n    \"1234\": \"1610278082\"\n  }\n}\n```\n\n#### Get a single entry\n\n| Key            | Value                                         |\n| -------------- | --------------------------------------------- |\n| `responseType` | \"success\"                                     |\n| `data`         | The data in JSON format for the requested key |\n\n```json\n{\n  \"responseType\": \"success\",\n  \"data\": {\n    \"123\": \"1610278082\",\n  }\n}\n```\n\n### Unsuccessful response\n\n| Key            | Value                                                             |\n| -------------- | ----------------------------------------------------------------- |\n| `responseType` | \"error\"                                                           |\n| `message`      | A description of the error                                        |\n| `data`         | The data in JSON format (only if the error involves a data value) |\n\n```json\n{\n  \"responseType\": \"error\",\n  \"message\": \"key '12345' does not exist in tag 'timers'\",\n  \"data\": {\n    \"123\": \"1610278082\",\n    \"1234\": \"1610278082\"\n  }\n}\n```\n\n## 📤 Update\n\n### Parameters\n\n| Parameter          | Description                                         |\n| ------------------ | --------------------------------------------------- |\n| `tag` (required)   | Specify the tag where the data should be updated    |\n| `key` (required)   | Specify which key within that tag should be updated |\n| `value` (required) | The data to store at the specified key              |\n\n### Example request\n\n```\n/update?tag=timers\u0026key=123\u0026value=0\n```\n\n### Successful response\n\n| Key            | Value                   |\n| -------------- | ----------------------- |\n| `responseType` | \"success\"               |\n| `data`         | The data in JSON format |\n\n```json\n{\n  \"responseType\": \"success\",\n  \"data\": {\n    \"timers\": {\n      \"123\": \"1610278082\",\n      \"1234\": \"1610278082\"\n    }\n  }\n}\n```\n\n### Unsuccessful response\n\n| Key            | Value                                                             |\n| -------------- | ----------------------------------------------------------------- |\n| `responseType` | \"error\"                                                           |\n| `message`      | A description of the error                                        |\n| `data`         | The data in JSON format (only if the error involves a data value) |\n\n```json\n{\n  \"responseType\": \"error\",\n  \"message\": \"key '12345' does not exist in tag 'timers'\",\n  \"data\": {\n    \"timers\": {\n      \"123\": \"1610278082\",\n      \"1234\": \"1610278082\"\n    }\n  }\n}\n```\n\n## 🗑️ Delete\n\n### Parameters\n\n| Parameter        | Description                                         |\n| ---------------- | --------------------------------------------------- |\n| `tag` (required) | Specify the tag where the data should be deleted    |\n| `key` (required) | Specify which key within that tag should be deleted |\n\n### Example request\n\n```\n/delete?tag=timers\u0026key=123\n```\n\n### Successful response\n\n| Key            | Value                   |\n| -------------- | ----------------------- |\n| `responseType` | \"success\"               |\n| `data`         | The data in JSON format |\n\n```json\n{\n  \"responseType\": \"success\",\n  \"data\": {\n    \"timers\": {\n      \"1234\": \"1610278082\"\n    }\n  }\n}\n```\n\n### Unsuccessful response\n\n| Key            | Value                                                             |\n| -------------- | ----------------------------------------------------------------- |\n| `responseType` | \"error\"                                                           |\n| `message`      | A description of the error                                        |\n| `data`         | The data in JSON format (only if the error involves a data value) |\n\n```json\n{\n  \"responseType\": \"error\",\n  \"message\": \"key '12345' does not exist in tag 'timers'\",\n  \"data\": {\n    \"timers\": {\n      \"123\": \"1610278082\",\n      \"1234\": \"1610278082\"\n    }\n  }\n}\n```\n\n## ⚙️ Config\n\n### Configuration options\n\n| Option               | Description                                                                           |\n| -------------------- | ------------------------------------------------------------------------------------- |\n| `secret` (string)    | Secret key for preventing others from modifying your data (leave blank for no secret) |\n| `private` (boolean)  | Whether or not the secret key is required for *reading* the data                      |\n| `json_path` (string) | Path for storing the data file                                                        |\n\n### Using secrets\n\nIn `config.php`, you can set a **secret** which will be a required parameter passed in the URL for insertion, updates, and deletion (eg. `...\u0026secret=example`).\n\nTo require the secret parameter to be passed even when reading data, set **private** to true.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenvercoder1%2Fphp-simple-crud-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenvercoder1%2Fphp-simple-crud-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenvercoder1%2Fphp-simple-crud-api/lists"}