{
	"info": {
		"_postman_id": "7b4955f8-e31d-4615-8234-271579e1b88b",
		"name": "multi-tenancy",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "36183173"
	},
	"item": [
		{
			"name": "Admin Login",
			"event": [
				{
					"listen": "test",
					"script": {
						"exec": [
							"pm.collectionVariables.set(\"FwdSessionId\", pm.response.headers.get(\"FwdSessionId\"));",
							""
						],
						"type": "text/javascript",
						"packages": {}
					}
				}
			],
			"request": {
				"auth": {
					"type": "basic",
					"basic": [
						{
							"key": "password",
							"value": "admin",
							"type": "string"
						},
						{
							"key": "username",
							"value": "tenantAdmin",
							"type": "string"
						}
					]
				},
				"method": "GET",
				"header": [],
				"url": {
					"raw": "https://localhost:7443/admin/tenant/login",
					"protocol": "https",
					"host": [
						"localhost"
					],
					"port": "7443",
					"path": [
						"admin",
						"tenant",
						"login"
					]
				}
			},
			"response": []
		},
		{
			"name": "List tenants",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "FwdSessionId",
						"value": "{{FwdSessionId}}",
						"type": "text"
					}
				],
				"url": {
					"raw": "https://localhost:7443/admin/tenant",
					"protocol": "https",
					"host": [
						"localhost"
					],
					"port": "7443",
					"path": [
						"admin",
						"tenant"
					]
				}
			},
			"response": []
		},
		{
			"name": "Add tenant",
			"request": {
				"method": "POST",
				"header": [
					{
						"key": "FwdSessionId",
						"value": "{{FwdSessionId}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"tenantName\": \"t3\",\n    \"databases\": [\n        {\n            \"physicalName\": \"t3\",\n            \"logicalName\": \"fwd\",\n            \"url\": \"jdbc:mariadb://localhost:3306/t3\",\n            \"username\": \"fwd_admin\",\n            \"password\": \"fwd_password\"\n        }\n    ]\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://localhost:7443/admin/tenant",
					"protocol": "https",
					"host": [
						"localhost"
					],
					"port": "7443",
					"path": [
						"admin",
						"tenant"
					]
				}
			},
			"response": []
		},
		{
			"name": "Get tenant status",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "FwdSessionId",
						"value": "{{FwdSessionId}}",
						"type": "text"
					}
				],
				"url": {
					"raw": "https://localhost:7443/admin/tenant/tenant_1/status",
					"protocol": "https",
					"host": [
						"localhost"
					],
					"port": "7443",
					"path": [
						"admin",
						"tenant",
						"tenant_1",
						"status"
					]
				}
			},
			"response": []
		},
		{
			"name": "Change tenant status",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "FwdSessionId",
						"value": "{{FwdSessionId}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"status\":true\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://localhost:7443/admin/tenant/tenant_no3/status",
					"protocol": "https",
					"host": [
						"localhost"
					],
					"port": "7443",
					"path": [
						"admin",
						"tenant",
						"tenant_no3",
						"status"
					]
				}
			},
			"response": []
		},
		{
			"name": "Update tenant",
			"request": {
				"method": "PUT",
				"header": [
					{
						"key": "FwdSessionId",
						"value": "{{FwdSessionId}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "{\n    \"databaseName\": \"tenant_1\", \n    \"updateList\": {\n        \"physicalName\": \"fwd_ten1\"\n    }\n}",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://localhost:7443/admin/tenant/tenant_1",
					"protocol": "https",
					"host": [
						"localhost"
					],
					"port": "7443",
					"path": [
						"admin",
						"tenant",
						"tenant_1"
					]
				}
			},
			"response": []
		},
		{
			"name": "Delete tenant",
			"request": {
				"method": "DELETE",
				"header": [
					{
						"key": "FwdSessionId",
						"value": "{{FwdSessionId}}",
						"type": "text"
					}
				],
				"body": {
					"mode": "raw",
					"raw": "",
					"options": {
						"raw": {
							"language": "json"
						}
					}
				},
				"url": {
					"raw": "https://localhost:7443/admin/tenant/tenant_no5",
					"protocol": "https",
					"host": [
						"localhost"
					],
					"port": "7443",
					"path": [
						"admin",
						"tenant",
						"tenant_no5"
					]
				}
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"packages": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "FwdSessionId",
			"value": "a07083c9-aa55-42f4-9b5a-58cf72156e4e"
		}
	]
}