{"id":21332960,"url":"https://github.com/eace/rest","last_synced_at":"2026-03-04T23:31:57.632Z","repository":{"id":129678685,"uuid":"594465871","full_name":"eaCe/rest","owner":"eaCe","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-11T06:20:42.000Z","size":80,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-11T02:30:00.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/eaCe.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-28T16:33:16.000Z","updated_at":"2024-06-24T14:05:57.000Z","dependencies_parsed_at":"2025-07-12T10:42:22.874Z","dependency_job_id":null,"html_url":"https://github.com/eaCe/rest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"FriendsOfREDAXO/rex_repo_template","purl":"pkg:github/eaCe/rest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaCe%2Frest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaCe%2Frest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaCe%2Frest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaCe%2Frest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eaCe","download_url":"https://codeload.github.com/eaCe/rest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eaCe%2Frest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30099380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T23:31:22.529Z","status":"ssl_error","status_checked_at":"2026-03-04T23:31:22.112Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-21T22:54:09.151Z","updated_at":"2026-03-04T23:31:57.589Z","avatar_url":"https://github.com/eaCe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API für REDAXO 5\n\nEine einfache Möglichkeit eine REST API in REDAXO zu erstellen.\n\n## Route registrieren\n\n```php\n// https://domain.de/api/my-call\nRest::registerRoute([\n    'route' =\u003e 'my-call',\n    'methods' =\u003e array('POST', 'GET'),\n    'callback' =\u003e 'myCallbackFn',\n]);\n\nfunction myCallbackFn($route) {\n    /** @var RestRoute $route */\n    $data = [\n        'lorem' =\u003e 'ipsum',\n        'dolor' =\u003e [\n            'sit' =\u003e 'amet',\n        ]\n    ];\n\n    $route-\u003esendContent($data);\n    exit;\n}\n\n// https://domain.de/api/my-call/12\nRest::registerRoute([\n    'route' =\u003e 'my-call/{articleID}',\n    'methods' =\u003e array('POST', 'GET'),\n    'callback' =\u003e function ($route) {\n        $articleID = $route-\u003egetParam('articleID', 'int');\n        // ...\n    },\n]);\n```\n\n## Full configuration\n\n```php\n[\n    'route' =\u003e '/my-call/{articleID}',\n    'permission' =\u003e 'admin', // addon[]\n    'methods' =\u003e array('POST', 'GET'),\n    'validations' =\u003e [\n        'articleID' =\u003e 'int', // number, bool/boolean, \n    ],\n    'callback' =\u003e static function($route) {\n        /** @var RestRoute $route */\n        $data = [\n            'lorem' =\u003e 'ipsum',\n            'dolor' =\u003e [\n                'sit' =\u003e 'amet',\n            ]\n        ];\n\n        $route-\u003esendContent($data);\n        exit;\n    },\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feace%2Frest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feace%2Frest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feace%2Frest/lists"}