{"id":25807811,"url":"https://github.com/igor-ad/api_users","last_synced_at":"2026-05-11T13:32:42.228Z","repository":{"id":279217147,"uuid":"938063961","full_name":"Igor-ad/api_users","owner":"Igor-ad","description":"Simple Symfony API for user management.","archived":false,"fork":false,"pushed_at":"2025-03-04T13:09:57.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T14:21:46.237Z","etag":null,"topics":["bearer-tokens","docker-compose","jwt-authentication","mysql-database","php8","rest-api","symfony"],"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/Igor-ad.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}},"created_at":"2025-02-24T11:12:29.000Z","updated_at":"2025-03-04T13:10:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"92993828-4f16-453a-9bf6-df9c14490f9c","html_url":"https://github.com/Igor-ad/api_users","commit_stats":null,"previous_names":["igor-ad/api_users"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Igor-ad/api_users","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Igor-ad%2Fapi_users","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Igor-ad%2Fapi_users/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Igor-ad%2Fapi_users/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Igor-ad%2Fapi_users/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Igor-ad","download_url":"https://codeload.github.com/Igor-ad/api_users/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Igor-ad%2Fapi_users/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32896898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["bearer-tokens","docker-compose","jwt-authentication","mysql-database","php8","rest-api","symfony"],"created_at":"2025-02-27T21:36:49.095Z","updated_at":"2026-05-11T13:32:42.223Z","avatar_url":"https://github.com/Igor-ad.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Symfony User API Application\n\nSimple Symfony API for user management.\n\nThe application uses the Bearer JWT authentication method.\n\n### Requirements:\n\nPHP \u003e=8.2, composer, git, docker-compose\n\n\n### Initializing the application\n\n```\ncd /projects\ngit clone https://github.com/Igor-ad/api_users.git\ncd ./api_users\ncp ./src/.env.dev ./src/.env\ncomposer install\ndocker-compose up\nphp bin/console doctrine:migrations:migrate\n## php bin/console doctrine:fixtures:load ## Test Data\n```\n\n### Routes\n\n```\n  Name               Method   Scheme   Host         Path\n  api_users_list     GET      http     localhost   /v1/api/users\n  api_users_show     GET      http     localhost   /v1/api/users/{id}\n  api_users_create   POST     http     localhost   /v1/api/users\n  api_users_update   PUT      http     localhost   /v1/api/users/{id}\n  api_users_delete   DELETE   http     localhost   /v1/api/users/{id}\n  api_login          POST     http     localhost   /api/login\n```\n\n### Security Warning!\n\n####  The test version with the .env.test environment uses unhashed passwords in the database.\n\n\n### Responses\n\n```\nPOST\ncreate response:\n{\n    \"statusCode\": 201,\n    \"message\": \"New user created.\",\n    \"data\": {\n        \"id\": 5,\n        \"login\": \"user3\",\n        \"phone\": \"0335577\",\n        \"token\": \"***\",\n        \"roles\": [\n            \"ROLE_USER\"\n        ]\n    }\n}\n\nPUT\nupdate response:\n{\n    \"statusCode\": 200,\n    \"message\": \"User information has been updated.\",\n    \"data\": {\n        \"id\": 1,\n        \"token\": \"***\",\n        \"roles\": [\n            \"ROLE_USER\"\n        ]\n    }\n}\n\nDELETE\ndelete response:\n{\n    \"statusCode\": 200,\n    \"message\": \"The user has been removed from the system.\",\n    \"data\": {\n        \"success\": true\n    }\n}\n\nGET\nlist response:\n{\n    \"statusCode\": 200,\n    \"message\": \"All users.\",\n    \"data\": [\n        {\n            \"id\": 1,\n            \"login\": \"admin1\",\n            \"phone\": \"06712345\",\n            \"roles\": [\n                \"ROLE_ADMIN\",\n                \"ROLE_USER\"\n            ]\n        },\n        {\n            \"id\": 2,\n            \"login\": \"user1\",\n            \"phone\": \"0671231\",\n            \"roles\": [\n                \"ROLE_USER\"\n            ]\n        },\n        {\n            \"id\": 3,\n            \"login\": \"user2\",\n            \"phone\": \"09645678\",\n            \"roles\": [\n                \"ROLE_USER\"\n           ]\n        }\n    ]\n}\n\n\nGET\nshow response:\n{\n    \"statusCode\": 200,\n    \"message\": \"View user information.\",\n    \"data\": [\n        {\n            \"login\": \"user1\",\n            \"phone\": \"0671231\",\n            \"roles\": [\n                \"ROLE_USER\"\n            ]\n        }\n    ]\n}\n```\n\n### Errors\n\n```\nValidation Error:\n{\n    \"status\": \"Bad Request\",\n    \"code\": 400,\n    \"message\": \"Validation exception.\",\n    \"errors\": [\n        {\n            \"field\": \"login\",\n            \"violationMessage\": \"This value should not be blank.\",\n            \"invalidValue\": null\n        },\n        {\n            \"field\": \"phone\",\n            \"violationMessage\": \"This value is too long. It should have 8 characters or less.\",\n            \"invalidValue\": \"113355991\"\n        },\n        {\n            \"field\": \"pass\",\n            \"violationMessage\": \"This value should not be blank.\",\n            \"invalidValue\": null\n        }\n    ]\n}\n\nAccess denied:\n{\n    \"status\": \"Internal Server Error\",\n    \"code\": 500,\n    \"message\": \"Access Denied by #[IsGranted(\\\"USER_VIEW\\\", \\\"user\\\")] on controller\",\n    \"errors\": null\n}\n\nLogin error:\n{\"code\":401,\"message\":\"Invalid credentials.\"}\n{\"code\":401,\"message\":\"Invalid JWT Token\"}\n{\"code\":401,\"message\":\"Expired JWT Token\"}\n\nInvalid method:\n{\n    \"status\": \"Method Not Allowed\",\n    \"code\": 405,\n    \"message\": \"No route found for \\\"POST http://localhost/v1/api/users/1\\\": Method Not Allowed (Allow: GET, PUT, DELETE)\",\n    \"errors\": null\n}\n\nResource not found:\n{\n    \"status\": \"Not Found\",\n    \"code\": 404,\n    \"message\": \"No route found for \\\"GET http://localhost/v1/api/user\\\"\",\n    \"errors\": null\n}\n\n{\n    \"status\": \"Not Found\",\n    \"code\": 404,\n    \"message\": \"\\\"App\\\\Entity\\\\User\\\" object not found by \\\"Symfony\\\\Bridge\\\\Doctrine\\\\ArgumentResolver\\\\EntityValueResolver\\\".\",\n    \"errors\": null\n}\n\nDatabase exception:\n{\n    \"status\": \"Internal Server Error\",\n    \"code\": 500,\n    \"message\": \"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'user1' for key 'users.unique_login'\",\n    \"errors\": null\n}\n\nSecurity exception:\n{\"status\":\"error\",\"code\":500,\"message\":Security Runtime Exception.\",\"errors\":null}\n\nUnexpected Value:\n{\n    \"status\": \"Internal Server Error\",\n    \"code\": 500,\n    \"message\": \"The type of the \\\"login\\\" attribute for class \\\"App\\\\Entity\\\\User\\\" must be one of \\\"string\\\" (\\\"int\\\" given).\",\n    \"errors\": null\n}\n\nBad Request:\n{\n    \"status\": \"Bad Request\",\n    \"code\": 400,\n    \"message\": \"Extra attributes are not allowed (\\\"login-\\\" is unknown).\",\n    \"errors\": null\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figor-ad%2Fapi_users","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figor-ad%2Fapi_users","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figor-ad%2Fapi_users/lists"}