java-api/postman/MONNETHIC-API.postman_collection.json
2019-04-08 21:17:35 +02:00

904 lines
21 KiB
JSON

{
"info": {
"_postman_id": "fe2ac183-8378-4e3d-82c9-0cd1057d2fb7",
"name": "MONNETHIC-API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "USER",
"item": [
{
"name": "CREATE",
"item": [
{
"name": "Register User",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"name\":\"Clara\",\n\t\"firstname\":\"Sophie\",\n\t\"email\":\"sophie.clara@gmail.com\",\n\t\"password\":\"sophieClara1234$\",\n\t\"association\":\"gonette\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/user/register",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"user",
"register"
]
},
"description": "Request to Register an User into Monnethic-Project (Blockchain and Database)"
},
"response": []
},
{
"name": "Register User To Delete",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"name\":\"Toto\",\n\t\"firstname\":\"tata\",\n\t\"email\":\"toto.tata@gmail.com\",\n\t\"password\":\"tototata1234$\",\n\t\"association\":\"gonette\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/user/register",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"user",
"register"
]
},
"description": "Request to Register an User into Monnethic-Project (Blockchain and Database)"
},
"response": []
},
{
"name": "Register User With Phone",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"type": "text",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"name\":\"Meunier\",\n\t\"firstname\":\"Thomas\",\n\t\"email\":\"thomas.meunier@gmail.com\",\n\t\"password\":\"thomasMeunier4567$\",\n\t\"phone\":\"0102030405\",\n\t\"association\":\"gonette\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/user/register",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"user",
"register"
]
},
"description": "Request to Register an User into Monnethic-Project (Blockchain and Database)"
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "LOGIN",
"item": [
{
"name": "User-Login",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"email\":\"thomas.meunier@gmail.com\",\n\t\"password\":\"thomasPwd158$*\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/user/login",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"user",
"login"
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "GET",
"item": [
{
"name": "getUser",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"email\":\"toto.tata@gmail.com\",\n\t\"password\":\"tototata1234$\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/user/get",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"user",
"get"
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "DELETE",
"item": [
{
"name": "deleteUser",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"email\":\"toto.tata@gmail.com\",\n\t\"user_hash\":\"$2a$10$mE0RJq92SmedzuMlQvX29uXT9chqpKH/45cZ9GD7aphsMdJw9..sm\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/user/delete",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"user",
"delete"
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "APPROVE",
"item": [
{
"name": "approveUser",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"user_hash\":\"$2a$10$mE0RJq92SmedzuMlQvX29uXT9chqpKH/45cZ9GD7aphsMdJw9..sm\",\n\t\"email\":\"toto.tata@gmail.com\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/user/approve",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"user",
"approve"
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
}
],
"event": [
{
"listen": "prerequest",
"script": {
"id": "bddb7f7b-9a6f-4a71-8061-a3a1fe46fb12",
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"id": "add34646-7177-4d4f-ad9e-b3eb963d5bf8",
"type": "text/javascript",
"exec": [
""
]
}
}
]
},
{
"name": "WALLET",
"item": [
{
"name": "GET",
"item": [
{
"name": "getWallet",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:10053/api/rest/wallet/getWallet?walletHash=$2a$10$8PJyraUjMoL/h.cQjJyMZedBUlcTjPjNm4j1NuqzQBTnSe2XNuGM2",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"wallet",
"getWallet"
],
"query": [
{
"key": "walletHash",
"value": "$2a$10$8PJyraUjMoL/h.cQjJyMZedBUlcTjPjNm4j1NuqzQBTnSe2XNuGM2"
}
]
}
},
"response": []
},
{
"name": "getUserWallets",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:10053/api/rest/wallet/getUserWallets?userHash=$2a$10$GzyMhD3n05Z2lwCnoGi2dusjKrNAmHhtn5fw1xLpes5.cEV5T7lve",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"wallet",
"getUserWallets"
],
"query": [
{
"key": "userHash",
"value": "$2a$10$GzyMhD3n05Z2lwCnoGi2dusjKrNAmHhtn5fw1xLpes5.cEV5T7lve"
}
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "DELETE",
"item": [
{
"name": "deleteWallet",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"userHash\":\"\",\n\t\"walletHash\":\"$2a$10$GzyMhD3n05Z2lwCnoGi2dusjKrNAmHhtn5fw1xLpes5.cEV5T7lve\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/wallet/delete",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"wallet",
"delete"
],
"query": [
{
"key": "",
"value": "",
"disabled": true
}
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "CREATE",
"item": [
{
"name": "createWallet",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"type\":\"test\",\n\t\"user_hash\":\"$2a$10$GzyMhD3n05Z2lwCnoGi2dusjKrNAmHhtn5fw1xLpes5.cEV5T7lve\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/wallet/create",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"wallet",
"create"
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "SETBALANCE",
"item": [
{
"name": "setBalance",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"association_hash\":\"$2a$10$lPl7xCdsp.2g9fX7ytj9tONkV3PuQzG.9A9G8PfEKnIkT2KpahMme\",\n\t\"assocation_pwd\":\"asso_GonE8977&4$*-\",\n\t\"wallet_hash\":\"$2a$10$8PJyraUjMoL/h.cQjJyMZedBUlcTjPjNm4j1NuqzQBTnSe2XNuGM2\",\n\t\"amount\":1.0\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/wallet/setBalance",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"wallet",
"setBalance"
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "TRANSFER",
"item": [
{
"name": "transferWallet",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"user_hash\":\"$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0.\",\n\t\"wallet_hash\":\"$2a$10$8PJyraUjMoL/h.cQjJyMZedBUlcTjPjNm4j1NuqzQBTnSe2XNuGM2\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/wallet/transfer",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"wallet",
"transfer"
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
}
]
},
{
"name": "TRANSACTION",
"item": [
{
"name": "SEND",
"item": [
{
"name": "sendTransaction",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"source_user_hash\":\"$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0.\",\n\t\"source_user_pwd\":\"thomasPwd158$*\",\n\t\"transaction_from\":\"$2a$10$6Z4uNeOgAKhpWYGVYwPWhe6G91lIKHOCA2yYcpzS1pbJyosNNw3Gu\",\n\t\"transaction_to\":\"$2a$10$UKiTo/eqpnvlny3U5xpJ../C2WOgoxebAl3xiexAhinC8X7Jt2wY.\",\n\t\"transaction_amount\":1.0,\n\t\"transaction_unit\":\"gonette\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/transaction/send",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"transaction",
"send"
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "GET",
"item": [
{
"name": "SENT",
"item": [
{
"name": "getSent",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:10053/api/rest/transaction/get/sent?wallet_hash=$2a$10$6Z4uNeOgAKhpWYGVYwPWhe6G91lIKHOCA2yYcpzS1pbJyosNNw3Gu",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"transaction",
"get",
"sent"
],
"query": [
{
"key": "wallet_hash",
"value": "$2a$10$6Z4uNeOgAKhpWYGVYwPWhe6G91lIKHOCA2yYcpzS1pbJyosNNw3Gu"
}
]
}
},
"response": []
},
{
"name": "getAllSent",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:10053/api/rest/transaction/get/allSent?user_hash=$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0.",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"transaction",
"get",
"allSent"
],
"query": [
{
"key": "user_hash",
"value": "$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0."
}
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "RECEIVED",
"item": [
{
"name": "getAllReceived",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:10053/api/rest/transaction/get/allReceived?user_hash=$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0.",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"transaction",
"get",
"allReceived"
],
"query": [
{
"key": "user_hash",
"value": "$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0."
}
]
}
},
"response": []
},
{
"name": "getReceived",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:10053/api/rest/transaction/get/received?wallet_hash=$2a$10$6Z4uNeOgAKhpWYGVYwPWhe6G91lIKHOCA2yYcpzS1pbJyosNNw3Gu",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"transaction",
"get",
"received"
],
"query": [
{
"key": "wallet_hash",
"value": "$2a$10$6Z4uNeOgAKhpWYGVYwPWhe6G91lIKHOCA2yYcpzS1pbJyosNNw3Gu"
}
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
},
{
"name": "getLatest",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:10053/api/rest/transaction/get/latest?user_hash=$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0.",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"transaction",
"get",
"latest"
],
"query": [
{
"key": "user_hash",
"value": "$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0."
}
]
}
},
"response": []
},
{
"name": "getTransaction",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:10053/api/rest/transaction/get?wallet_hash=$2a$10$UKiTo/eqpnvlny3U5xpJ../C2WOgoxebAl3xiexAhinC8X7Jt2wY.&txID=ce65025ddddcb26f6b380d54cf9d9b090550cbacadfb63b062f9336a72eeb6bc",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"transaction",
"get"
],
"query": [
{
"key": "wallet_hash",
"value": "$2a$10$UKiTo/eqpnvlny3U5xpJ../C2WOgoxebAl3xiexAhinC8X7Jt2wY."
},
{
"key": "txID",
"value": "ce65025ddddcb26f6b380d54cf9d9b090550cbacadfb63b062f9336a72eeb6bc"
}
]
}
},
"response": []
},
{
"name": "getAll",
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "http://localhost:10053/api/rest/transaction/getAll?user_hash=$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0.",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"transaction",
"getAll"
],
"query": [
{
"key": "user_hash",
"value": "$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0."
}
]
}
},
"response": []
}
],
"_postman_isSubFolder": true
}
]
},
{
"name": "SESSION",
"item": [
{
"name": "sessiontStart",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"user_hash\":\"$2a$10$J7B8sXULfiPfnlKRlTjqQuSrbumTyv.acB8NpxDrUQ3WmnfKdjx0.\",\n\t\"user_email\":\"thomas.meunier@gmail.com\"\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/session/start",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"session",
"start"
]
}
},
"response": []
},
{
"name": "sessionEnd",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"session_id\":1\n}"
},
"url": {
"raw": "http://localhost:10053/api/rest/session/end",
"protocol": "http",
"host": [
"localhost"
],
"port": "10053",
"path": [
"api",
"rest",
"session",
"end"
]
}
},
"response": []
}
]
}
]
}