Torma Kristóf
10c1bb008f
All checks were successful
continuous-integration/drone/push Build is passing
335 lines
6.2 KiB
JSON
335 lines
6.2 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "502a1115-3b6a-4a52-a4de-39d3fa9f5bdb",
|
|
"name": "PartThree",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "UserLogin",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"exec": [
|
|
"var jsonData = JSON.parse(responseBody);\r",
|
|
"pm.environment.set(\"token\", jsonData.access_token);"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"auth": {
|
|
"type": "noauth"
|
|
},
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "urlencoded",
|
|
"urlencoded": [
|
|
{
|
|
"key": "client_id",
|
|
"value": "postman",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "client_secret",
|
|
"value": "cunci",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "scope",
|
|
"value": "openid profile user_role api.readwrite",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "username",
|
|
"value": "{{username}}",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "password",
|
|
"value": "{{password}}",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "grant_type",
|
|
"value": "password",
|
|
"type": "text"
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "https://localhost:5001/connect/token",
|
|
"protocol": "https",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "5001",
|
|
"path": [
|
|
"connect",
|
|
"token"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "CreateNewWTS",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"exec": [
|
|
"var jsonData = JSON.parse(responseBody);\r",
|
|
"pm.environment.set(\"wtsid\", jsonData.id);"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "{{token}}",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"startdate\": \"2021-01-01T21:46:42.345Z\",\r\n \"funFacts\": [\r\n {\r\n \"funFactor\": 1.2,\r\n \"fact\": \"Ez vicces 7 het volt.\"\r\n },\r\n {\r\n \"funFactor\": 2.1,\r\n \"fact\": \"Lyaly de faraszto lesz.\"\r\n },\r\n {\r\n \"funFactor\": 6.9,\r\n \"fact\": \"Tul kell elni.\"\r\n }\r\n ]\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "https://localhost:5001/api/v2/WeeklyTimeSpan",
|
|
"protocol": "https",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "5001",
|
|
"path": [
|
|
"api",
|
|
"v2",
|
|
"WeeklyTimeSpan"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "GetFunFactsOfWTS",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"exec": [
|
|
"var jsonData = JSON.parse(responseBody);\r",
|
|
"pm.environment.set(\"ffid\", jsonData[0].id);"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://localhost:5001/api/v2/FunFact/WeeklyTimeSpan/{{wtsid}}",
|
|
"protocol": "https",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "5001",
|
|
"path": [
|
|
"api",
|
|
"v2",
|
|
"FunFact",
|
|
"WeeklyTimeSpan",
|
|
"{{wtsid}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "AdminLogin",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"exec": [
|
|
"var jsonData = JSON.parse(responseBody);\r",
|
|
"pm.environment.set(\"token\", jsonData.access_token);"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"auth": {
|
|
"type": "noauth"
|
|
},
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "urlencoded",
|
|
"urlencoded": [
|
|
{
|
|
"key": "client_id",
|
|
"value": "postman",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "client_secret",
|
|
"value": "cunci",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "scope",
|
|
"value": "openid profile user_role api.readwrite",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "username",
|
|
"value": "{{admin_username}}",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "password",
|
|
"value": "{{admin_password}}",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "grant_type",
|
|
"value": "password",
|
|
"type": "text"
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "https://localhost:5001/connect/token",
|
|
"protocol": "https",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "5001",
|
|
"path": [
|
|
"connect",
|
|
"token"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "DeleteFunFact",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"exec": [
|
|
"var jsonData = JSON.parse(responseBody);\r",
|
|
"pm.environment.set(\"pauseid\", jsonData.id);"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://localhost:5001/api/v2/FunFact/{{ffid}}",
|
|
"protocol": "https",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "5001",
|
|
"path": [
|
|
"api",
|
|
"v2",
|
|
"FunFact",
|
|
"{{ffid}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "SeeUpdatedFunFactArray",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"exec": [
|
|
"var jsonData = JSON.parse(responseBody);\r",
|
|
"pm.environment.set(\"ffid\", jsonData[0].id);"
|
|
],
|
|
"type": "text/javascript"
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://localhost:5001/api/v2/FunFact/WeeklyTimeSpan/{{wtsid}}",
|
|
"protocol": "https",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "5001",
|
|
"path": [
|
|
"api",
|
|
"v2",
|
|
"FunFact",
|
|
"WeeklyTimeSpan",
|
|
"{{wtsid}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
],
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "{{token}}",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"event": [
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |