Skip to content

Commit

Permalink
create api documentation using postman
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadmp97 committed Sep 12, 2023
1 parent 192f160 commit 266386b
Showing 1 changed file with 289 additions and 0 deletions.
289 changes: 289 additions & 0 deletions api.postman_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
{
"info": {
"_postman_id": "824aa950-94cf-4cfb-95c8-a8dfd6111d14",
"name": "Hope APIs",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "14157458",
"_collection_link": "https://www.postman.com/muhammadmp1997/workspace/hope-apis/collection/14157458-824aa950-94cf-4cfb-95c8-a8dfd6111d14?source=collection_link"
},
"item": [
{
"name": "Authentication",
"item": [
{
"name": "Register",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": "\n",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"email\": \"[email protected]\",\r\n \"password\": \"123456\",\r\n \"nick_name\": \"Mr. Green\",\r\n \"country_id\": 21\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/api/auth/register",
"host": [
"{{url}}"
],
"path": [
"api",
"auth",
"register"
]
}
},
"response": [
{
"name": "Response",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": "\n",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"email\": \"[email protected]\",\r\n \"password\": \"123456\",\r\n \"nick_name\": \"Mr. Green\",\r\n \"country_id\": 21\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/api/auth/register",
"host": [
"{{url}}"
],
"path": [
"api",
"auth",
"register"
]
}
},
"status": "Created",
"code": 201,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Date",
"value": "Tue, 12 Sep 2023 16:06:12 GMT"
},
{
"key": "Server",
"value": "Apache/2.4.35 (Win64) OpenSSL/1.1.1n PHP/8.1.6"
},
{
"key": "X-Powered-By",
"value": "PHP/8.1.6"
},
{
"key": "Cache-Control",
"value": "no-cache, private"
},
{
"key": "X-RateLimit-Limit",
"value": "60"
},
{
"key": "X-RateLimit-Remaining",
"value": "59"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Keep-Alive",
"value": "timeout=5, max=100"
},
{
"key": "Connection",
"value": "Keep-Alive"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"data\": []\n}"
}
]
},
{
"name": "Login",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": "\n",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"email\": \"[email protected]\",\r\n \"password\": \"123456\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/api/auth/login",
"host": [
"{{url}}"
],
"path": [
"api",
"auth",
"login"
]
}
},
"response": [
{
"name": "Response",
"originalRequest": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": "\n",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\r\n \"email\": \"[email protected]\",\r\n \"password\": \"123456\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/api/auth/login",
"host": [
"{{url}}"
],
"path": [
"api",
"auth",
"login"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Date",
"value": "Tue, 12 Sep 2023 16:09:09 GMT"
},
{
"key": "Server",
"value": "Apache/2.4.35 (Win64) OpenSSL/1.1.1n PHP/8.1.6"
},
{
"key": "X-Powered-By",
"value": "PHP/8.1.6"
},
{
"key": "Cache-Control",
"value": "no-cache, private"
},
{
"key": "X-RateLimit-Limit",
"value": "60"
},
{
"key": "X-RateLimit-Remaining",
"value": "57"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Keep-Alive",
"value": "timeout=5, max=100"
},
{
"key": "Connection",
"value": "Keep-Alive"
},
{
"key": "Transfer-Encoding",
"value": "chunked"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [],
"body": "{\n \"data\": {\n \"token\": \"4|laravel_sanctum_boVkf1qc3oywULo5yoYi40mjKsVigXDCfKhRbeWCcc386402\"\n }\n}"
}
]
},
{
"name": "Logout",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"description": "\n",
"type": "text"
},
{
"key": "Authorization",
"value": "Bearer {{token}}",
"type": "text"
}
],
"url": {
"raw": "{{url}}/api/auth/logout",
"host": [
"{{url}}"
],
"path": [
"api",
"auth",
"logout"
]
}
},
"response": []
}
]
}
]
}

0 comments on commit 266386b

Please sign in to comment.