hanyadikhetvan-dotnethf/PartOne.postman_collection....

362 lines
6.6 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": "{{proto}}://{{host}}:{{port}}/api/v1/HanyadikHetVan",
"protocol": "{{proto}}",
"host": [
"{{host}}"
],
"port": "{{port}}",
"path": [
"api",
"v1",
"HanyadikHetVan"
]
}
},
"response": []
},
{
"name": "Healthcheck",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{proto}}://{{host}}:{{port}}/healthz",
"protocol": "{{proto}}",
"host": [
"{{host}}"
],
"port": "{{port}}",
"path": [
"healthz"
]
}
},
"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": "{{proto}}://{{host}}:{{port}}/connect/token",
"protocol": "{{proto}}",
"host": [
"{{host}}"
],
"port": "{{port}}",
"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": "{{proto}}://{{host}}:{{port}}/api/v2/User",
"protocol": "{{proto}}",
"host": [
"{{host}}"
],
"port": "{{port}}",
"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": "{{proto}}://{{host}}:{{port}}/connect/token",
"protocol": "{{proto}}",
"host": [
"{{host}}"
],
"port": "{{port}}",
"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": "{{proto}}://{{host}}:{{port}}/api/v2/WeeklyTimeSpan",
"protocol": "{{proto}}",
"host": [
"{{host}}"
],
"port": "{{port}}",
"path": [
"api",
"v2",
"WeeklyTimeSpan"
]
}
},
"response": []
},
{
"name": "GetUserDefault",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{proto}}://{{host}}:{{port}}/api/v2/HanyadikHetVan/my",
"protocol": "{{proto}}",
"host": [
"{{host}}"
],
"port": "{{port}}",
"path": [
"api",
"v2",
"HanyadikHetVan",
"my"
]
}
},
"response": []
},
{
"name": "GetWTSId",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{token}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "{{proto}}://{{host}}:{{port}}/api/v2/WeeklyTimeSpan/{{wtsid}}",
"protocol": "{{proto}}",
"host": [
"{{host}}"
],
"port": "{{port}}",
"path": [
"api",
"v2",
"WeeklyTimeSpan",
"{{wtsid}}"
]
}
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}