A simple CRUD project with Authentication and Authorization.
This project has a simple API for performing CURD operations using the laravel freamework.
How to obtain api key:
- Register to website
- Login with your credentials
- click
api_token
in menu than you can get your api token to interact with api
-
URL:
/api/projects
-
Method:
POST
-
Parameters:
name
(string, required)description
(string, required)api_token
(string, required)
-
Successful Response:
{ "data": { "id": 43, "name": "testName", "description": "testDescription" } }
-
URL:
/api/projects/{project-id}
-
Method:
PATCH
-
Parameters:
project-id
(UNSIGNED BIGINT, required)name
(string, required)description
(text, required)api_token
(string, required)
-
Successful Response:
{ "data": { "id": 43, "name": "updated name", "description": "updated description" }, "message": "project updated" }
-
URL:
/api/projects/{project-id}
-
Method:
GET
-
Parameters:
project-id
(UNSIGNED BIGINT, required)api_token
(string, required)
-
Successful Response:
{ "data": { "id": 43, "name": "project name", "description": "project description" } }
-
URL:
/api/projects/{project-id}
-
Method:
DELETE
-
Parameters:
project-id
(UNSIGNED BIGINT, required)api_token
(string, required)
-
Successful Response:
{ "data": { "id": 43, "name": "project name", "description": "project description" }, "message": "project deleted" }
-
URL:
/api/projects
-
Method:
GET
-
Parameters:
api_token
(string, required)
-
Successful Response:
{ "data": [ { "id": 40, "name": "Fist", "description": "Fist description" }, { "id": 41, "name": "Second", "description": "Second description" }, { "id": 42, "name": "api", "description": "api description" } ] }
-
URL:
/api/user
-
Method:
GET
-
Parameters:
api_token
(string, required)
-
Successful Response:
{ "id": 10, "name": "user_name", "email": "user_email", "email_verified_at": null, "created_at": "2024-08-16 07:03:07", "updated_at": "2024-08-16 07:03:07" }
Visit link below to see an online todo project: