hanyadikhetvan-dotnethf/PartOne.postman_collection.json
Torma Kristóf 10c1bb008f
All checks were successful
continuous-integration/drone/push Build is passing
final
2021-05-20 01:36:54 +02:00

343 lines
6.2 KiB
JSON

{
"info": {
"_postman_id": "3571c7a1-93a7-434a-a412-8931ae5b2ee2",
"name": "PartOne",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "UseOldAPI",
"request": {
"auth": {
"type": "noauth"
},
"method": "GET",
"header": [],
"url": {
"raw": "https://localhost:5001/api/v1/HanyadikHetVan",
"protocol": "https",
"host": [
"localhost"
],
"port": "5001",
"path": [
"api",
"v1",
"HanyadikHetVan"
]
}
},
"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": {
"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": "AdminCreateUser",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"email\": \"{{username}}\",\r\n \"password\": \"{{password}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://localhost:5001/api/v2/User",
"protocol": "https",
"host": [
"localhost"
],
"port": "5001",
"path": [
"api",
"v2",
"User"
]
}
},
"response": []
},
{
"name": "UserLogin",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = JSON.parse(responseBody);\r",
"pm.environment.set(\"token\", jsonData.access_token);"
],
"type": "text/javascript"
}
}
],
"request": {
"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": "UserCreateWTS",
"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-03-19T21:46:42.345Z\",\r\n \"pauses\": [\r\n {\r\n \"startdate\": \"2021-04-19T21:46:42.345Z\",\r\n \"enddate\": \"2021-04-29T21:46:42.345Z\"\r\n }\r\n ],\r\n \"funFacts\": [\r\n {\r\n \"funFactor\": 1.2,\r\n \"fact\": \"Ez vicces 7 het volt.\"\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": "GetUserDefault",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://localhost:5001/api/v2/HanyadikHetVan/my",
"protocol": "https",
"host": [
"localhost"
],
"port": "5001",
"path": [
"api",
"v2",
"HanyadikHetVan",
"my"
]
}
},
"response": []
},
{
"name": "GetWTSId",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://localhost:5001/api/v2/WeeklyTimeSpan/{{wtsid}}",
"protocol": "https",
"host": [
"localhost"
],
"port": "5001",
"path": [
"api",
"v2",
"WeeklyTimeSpan",
"{{wtsid}}"
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}