From ebefe2c66c5eb9ddddd09b5c58ff3ff61396b98c Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Mon, 5 Nov 2018 22:31:13 +0100 Subject: [PATCH 01/15] Updating attach MI jumpbox Posh --- .../attach-jumpbox/attachJumpbox.ps1 | 26 ++++++++++++++++--- .../attach-jumpbox/azuredeploy.json | 24 ++++++++++++----- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index eda28bbfc5..98d8388f2d 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -2,12 +2,20 @@ $parameters = $args[0] $subscriptionId = $parameters['subscriptionId'] $resourceGroupName = $parameters['resourceGroupName'] +$virtualMachineName = $parameters['virtualMachineName'] $virtualNetworkName = $parameters['virtualNetworkName'] +$managementSubnetName = $parameters['subnetName'] $administratorLogin = $parameters['administratorLogin'] $administratorLoginPassword = $parameters['administratorLoginPassword'] $scriptUrlBase = $args[1] +if($virtualMachineName -eq '') + $virtualMachineName = 'JumpboxVM' + +if($managementSubnetName -eq '') + $managementSubnetName = 'Management' + function VerifyPSVersion { Write-Host "Verifying PowerShell version, must be 5.0 or higher." @@ -157,12 +165,20 @@ SelectSubscriptionId -subscriptionId $subscriptionId $virtualNetwork = LoadVirtualNetwork -resourceGroupName $resourceGroupName -virtualNetworkName $virtualNetworkName -$managementSubnetPrefix = CalculateNextAddressPrefix $virtualNetwork 28 +$subnets = $virtualNetwork.Subnets.Name +If($false -eq $subnets.Contains($managementSubnetName)) +{ + + $managementSubnetPrefix = CalculateNextAddressPrefix $virtualNetwork 28 -$virtualNetwork.AddressSpace.AddressPrefixes.Add($managementSubnetPrefix) -Add-AzureRmVirtualNetworkSubnetConfig -Name Management -VirtualNetwork $virtualNetwork -AddressPrefix $managementSubnetPrefix | Out-Null + $virtualNetwork.AddressSpace.AddressPrefixes.Add($managementSubnetPrefix) + Add-AzureRmVirtualNetworkSubnetConfig -Name Management -VirtualNetwork $virtualNetwork -AddressPrefix $managementSubnetPrefix | Out-Null -SetVirtualNetwork $virtualNetwork + SetVirtualNetwork $virtualNetwork + Write-Host "Added subnet into VNet." -ForegroundColor Green +} else { + Write-Host "The subnet already exists in the VNet." -ForegroundColor Green +} Write-Host @@ -172,6 +188,8 @@ Write-Host "Starting deployment..." $templateParameters = @{ virtualNetworkName = $virtualNetworkName managementSubnetPrefix = $managementSubnetPrefix + managementSubnetName = $managementSubnetName + virtualMachineName = $virtualMachineName administratorLogin = $administratorLogin administratorLoginPassword = $administratorLoginPassword } diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json index ff12fca456..a84c803824 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json @@ -32,15 +32,25 @@ "metadata": { "description": "Enter password." } + }, + "virtualMachineName": { + "type": "string", + "metadata": { + "description": "VM name." + } + }, + "managementSubnetName": { + "type": "string", + "metadata": { + "description": "VM subnet name." + } } }, "variables": { - "managementSubnetName": "Management", - "virtualMachineName": "JumpBox", "virtualMachineSize": "Standard_B2s", - "networkInterfaceName": "nicJumpBox", - "publicIPAddressName": "ipJumpBox", - "networkSecurityGroupName": "nsgJumpBox", + "networkInterfaceName": "[concat('nic', parameters('virtualMachineName'))]", + "publicIPAddressName": "[concat('ip', parameters('virtualMachineName'))]", + "networkSecurityGroupName": "[concat('nsg', parameters('virtualMachineName'))]", "scriptFileUri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-sqlmi-new-vnet-w-jumpbox/installSSMS.ps1" }, "resources": [ @@ -54,7 +64,7 @@ ], "properties": { "osProfile": { - "computerName": "[variables('virtualMachineName')]", + "computerName": "[parameters('virtualMachineName')]", "adminUsername": "[parameters('administratorLogin')]", "adminPassword": "[parameters('administratorLoginPassword')]", "windowsConfiguration": { @@ -130,7 +140,7 @@ "name": "ipconfig1", "properties": { "subnet": { - "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), variables('managementSubnetName'))]" + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworkName'), parameters('managementSubnetName'))]" }, "privateIPAllocationMethod": "Dynamic", "publicIpAddress": { From 88e54139123a31f854fb89099ce000ea69aebc51 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Mon, 5 Nov 2018 22:35:52 +0100 Subject: [PATCH 02/15] Update samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 --- .../attach-jumpbox/attachJumpbox.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index 98d8388f2d..f41f9d2edc 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -10,11 +10,13 @@ $administratorLoginPassword = $parameters['administratorLoginPassword'] $scriptUrlBase = $args[1] -if($virtualMachineName -eq '') +if($virtualMachineName -eq '') { $virtualMachineName = 'JumpboxVM' +} -if($managementSubnetName -eq '') +if($managementSubnetName -eq '') { $managementSubnetName = 'Management' +} function VerifyPSVersion { @@ -168,7 +170,6 @@ $virtualNetwork = LoadVirtualNetwork -resourceGroupName $resourceGroupName -virt $subnets = $virtualNetwork.Subnets.Name If($false -eq $subnets.Contains($managementSubnetName)) { - $managementSubnetPrefix = CalculateNextAddressPrefix $virtualNetwork 28 $virtualNetwork.AddressSpace.AddressPrefixes.Add($managementSubnetPrefix) From 6f3c418dfef5e66d32f28113e6130c4a57073558 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Mon, 5 Nov 2018 22:39:50 +0100 Subject: [PATCH 03/15] Updating minor issues --- .../attach-jumpbox/attachJumpbox.ps1 | 2 +- .../attach-jumpbox/azuredeploy.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index f41f9d2edc..50ed3611d4 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -173,7 +173,7 @@ If($false -eq $subnets.Contains($managementSubnetName)) $managementSubnetPrefix = CalculateNextAddressPrefix $virtualNetwork 28 $virtualNetwork.AddressSpace.AddressPrefixes.Add($managementSubnetPrefix) - Add-AzureRmVirtualNetworkSubnetConfig -Name Management -VirtualNetwork $virtualNetwork -AddressPrefix $managementSubnetPrefix | Out-Null + Add-AzureRmVirtualNetworkSubnetConfig -Name $managementSubnetName -VirtualNetwork $virtualNetwork -AddressPrefix $managementSubnetPrefix | Out-Null SetVirtualNetwork $virtualNetwork Write-Host "Added subnet into VNet." -ForegroundColor Green diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json index a84c803824..0828096698 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json @@ -55,7 +55,7 @@ }, "resources": [ { - "name": "[variables('virtualMachineName')]", + "name": "[parameters('virtualMachineName')]", "type": "Microsoft.Compute/virtualMachines", "apiVersion": "2018-06-01", "location": "[parameters('location')]", @@ -104,7 +104,7 @@ "location": "[parameters('location')]", "apiVersion": "2018-06-01", "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('virtualMachineName'))]" + "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" ], "tags": { "displayName": "SetupChocolatey" From 0a5c87e5842c0f28791154382885d358a0413e93 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Mon, 5 Nov 2018 22:51:27 +0100 Subject: [PATCH 04/15] Update samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json --- .../attach-jumpbox/azuredeploy.json | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json index 0828096698..1d4e42e74f 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json @@ -17,6 +17,7 @@ }, "managementSubnetPrefix": { "type": "string", + "defaultValue":"THIS IS NOT USED", "metadata": { "description": "Enter management subnet address prefix." } From 1f555bbc5cc36d25c4920acf493e6f0820d33284 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Mon, 5 Nov 2018 22:52:43 +0100 Subject: [PATCH 05/15] Update samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 --- .../attach-jumpbox/attachJumpbox.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index 50ed3611d4..51452f35e0 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -178,6 +178,7 @@ If($false -eq $subnets.Contains($managementSubnetName)) SetVirtualNetwork $virtualNetwork Write-Host "Added subnet into VNet." -ForegroundColor Green } else { + $managementSubnetPrefix = 'N/A' Write-Host "The subnet already exists in the VNet." -ForegroundColor Green } From 49b919ac90bdaa6351102b500af1dc4841f38700 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Mon, 5 Nov 2018 23:34:00 +0100 Subject: [PATCH 06/15] Remove unused managementSubnetPrefix ARM param --- .../attach-jumpbox/attachJumpbox.ps1 | 2 -- .../attach-jumpbox/azuredeploy.json | 7 ------- 2 files changed, 9 deletions(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index 51452f35e0..8937e1d9e5 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -178,7 +178,6 @@ If($false -eq $subnets.Contains($managementSubnetName)) SetVirtualNetwork $virtualNetwork Write-Host "Added subnet into VNet." -ForegroundColor Green } else { - $managementSubnetPrefix = 'N/A' Write-Host "The subnet already exists in the VNet." -ForegroundColor Green } @@ -189,7 +188,6 @@ Write-Host "Starting deployment..." $templateParameters = @{ virtualNetworkName = $virtualNetworkName - managementSubnetPrefix = $managementSubnetPrefix managementSubnetName = $managementSubnetName virtualMachineName = $virtualMachineName administratorLogin = $administratorLogin diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json index 1d4e42e74f..7ec540af12 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json @@ -15,13 +15,6 @@ "description": "Enter virtual network name. If you leave this field blank name will be created by the template." } }, - "managementSubnetPrefix": { - "type": "string", - "defaultValue":"THIS IS NOT USED", - "metadata": { - "description": "Enter management subnet address prefix." - } - }, "administratorLogin": { "type": "string", "metadata": { From 2265dbb9b7ff45ecc0ecad870ce1ae6fe5e66dd2 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Tue, 6 Nov 2018 15:19:03 +0100 Subject: [PATCH 07/15] Addressed srdans comments --- .../attach-jumpbox/attachJumpbox.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index 8937e1d9e5..19c442629a 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -10,11 +10,11 @@ $administratorLoginPassword = $parameters['administratorLoginPassword'] $scriptUrlBase = $args[1] -if($virtualMachineName -eq '') { - $virtualMachineName = 'JumpboxVM' +if($virtualMachineName -eq '' -or $virtualMachineName -eq $null) { + $virtualMachineName = 'Jumpbox' } -if($managementSubnetName -eq '') { +if($managementSubnetName -eq '' -or $managementSubnetName -eq $null) { $managementSubnetName = 'Management' } @@ -168,6 +168,7 @@ SelectSubscriptionId -subscriptionId $subscriptionId $virtualNetwork = LoadVirtualNetwork -resourceGroupName $resourceGroupName -virtualNetworkName $virtualNetworkName $subnets = $virtualNetwork.Subnets.Name +Write-Host $subnets If($false -eq $subnets.Contains($managementSubnetName)) { $managementSubnetPrefix = CalculateNextAddressPrefix $virtualNetwork 28 From e38700ae5ff2c3f4d5a0941f7f3634623f55561f Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Tue, 6 Nov 2018 15:30:45 +0100 Subject: [PATCH 08/15] Added trace logs --- .../attach-jumpbox/attachJumpbox.ps1 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index 19c442629a..347b12e010 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -78,6 +78,10 @@ function LoadVirtualNetwork { If($null -ne $virtualNetwork.Id) { Write-Host "Virtual network loaded." -ForegroundColor Green + If($virtualNetwork.VirtualNetworkPeerings.Count -gt 0) { + Write-Host "Virtual should not have peerings." -ForegroundColor Red + } + return $virtualNetwork } else @@ -168,7 +172,7 @@ SelectSubscriptionId -subscriptionId $subscriptionId $virtualNetwork = LoadVirtualNetwork -resourceGroupName $resourceGroupName -virtualNetworkName $virtualNetworkName $subnets = $virtualNetwork.Subnets.Name -Write-Host $subnets + If($false -eq $subnets.Contains($managementSubnetName)) { $managementSubnetPrefix = CalculateNextAddressPrefix $virtualNetwork 28 @@ -177,9 +181,9 @@ If($false -eq $subnets.Contains($managementSubnetName)) Add-AzureRmVirtualNetworkSubnetConfig -Name $managementSubnetName -VirtualNetwork $virtualNetwork -AddressPrefix $managementSubnetPrefix | Out-Null SetVirtualNetwork $virtualNetwork - Write-Host "Added subnet into VNet." -ForegroundColor Green + Write-Host "Added subnet $managementSubnetName into VNet." -ForegroundColor Green } else { - Write-Host "The subnet already exists in the VNet." -ForegroundColor Green + Write-Host "The subnet $managementSubnetName already exists in the VNet." -ForegroundColor Green } Write-Host From 835659f7f5b9b1fd332043314c87b8327b64bc37 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Tue, 6 Nov 2018 16:11:32 +0100 Subject: [PATCH 09/15] Added another log message --- .../attach-jumpbox/attachJumpbox.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index 347b12e010..5b12e89ec9 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -147,7 +147,9 @@ function CalculateNextAddressPrefix } } $startIPAddress += 1 - return (ConvertUInt32ToIPAddress $startIPAddress) + "/" + $prefixLength + $addressPrefixResult = (ConvertUInt32ToIPAddress $startIPAddress) + "/" + $prefixLength + Write-Host "Using address prefix $addressPrefixResult." -ForegroundColor Green + return $addressPrefixResult } function CalculateVpnClientAddressPoolPrefix From f33323cdc50737ce128006353cc68d7607ac3206 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Tue, 6 Nov 2018 17:14:47 +0100 Subject: [PATCH 10/15] Adding more logs --- .../attach-jumpbox/attachJumpbox.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index 5b12e89ec9..b67ca591cf 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -12,10 +12,12 @@ $scriptUrlBase = $args[1] if($virtualMachineName -eq '' -or $virtualMachineName -eq $null) { $virtualMachineName = 'Jumpbox' + Write-Host "VM Name: 'Jumpbox'." -ForegroundColor Green } if($managementSubnetName -eq '' -or $managementSubnetName -eq $null) { $managementSubnetName = 'Management' + Write-Host "Using subnet 'Management'." -ForegroundColor Green } function VerifyPSVersion @@ -177,6 +179,7 @@ $subnets = $virtualNetwork.Subnets.Name If($false -eq $subnets.Contains($managementSubnetName)) { + Write-Host "Creating subnet $managementSubnetName ($managementSubnetPrefix) in the VNet..." -ForegroundColor Green $managementSubnetPrefix = CalculateNextAddressPrefix $virtualNetwork 28 $virtualNetwork.AddressSpace.AddressPrefixes.Add($managementSubnetPrefix) @@ -201,4 +204,4 @@ $templateParameters = @{ administratorLoginPassword = $administratorLoginPassword } -New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri ($scriptUrlBase+'/azuredeploy.json?t='+ [DateTime]::Now.Ticks) -TemplateParameterObject $templateParameters +# New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri ($scriptUrlBase+'/azuredeploy.json?t='+ [DateTime]::Now.Ticks) -TemplateParameterObject $templateParameters From 082f183ff6648752a234783ac07ecf9b6d9cbd59 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Tue, 6 Nov 2018 19:12:45 +0100 Subject: [PATCH 11/15] More logging --- .../attach-jumpbox/attachJumpbox.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index b67ca591cf..6953fc20ae 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -138,7 +138,7 @@ function ConvertUInt32ToIPAddress function CalculateNextAddressPrefix { param($virtualNetwork, $prefixLength) - Write-Host "Calculating address prefix." + Write-Host "Calculating address prefix..." $startIPAddress = 0 ForEach($addressPrefix in $virtualNetwork.AddressSpace.AddressPrefixes) { @@ -179,6 +179,7 @@ $subnets = $virtualNetwork.Subnets.Name If($false -eq $subnets.Contains($managementSubnetName)) { + Write-Host "$managementSubnetName is not one of the subnets in $subnets" -ForegroundColor Yellow Write-Host "Creating subnet $managementSubnetName ($managementSubnetPrefix) in the VNet..." -ForegroundColor Green $managementSubnetPrefix = CalculateNextAddressPrefix $virtualNetwork 28 @@ -205,3 +206,5 @@ $templateParameters = @{ } # New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri ($scriptUrlBase+'/azuredeploy.json?t='+ [DateTime]::Now.Ticks) -TemplateParameterObject $templateParameters + +Write-Host "Deployment completed" \ No newline at end of file From e3cae268ba551f653f0d7cc6bea380bc98eafee5 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Tue, 6 Nov 2018 19:24:52 +0100 Subject: [PATCH 12/15] Adding more info messages --- .../attach-jumpbox/attachJumpbox.ps1 | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index 6953fc20ae..33076d276c 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -17,7 +17,7 @@ if($virtualMachineName -eq '' -or $virtualMachineName -eq $null) { if($managementSubnetName -eq '' -or $managementSubnetName -eq $null) { $managementSubnetName = 'Management' - Write-Host "Using subnet 'Management'." -ForegroundColor Green + Write-Host "Using subnet 'Management' to deploy jumpbox VM." -ForegroundColor Green } function VerifyPSVersion @@ -39,26 +39,27 @@ function EnsureLogin () $context = Get-AzureRmContext If($null -eq $context.Subscription) { - Write-Host "Loging in ..." + Write-Host "Sign-in..." If($null -eq (Login-AzureRmAccount -ErrorAction SilentlyContinue -ErrorVariable Errors)) { - Write-Host ("Login failed: {0}" -f $Errors[0].Exception.Message) -ForegroundColor Red + Write-Host ("Sign-in failed: {0}" -f $Errors[0].Exception.Message) -ForegroundColor Red Break } } - Write-Host "User logedin." -ForegroundColor Green + Write-Host "Sign-in successful." -ForegroundColor Green } function SelectSubscriptionId { param ( $subscriptionId ) - Write-Host "Selecting subscription '$subscriptionId'." + Write-Host "Selecting subscription '$subscriptionId'..." $context = Get-AzureRmContext If($context.Subscription.Id -ne $subscriptionId) { Try { + Write-Host "Switching subscription $context.Subscription.Id to '$subscriptionId'." -ForegroundColor Green Select-AzureRmSubscription -SubscriptionId $subscriptionId -ErrorAction Stop | Out-null } Catch @@ -79,16 +80,15 @@ function LoadVirtualNetwork { $virtualNetwork = Get-AzureRmVirtualNetwork -ResourceGroupName $resourceGroupName -Name $virtualNetworkName -ErrorAction SilentlyContinue If($null -ne $virtualNetwork.Id) { - Write-Host "Virtual network loaded." -ForegroundColor Green + Write-Host "Virtual network with id $virtualNetwork.Id is loaded." -ForegroundColor Green If($virtualNetwork.VirtualNetworkPeerings.Count -gt 0) { - Write-Host "Virtual should not have peerings." -ForegroundColor Red + Write-Host "Virtual network is loaded, but it should not have peerings." -ForegroundColor Red } - return $virtualNetwork } else { - Write-Host "Virtual network not found." -ForegroundColor Red + Write-Host "Virtual network cannot be found." -ForegroundColor Red Break } } @@ -104,7 +104,7 @@ function SetVirtualNetwork } Catch { - Write-Host "Failed: $_" -ForegroundColor Red + Write-Host "Failed to configure Virtual Network: $_" -ForegroundColor Red } } @@ -189,7 +189,7 @@ If($false -eq $subnets.Contains($managementSubnetName)) SetVirtualNetwork $virtualNetwork Write-Host "Added subnet $managementSubnetName into VNet." -ForegroundColor Green } else { - Write-Host "The subnet $managementSubnetName already exists in the VNet." -ForegroundColor Green + Write-Host "The subnet $managementSubnetName exists in the VNet." -ForegroundColor Green } Write-Host @@ -205,6 +205,6 @@ $templateParameters = @{ administratorLoginPassword = $administratorLoginPassword } -# New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri ($scriptUrlBase+'/azuredeploy.json?t='+ [DateTime]::Now.Ticks) -TemplateParameterObject $templateParameters +New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri ($scriptUrlBase+'/azuredeploy.json?t='+ [DateTime]::Now.Ticks) -TemplateParameterObject $templateParameters -Write-Host "Deployment completed" \ No newline at end of file +Write-Host "Deployment completed." \ No newline at end of file From 3dc307232328ac625f997321e9bf85aa2564fccf Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Tue, 6 Nov 2018 19:30:36 +0100 Subject: [PATCH 13/15] More info messages... --- .../attach-jumpbox/attachJumpbox.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 index 33076d276c..5cf9008e69 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/attachJumpbox.ps1 @@ -78,9 +78,10 @@ function LoadVirtualNetwork { ) Write-Host("Loading virtual network '{0}' in resource group '{1}'." -f $virtualNetworkName, $resourceGroupName) $virtualNetwork = Get-AzureRmVirtualNetwork -ResourceGroupName $resourceGroupName -Name $virtualNetworkName -ErrorAction SilentlyContinue - If($null -ne $virtualNetwork.Id) + $id = $virtualNetwork.Id + If($null -ne $id) { - Write-Host "Virtual network with id $virtualNetwork.Id is loaded." -ForegroundColor Green + Write-Host "Virtual network with id $id is loaded." -ForegroundColor Green If($virtualNetwork.VirtualNetworkPeerings.Count -gt 0) { Write-Host "Virtual network is loaded, but it should not have peerings." -ForegroundColor Red } @@ -88,7 +89,7 @@ function LoadVirtualNetwork { } else { - Write-Host "Virtual network cannot be found." -ForegroundColor Red + Write-Host "Virtual network $virtualNetworkName cannot be found." -ForegroundColor Red Break } } @@ -138,7 +139,7 @@ function ConvertUInt32ToIPAddress function CalculateNextAddressPrefix { param($virtualNetwork, $prefixLength) - Write-Host "Calculating address prefix..." + Write-Host "Calculating address prefix with length $prefixLength..." $startIPAddress = 0 ForEach($addressPrefix in $virtualNetwork.AddressSpace.AddressPrefixes) { From dc09a867c4b5be5928e03c98ab90e795ae8051dd Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Tue, 6 Nov 2018 19:50:14 +0100 Subject: [PATCH 14/15] Update samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json Usign best practice naming conventions from:https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventions#networking --- .../attach-jumpbox/azuredeploy.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json index 7ec540af12..93fa5286db 100644 --- a/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json +++ b/samples/manage/azure-sql-db-managed-instance/attach-jumpbox/azuredeploy.json @@ -42,9 +42,9 @@ }, "variables": { "virtualMachineSize": "Standard_B2s", - "networkInterfaceName": "[concat('nic', parameters('virtualMachineName'))]", - "publicIPAddressName": "[concat('ip', parameters('virtualMachineName'))]", - "networkSecurityGroupName": "[concat('nsg', parameters('virtualMachineName'))]", + "networkInterfaceName": "[concat(parameters('virtualMachineName'),'-nic0')]", + "publicIPAddressName": "[concat(parameters('virtualMachineName'),'-pip')]", + "networkSecurityGroupName": "[concat(parameters('virtualMachineName'),'-nsg')]", "scriptFileUri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/201-sqlmi-new-vnet-w-jumpbox/installSSMS.ps1" }, "resources": [ From 1c25f3cbd126e961567117fdbf8eea51238f8305 Mon Sep 17 00:00:00 2001 From: Jovan Popovic Date: Thu, 8 Nov 2018 09:35:49 +0100 Subject: [PATCH 15/15] Adding YAML definition in WWI OData services --- .../wwi-app/wwi-app.csproj | 11 +- .../wwi-app/wwwroot/OData.tt | 101 + .../wwi-app/wwwroot/OData.yaml | 2302 +++++++++++++++++ 3 files changed, 2404 insertions(+), 10 deletions(-) create mode 100644 samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt create mode 100644 samples/databases/wide-world-importers/wwi-app/wwwroot/OData.yaml diff --git a/samples/databases/wide-world-importers/wwi-app/wwi-app.csproj b/samples/databases/wide-world-importers/wwi-app/wwi-app.csproj index 450eceed2e..912aeeeeba 100644 --- a/samples/databases/wide-world-importers/wwi-app/wwi-app.csproj +++ b/samples/databases/wide-world-importers/wwi-app/wwi-app.csproj @@ -1,4 +1,4 @@ - + netcoreapp2.0 @@ -6,17 +6,8 @@ hrkljush.snk - - - - - - - - - diff --git a/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt b/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt new file mode 100644 index 0000000000..70ee0dc30e --- /dev/null +++ b/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.tt @@ -0,0 +1,101 @@ +<#@ output extension=".yaml"#> +<#@ assembly name="Newtonsoft.Json" #> +<#@ template language="C#" hostspecific="True" #> +<# + var o = Newtonsoft.Json.Linq.JObject.Parse(System.IO.File.ReadAllText(this.Host.ResolvePath("..") + "\\appsettings.json")); + var json = o["ApiModel"].ToString(); + TableDef[] config = Newtonsoft.Json.JsonConvert.DeserializeObject(json); +#> +swagger: "2.0" +info: + description: "OData service exposing information from WideWorldImporters database." + version: "1.0.0" + title: "Wide World Importers" + termsOfService: "http://swagger.io/terms/" + contact: + email: "sqlserversamples@microsoft.com" + license: + name: "Apache 2.0" + url: "http://www.apache.org/licenses/LICENSE-2.0.html" +host: "localhost:64958" +basePath: "/OData" +tags: +<# foreach(var t in config) {#> +<# if(string.IsNullOrEmpty(t.ODataColumns)) continue; #> +- name: "<#= t.Table #>" + description: "Information about <#= t.Table #>" +<# } #> +schemes: +- "https" +- "http" +paths: +<# foreach(var t in config) {#> +<# if(string.IsNullOrEmpty(t.ODataColumns)) continue; #> + + /<#= t.Table #>: + get: + tags: + - "<#= t.Table #>" + summary: "Find information about <#= t.Table #>" + description: "Multiple status values can be provided with comma separated strings" + operationId: "<#= t.Table #>" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum:<# foreach(var c in t.ODataColumns.Split(',')) {#> + - "<#= c #>"<# } #> + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum:<# foreach(var c in t.ODataColumns.Split(',')) {#> + - "<#= c #>" + - "<#= c #> asc" + - "<#= c #> desc"<# } #> + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about <#= t.Table #>." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request"<# } #> +<#+ + public class TableDef { + public string Schema {get; set;} + public string Table {get; set;} + public string ODataColumns {get; set;} + public bool IsReadOnly {get; set;} + } +#> \ No newline at end of file diff --git a/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.yaml b/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.yaml new file mode 100644 index 0000000000..84c5af8dcb --- /dev/null +++ b/samples/databases/wide-world-importers/wwi-app/wwwroot/OData.yaml @@ -0,0 +1,2302 @@ +swagger: "2.0" +info: + description: "OData service exposing information from WideWorldImporters database." + version: "1.0.0" + title: "Wide World Importers" + termsOfService: "http://swagger.io/terms/" + contact: + email: "sqlserversamples@microsoft.com" + license: + name: "Apache 2.0" + url: "http://www.apache.org/licenses/LICENSE-2.0.html" +host: "localhost:64958" +basePath: "/OData" +tags: +- name: "SalesOrders" + description: "Information about SalesOrders" +- name: "SalesOrderLines" + description: "Information about SalesOrderLines" +- name: "PurchaseOrders" + description: "Information about PurchaseOrders" +- name: "PurchaseOrderLines" + description: "Information about PurchaseOrderLines" +- name: "Invoices" + description: "Information about Invoices" +- name: "SpecialDeals" + description: "Information about SpecialDeals" +- name: "CustomerTransactions" + description: "Information about CustomerTransactions" +- name: "SupplierTransactions" + description: "Information about SupplierTransactions" +- name: "Customers" + description: "Information about Customers" +- name: "Suppliers" + description: "Information about Suppliers" +- name: "Countries" + description: "Information about Countries" +- name: "Cities" + description: "Information about Cities" +- name: "StateProvinces" + description: "Information about StateProvinces" +- name: "StockItems" + description: "Information about StockItems" +- name: "PackageTypes" + description: "Information about PackageTypes" +- name: "Colors" + description: "Information about Colors" +- name: "StockGroups" + description: "Information about StockGroups" +- name: "BuyingGroups" + description: "Information about BuyingGroups" +- name: "CustomerCategories" + description: "Information about CustomerCategories" +- name: "SupplierCategories" + description: "Information about SupplierCategories" +- name: "TransactionTypes" + description: "Information about TransactionTypes" +- name: "PaymentMethods" + description: "Information about PaymentMethods" +- name: "DeliveryMethods" + description: "Information about DeliveryMethods" +schemes: +- "https" +- "http" +paths: + + /SalesOrders: + get: + tags: + - "SalesOrders" + summary: "Find information about SalesOrders" + description: "Multiple status values can be provided with comma separated strings" + operationId: "SalesOrders" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "OrderID" + - "OrderDate" + - "CustomerPurchaseOrderNumber" + - "ExpectedDeliveryDate" + - "PickingCompletedWhen" + - "CustomerID" + - "CustomerName" + - "PhoneNumber" + - "FaxNumber" + - "WebsiteURL" + - "DeliveryLocation" + - "SalesPerson" + - "SalesPersonPhone" + - "SalesPersonEmail" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "OrderID" + - "OrderID asc" + - "OrderID desc" + - "OrderDate" + - "OrderDate asc" + - "OrderDate desc" + - "CustomerPurchaseOrderNumber" + - "CustomerPurchaseOrderNumber asc" + - "CustomerPurchaseOrderNumber desc" + - "ExpectedDeliveryDate" + - "ExpectedDeliveryDate asc" + - "ExpectedDeliveryDate desc" + - "PickingCompletedWhen" + - "PickingCompletedWhen asc" + - "PickingCompletedWhen desc" + - "CustomerID" + - "CustomerID asc" + - "CustomerID desc" + - "CustomerName" + - "CustomerName asc" + - "CustomerName desc" + - "PhoneNumber" + - "PhoneNumber asc" + - "PhoneNumber desc" + - "FaxNumber" + - "FaxNumber asc" + - "FaxNumber desc" + - "WebsiteURL" + - "WebsiteURL asc" + - "WebsiteURL desc" + - "DeliveryLocation" + - "DeliveryLocation asc" + - "DeliveryLocation desc" + - "SalesPerson" + - "SalesPerson asc" + - "SalesPerson desc" + - "SalesPersonPhone" + - "SalesPersonPhone asc" + - "SalesPersonPhone desc" + - "SalesPersonEmail" + - "SalesPersonEmail asc" + - "SalesPersonEmail desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about SalesOrders." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /SalesOrderLines: + get: + tags: + - "SalesOrderLines" + summary: "Find information about SalesOrderLines" + description: "Multiple status values can be provided with comma separated strings" + operationId: "SalesOrderLines" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "OrderLineID" + - "OrderID" + - "Description" + - "Quantity" + - "UnitPrice" + - "TaxRate" + - "ProductName" + - "Brand" + - "Size" + - "ColorName" + - "PackageTypeName" + - "PickingCompletedWhen" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "OrderLineID" + - "OrderLineID asc" + - "OrderLineID desc" + - "OrderID" + - "OrderID asc" + - "OrderID desc" + - "Description" + - "Description asc" + - "Description desc" + - "Quantity" + - "Quantity asc" + - "Quantity desc" + - "UnitPrice" + - "UnitPrice asc" + - "UnitPrice desc" + - "TaxRate" + - "TaxRate asc" + - "TaxRate desc" + - "ProductName" + - "ProductName asc" + - "ProductName desc" + - "Brand" + - "Brand asc" + - "Brand desc" + - "Size" + - "Size asc" + - "Size desc" + - "ColorName" + - "ColorName asc" + - "ColorName desc" + - "PackageTypeName" + - "PackageTypeName asc" + - "PackageTypeName desc" + - "PickingCompletedWhen" + - "PickingCompletedWhen asc" + - "PickingCompletedWhen desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about SalesOrderLines." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /PurchaseOrders: + get: + tags: + - "PurchaseOrders" + summary: "Find information about PurchaseOrders" + description: "Multiple status values can be provided with comma separated strings" + operationId: "PurchaseOrders" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "PurchaseOrderID" + - "OrderDate" + - "ExpectedDeliveryDate" + - "SupplierReference" + - "IsOrderFinalized" + - "DeliveryMethodName" + - "ContactName" + - "ContactPhone" + - "ContactFax" + - "ContactEmail" + - "SupplierID" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "PurchaseOrderID" + - "PurchaseOrderID asc" + - "PurchaseOrderID desc" + - "OrderDate" + - "OrderDate asc" + - "OrderDate desc" + - "ExpectedDeliveryDate" + - "ExpectedDeliveryDate asc" + - "ExpectedDeliveryDate desc" + - "SupplierReference" + - "SupplierReference asc" + - "SupplierReference desc" + - "IsOrderFinalized" + - "IsOrderFinalized asc" + - "IsOrderFinalized desc" + - "DeliveryMethodName" + - "DeliveryMethodName asc" + - "DeliveryMethodName desc" + - "ContactName" + - "ContactName asc" + - "ContactName desc" + - "ContactPhone" + - "ContactPhone asc" + - "ContactPhone desc" + - "ContactFax" + - "ContactFax asc" + - "ContactFax desc" + - "ContactEmail" + - "ContactEmail asc" + - "ContactEmail desc" + - "SupplierID" + - "SupplierID asc" + - "SupplierID desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about PurchaseOrders." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /PurchaseOrderLines: + get: + tags: + - "PurchaseOrderLines" + summary: "Find information about PurchaseOrderLines" + description: "Multiple status values can be provided with comma separated strings" + operationId: "PurchaseOrderLines" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "PurchaseOrderLineID" + - "PurchaseOrderID" + - "Description" + - "IsOrderLineFinalized" + - "ProductName" + - "Brand" + - "Size" + - "ColorName" + - "PackageTypeName" + - "OrderedOuters" + - "ReceivedOuters" + - "ExpectedUnitPricePerOuter" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "PurchaseOrderLineID" + - "PurchaseOrderLineID asc" + - "PurchaseOrderLineID desc" + - "PurchaseOrderID" + - "PurchaseOrderID asc" + - "PurchaseOrderID desc" + - "Description" + - "Description asc" + - "Description desc" + - "IsOrderLineFinalized" + - "IsOrderLineFinalized asc" + - "IsOrderLineFinalized desc" + - "ProductName" + - "ProductName asc" + - "ProductName desc" + - "Brand" + - "Brand asc" + - "Brand desc" + - "Size" + - "Size asc" + - "Size desc" + - "ColorName" + - "ColorName asc" + - "ColorName desc" + - "PackageTypeName" + - "PackageTypeName asc" + - "PackageTypeName desc" + - "OrderedOuters" + - "OrderedOuters asc" + - "OrderedOuters desc" + - "ReceivedOuters" + - "ReceivedOuters asc" + - "ReceivedOuters desc" + - "ExpectedUnitPricePerOuter" + - "ExpectedUnitPricePerOuter asc" + - "ExpectedUnitPricePerOuter desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about PurchaseOrderLines." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /Invoices: + get: + tags: + - "Invoices" + summary: "Find information about Invoices" + description: "Multiple status values can be provided with comma separated strings" + operationId: "Invoices" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "InvoiceID" + - "InvoiceDate" + - "CustomerPurchaseOrderNumber" + - "IsCreditNote" + - "TotalDryItems" + - "TotalChillerItems" + - "DeliveryRun" + - "RunPosition" + - "ReturnedDeliveryData" + - "ConfirmedDeliveryTime" + - "ConfirmedReceivedBy" + - "CustomerName" + - "SalesPersonName" + - "ContactName" + - "ContactPhone" + - "ContactEmail" + - "SalesPersonEmail" + - "DeliveryMethodName" + - "CustomerID" + - "OrderID" + - "DeliveryMethodID" + - "ContactPersonID" + - "AccountsPersonID" + - "SalespersonPersonID" + - "PackedByPersonID" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "InvoiceID" + - "InvoiceID asc" + - "InvoiceID desc" + - "InvoiceDate" + - "InvoiceDate asc" + - "InvoiceDate desc" + - "CustomerPurchaseOrderNumber" + - "CustomerPurchaseOrderNumber asc" + - "CustomerPurchaseOrderNumber desc" + - "IsCreditNote" + - "IsCreditNote asc" + - "IsCreditNote desc" + - "TotalDryItems" + - "TotalDryItems asc" + - "TotalDryItems desc" + - "TotalChillerItems" + - "TotalChillerItems asc" + - "TotalChillerItems desc" + - "DeliveryRun" + - "DeliveryRun asc" + - "DeliveryRun desc" + - "RunPosition" + - "RunPosition asc" + - "RunPosition desc" + - "ReturnedDeliveryData" + - "ReturnedDeliveryData asc" + - "ReturnedDeliveryData desc" + - "ConfirmedDeliveryTime" + - "ConfirmedDeliveryTime asc" + - "ConfirmedDeliveryTime desc" + - "ConfirmedReceivedBy" + - "ConfirmedReceivedBy asc" + - "ConfirmedReceivedBy desc" + - "CustomerName" + - "CustomerName asc" + - "CustomerName desc" + - "SalesPersonName" + - "SalesPersonName asc" + - "SalesPersonName desc" + - "ContactName" + - "ContactName asc" + - "ContactName desc" + - "ContactPhone" + - "ContactPhone asc" + - "ContactPhone desc" + - "ContactEmail" + - "ContactEmail asc" + - "ContactEmail desc" + - "SalesPersonEmail" + - "SalesPersonEmail asc" + - "SalesPersonEmail desc" + - "DeliveryMethodName" + - "DeliveryMethodName asc" + - "DeliveryMethodName desc" + - "CustomerID" + - "CustomerID asc" + - "CustomerID desc" + - "OrderID" + - "OrderID asc" + - "OrderID desc" + - "DeliveryMethodID" + - "DeliveryMethodID asc" + - "DeliveryMethodID desc" + - "ContactPersonID" + - "ContactPersonID asc" + - "ContactPersonID desc" + - "AccountsPersonID" + - "AccountsPersonID asc" + - "AccountsPersonID desc" + - "SalespersonPersonID" + - "SalespersonPersonID asc" + - "SalespersonPersonID desc" + - "PackedByPersonID" + - "PackedByPersonID asc" + - "PackedByPersonID desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about Invoices." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /SpecialDeals: + get: + tags: + - "SpecialDeals" + summary: "Find information about SpecialDeals" + description: "Multiple status values can be provided with comma separated strings" + operationId: "SpecialDeals" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "SpecialDealID" + - "DealDescription" + - "StartDate" + - "EndDate" + - "DiscountAmount" + - "DiscountPercentage" + - "UnitPrice" + - "StockItemName" + - "Brand" + - "Size" + - "CustomerName" + - "BuyingGroupName" + - "CustomerCategoryName" + - "StockItemID" + - "CustomerID" + - "BuyingGroupID" + - "CustomerCategoryID" + - "StockGroupID" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "SpecialDealID" + - "SpecialDealID asc" + - "SpecialDealID desc" + - "DealDescription" + - "DealDescription asc" + - "DealDescription desc" + - "StartDate" + - "StartDate asc" + - "StartDate desc" + - "EndDate" + - "EndDate asc" + - "EndDate desc" + - "DiscountAmount" + - "DiscountAmount asc" + - "DiscountAmount desc" + - "DiscountPercentage" + - "DiscountPercentage asc" + - "DiscountPercentage desc" + - "UnitPrice" + - "UnitPrice asc" + - "UnitPrice desc" + - "StockItemName" + - "StockItemName asc" + - "StockItemName desc" + - "Brand" + - "Brand asc" + - "Brand desc" + - "Size" + - "Size asc" + - "Size desc" + - "CustomerName" + - "CustomerName asc" + - "CustomerName desc" + - "BuyingGroupName" + - "BuyingGroupName asc" + - "BuyingGroupName desc" + - "CustomerCategoryName" + - "CustomerCategoryName asc" + - "CustomerCategoryName desc" + - "StockItemID" + - "StockItemID asc" + - "StockItemID desc" + - "CustomerID" + - "CustomerID asc" + - "CustomerID desc" + - "BuyingGroupID" + - "BuyingGroupID asc" + - "BuyingGroupID desc" + - "CustomerCategoryID" + - "CustomerCategoryID asc" + - "CustomerCategoryID desc" + - "StockGroupID" + - "StockGroupID asc" + - "StockGroupID desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about SpecialDeals." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /CustomerTransactions: + get: + tags: + - "CustomerTransactions" + summary: "Find information about CustomerTransactions" + description: "Multiple status values can be provided with comma separated strings" + operationId: "CustomerTransactions" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "CustomerTransactionID" + - "TransactionDate" + - "AmountExcludingTax" + - "TaxAmount" + - "TransactionAmount" + - "OutstandingBalance" + - "FinalizationDate" + - "IsFinalized" + - "CustomerName" + - "TransactionTypeName" + - "InvoiceDate" + - "CustomerPurchaseOrderNumber" + - "PaymentMethodName" + - "CustomerID" + - "TransactionTypeID" + - "InvoiceID" + - "PaymentMethodID" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "CustomerTransactionID" + - "CustomerTransactionID asc" + - "CustomerTransactionID desc" + - "TransactionDate" + - "TransactionDate asc" + - "TransactionDate desc" + - "AmountExcludingTax" + - "AmountExcludingTax asc" + - "AmountExcludingTax desc" + - "TaxAmount" + - "TaxAmount asc" + - "TaxAmount desc" + - "TransactionAmount" + - "TransactionAmount asc" + - "TransactionAmount desc" + - "OutstandingBalance" + - "OutstandingBalance asc" + - "OutstandingBalance desc" + - "FinalizationDate" + - "FinalizationDate asc" + - "FinalizationDate desc" + - "IsFinalized" + - "IsFinalized asc" + - "IsFinalized desc" + - "CustomerName" + - "CustomerName asc" + - "CustomerName desc" + - "TransactionTypeName" + - "TransactionTypeName asc" + - "TransactionTypeName desc" + - "InvoiceDate" + - "InvoiceDate asc" + - "InvoiceDate desc" + - "CustomerPurchaseOrderNumber" + - "CustomerPurchaseOrderNumber asc" + - "CustomerPurchaseOrderNumber desc" + - "PaymentMethodName" + - "PaymentMethodName asc" + - "PaymentMethodName desc" + - "CustomerID" + - "CustomerID asc" + - "CustomerID desc" + - "TransactionTypeID" + - "TransactionTypeID asc" + - "TransactionTypeID desc" + - "InvoiceID" + - "InvoiceID asc" + - "InvoiceID desc" + - "PaymentMethodID" + - "PaymentMethodID asc" + - "PaymentMethodID desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about CustomerTransactions." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /SupplierTransactions: + get: + tags: + - "SupplierTransactions" + summary: "Find information about SupplierTransactions" + description: "Multiple status values can be provided with comma separated strings" + operationId: "SupplierTransactions" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "SupplierTransactionID" + - "TransactionDate" + - "AmountExcludingTax" + - "TaxAmount" + - "TransactionAmount" + - "OutstandingBalance" + - "FinalizationDate" + - "IsFinalized" + - "SupplierName" + - "TransactionTypeName" + - "PaymentMethodName" + - "SupplierID" + - "TransactionTypeID" + - "PurchaseOrderID" + - "PaymentMethodID" + - "OrderDate" + - "IsOrderFinalized" + - "ExpectedDeliveryDate" + - "SupplierReference" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "SupplierTransactionID" + - "SupplierTransactionID asc" + - "SupplierTransactionID desc" + - "TransactionDate" + - "TransactionDate asc" + - "TransactionDate desc" + - "AmountExcludingTax" + - "AmountExcludingTax asc" + - "AmountExcludingTax desc" + - "TaxAmount" + - "TaxAmount asc" + - "TaxAmount desc" + - "TransactionAmount" + - "TransactionAmount asc" + - "TransactionAmount desc" + - "OutstandingBalance" + - "OutstandingBalance asc" + - "OutstandingBalance desc" + - "FinalizationDate" + - "FinalizationDate asc" + - "FinalizationDate desc" + - "IsFinalized" + - "IsFinalized asc" + - "IsFinalized desc" + - "SupplierName" + - "SupplierName asc" + - "SupplierName desc" + - "TransactionTypeName" + - "TransactionTypeName asc" + - "TransactionTypeName desc" + - "PaymentMethodName" + - "PaymentMethodName asc" + - "PaymentMethodName desc" + - "SupplierID" + - "SupplierID asc" + - "SupplierID desc" + - "TransactionTypeID" + - "TransactionTypeID asc" + - "TransactionTypeID desc" + - "PurchaseOrderID" + - "PurchaseOrderID asc" + - "PurchaseOrderID desc" + - "PaymentMethodID" + - "PaymentMethodID asc" + - "PaymentMethodID desc" + - "OrderDate" + - "OrderDate asc" + - "OrderDate desc" + - "IsOrderFinalized" + - "IsOrderFinalized asc" + - "IsOrderFinalized desc" + - "ExpectedDeliveryDate" + - "ExpectedDeliveryDate asc" + - "ExpectedDeliveryDate desc" + - "SupplierReference" + - "SupplierReference asc" + - "SupplierReference desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about SupplierTransactions." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /Customers: + get: + tags: + - "Customers" + summary: "Find information about Customers" + description: "Multiple status values can be provided with comma separated strings" + operationId: "Customers" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "CustomerID" + - "CustomerName" + - "AccountOpenedDate" + - "CustomerCategoryName" + - "PrimaryContact" + - "AlternateContact" + - "PhoneNumber" + - "FaxNumber" + - "WebsiteURL" + - "PostalAddressLine1" + - "PostalAddressLine2" + - "PostalCity" + - "PostalCityID" + - "PostalPostalCode" + - "CreditLimit" + - "IsOnCreditHold" + - "IsStatementSent" + - "PaymentDays" + - "RunPosition" + - "StandardDiscountPercentage" + - "BuyingGroupName" + - "DeliveryLocation" + - "BuyingGroupID" + - "BillToCustomerID" + - "CustomerCategoryID" + - "PrimaryContactPersonID" + - "AlternateContactPersonID" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "CustomerID" + - "CustomerID asc" + - "CustomerID desc" + - "CustomerName" + - "CustomerName asc" + - "CustomerName desc" + - "AccountOpenedDate" + - "AccountOpenedDate asc" + - "AccountOpenedDate desc" + - "CustomerCategoryName" + - "CustomerCategoryName asc" + - "CustomerCategoryName desc" + - "PrimaryContact" + - "PrimaryContact asc" + - "PrimaryContact desc" + - "AlternateContact" + - "AlternateContact asc" + - "AlternateContact desc" + - "PhoneNumber" + - "PhoneNumber asc" + - "PhoneNumber desc" + - "FaxNumber" + - "FaxNumber asc" + - "FaxNumber desc" + - "WebsiteURL" + - "WebsiteURL asc" + - "WebsiteURL desc" + - "PostalAddressLine1" + - "PostalAddressLine1 asc" + - "PostalAddressLine1 desc" + - "PostalAddressLine2" + - "PostalAddressLine2 asc" + - "PostalAddressLine2 desc" + - "PostalCity" + - "PostalCity asc" + - "PostalCity desc" + - "PostalCityID" + - "PostalCityID asc" + - "PostalCityID desc" + - "PostalPostalCode" + - "PostalPostalCode asc" + - "PostalPostalCode desc" + - "CreditLimit" + - "CreditLimit asc" + - "CreditLimit desc" + - "IsOnCreditHold" + - "IsOnCreditHold asc" + - "IsOnCreditHold desc" + - "IsStatementSent" + - "IsStatementSent asc" + - "IsStatementSent desc" + - "PaymentDays" + - "PaymentDays asc" + - "PaymentDays desc" + - "RunPosition" + - "RunPosition asc" + - "RunPosition desc" + - "StandardDiscountPercentage" + - "StandardDiscountPercentage asc" + - "StandardDiscountPercentage desc" + - "BuyingGroupName" + - "BuyingGroupName asc" + - "BuyingGroupName desc" + - "DeliveryLocation" + - "DeliveryLocation asc" + - "DeliveryLocation desc" + - "BuyingGroupID" + - "BuyingGroupID asc" + - "BuyingGroupID desc" + - "BillToCustomerID" + - "BillToCustomerID asc" + - "BillToCustomerID desc" + - "CustomerCategoryID" + - "CustomerCategoryID asc" + - "CustomerCategoryID desc" + - "PrimaryContactPersonID" + - "PrimaryContactPersonID asc" + - "PrimaryContactPersonID desc" + - "AlternateContactPersonID" + - "AlternateContactPersonID asc" + - "AlternateContactPersonID desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about Customers." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /Suppliers: + get: + tags: + - "Suppliers" + summary: "Find information about Suppliers" + description: "Multiple status values can be provided with comma separated strings" + operationId: "Suppliers" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "SupplierID" + - "SupplierName" + - "SupplierCategoryName" + - "PrimaryContact" + - "AlternateContact" + - "PhoneNumber" + - "FaxNumber" + - "WebsiteURL" + - "SupplierReference" + - "DeliveryLocation" + - "BankAccountName" + - "BankAccountBranch" + - "BankAccountCode" + - "BankAccountNumber" + - "BankInternationalCode" + - "PostalAddressLine1" + - "PostalAddressLine2" + - "PostalPostalCode" + - "PaymentDays" + - "SupplierCategoryID" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "SupplierID" + - "SupplierID asc" + - "SupplierID desc" + - "SupplierName" + - "SupplierName asc" + - "SupplierName desc" + - "SupplierCategoryName" + - "SupplierCategoryName asc" + - "SupplierCategoryName desc" + - "PrimaryContact" + - "PrimaryContact asc" + - "PrimaryContact desc" + - "AlternateContact" + - "AlternateContact asc" + - "AlternateContact desc" + - "PhoneNumber" + - "PhoneNumber asc" + - "PhoneNumber desc" + - "FaxNumber" + - "FaxNumber asc" + - "FaxNumber desc" + - "WebsiteURL" + - "WebsiteURL asc" + - "WebsiteURL desc" + - "SupplierReference" + - "SupplierReference asc" + - "SupplierReference desc" + - "DeliveryLocation" + - "DeliveryLocation asc" + - "DeliveryLocation desc" + - "BankAccountName" + - "BankAccountName asc" + - "BankAccountName desc" + - "BankAccountBranch" + - "BankAccountBranch asc" + - "BankAccountBranch desc" + - "BankAccountCode" + - "BankAccountCode asc" + - "BankAccountCode desc" + - "BankAccountNumber" + - "BankAccountNumber asc" + - "BankAccountNumber desc" + - "BankInternationalCode" + - "BankInternationalCode asc" + - "BankInternationalCode desc" + - "PostalAddressLine1" + - "PostalAddressLine1 asc" + - "PostalAddressLine1 desc" + - "PostalAddressLine2" + - "PostalAddressLine2 asc" + - "PostalAddressLine2 desc" + - "PostalPostalCode" + - "PostalPostalCode asc" + - "PostalPostalCode desc" + - "PaymentDays" + - "PaymentDays asc" + - "PaymentDays desc" + - "SupplierCategoryID" + - "SupplierCategoryID asc" + - "SupplierCategoryID desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about Suppliers." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /Countries: + get: + tags: + - "Countries" + summary: "Find information about Countries" + description: "Multiple status values can be provided with comma separated strings" + operationId: "Countries" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "CountryID" + - "CountryName" + - "FormalName" + - "IsoAlpha3Code" + - "IsoNumericCode" + - "CountryType" + - "LatestRecordedPopulation" + - "Continent" + - "Region" + - "Subregion" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "CountryID" + - "CountryID asc" + - "CountryID desc" + - "CountryName" + - "CountryName asc" + - "CountryName desc" + - "FormalName" + - "FormalName asc" + - "FormalName desc" + - "IsoAlpha3Code" + - "IsoAlpha3Code asc" + - "IsoAlpha3Code desc" + - "IsoNumericCode" + - "IsoNumericCode asc" + - "IsoNumericCode desc" + - "CountryType" + - "CountryType asc" + - "CountryType desc" + - "LatestRecordedPopulation" + - "LatestRecordedPopulation asc" + - "LatestRecordedPopulation desc" + - "Continent" + - "Continent asc" + - "Continent desc" + - "Region" + - "Region asc" + - "Region desc" + - "Subregion" + - "Subregion asc" + - "Subregion desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about Countries." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /Cities: + get: + tags: + - "Cities" + summary: "Find information about Cities" + description: "Multiple status values can be provided with comma separated strings" + operationId: "Cities" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "CityID" + - "CityName" + - "StateProvinceID" + - "LatestRecordedPopulation" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "CityID" + - "CityID asc" + - "CityID desc" + - "CityName" + - "CityName asc" + - "CityName desc" + - "StateProvinceID" + - "StateProvinceID asc" + - "StateProvinceID desc" + - "LatestRecordedPopulation" + - "LatestRecordedPopulation asc" + - "LatestRecordedPopulation desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about Cities." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /StateProvinces: + get: + tags: + - "StateProvinces" + summary: "Find information about StateProvinces" + description: "Multiple status values can be provided with comma separated strings" + operationId: "StateProvinces" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "StateProvinceID" + - "StateProvinceCode" + - "StateProvinceName" + - "CountryID" + - "SalesTerritory" + - "LatestRecordedPopulation" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "StateProvinceID" + - "StateProvinceID asc" + - "StateProvinceID desc" + - "StateProvinceCode" + - "StateProvinceCode asc" + - "StateProvinceCode desc" + - "StateProvinceName" + - "StateProvinceName asc" + - "StateProvinceName desc" + - "CountryID" + - "CountryID asc" + - "CountryID desc" + - "SalesTerritory" + - "SalesTerritory asc" + - "SalesTerritory desc" + - "LatestRecordedPopulation" + - "LatestRecordedPopulation asc" + - "LatestRecordedPopulation desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about StateProvinces." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /StockItems: + get: + tags: + - "StockItems" + summary: "Find information about StockItems" + description: "Multiple status values can be provided with comma separated strings" + operationId: "StockItems" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "StockItemID" + - "StockItemName" + - "SupplierName" + - "SupplierReference" + - "ColorName" + - "OuterPackage" + - "UnitPackage" + - "Brand" + - "Size" + - "LeadTimeDays" + - "QuantityPerOuter" + - "IsChillerStock" + - "Barcode" + - "TaxRate" + - "UnitPrice" + - "RecommendedRetailPrice" + - "TypicalWeightPerUnit" + - "MarketingComments" + - "InternalComments" + - "CustomFields" + - "QuantityOnHand" + - "BinLocation" + - "LastStocktakeQuantity" + - "LastCostPrice" + - "ReorderLevel" + - "TargetStockLevel" + - "SupplierID" + - "ColorID" + - "UnitPackageID" + - "OuterPackageID" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "StockItemID" + - "StockItemID asc" + - "StockItemID desc" + - "StockItemName" + - "StockItemName asc" + - "StockItemName desc" + - "SupplierName" + - "SupplierName asc" + - "SupplierName desc" + - "SupplierReference" + - "SupplierReference asc" + - "SupplierReference desc" + - "ColorName" + - "ColorName asc" + - "ColorName desc" + - "OuterPackage" + - "OuterPackage asc" + - "OuterPackage desc" + - "UnitPackage" + - "UnitPackage asc" + - "UnitPackage desc" + - "Brand" + - "Brand asc" + - "Brand desc" + - "Size" + - "Size asc" + - "Size desc" + - "LeadTimeDays" + - "LeadTimeDays asc" + - "LeadTimeDays desc" + - "QuantityPerOuter" + - "QuantityPerOuter asc" + - "QuantityPerOuter desc" + - "IsChillerStock" + - "IsChillerStock asc" + - "IsChillerStock desc" + - "Barcode" + - "Barcode asc" + - "Barcode desc" + - "TaxRate" + - "TaxRate asc" + - "TaxRate desc" + - "UnitPrice" + - "UnitPrice asc" + - "UnitPrice desc" + - "RecommendedRetailPrice" + - "RecommendedRetailPrice asc" + - "RecommendedRetailPrice desc" + - "TypicalWeightPerUnit" + - "TypicalWeightPerUnit asc" + - "TypicalWeightPerUnit desc" + - "MarketingComments" + - "MarketingComments asc" + - "MarketingComments desc" + - "InternalComments" + - "InternalComments asc" + - "InternalComments desc" + - "CustomFields" + - "CustomFields asc" + - "CustomFields desc" + - "QuantityOnHand" + - "QuantityOnHand asc" + - "QuantityOnHand desc" + - "BinLocation" + - "BinLocation asc" + - "BinLocation desc" + - "LastStocktakeQuantity" + - "LastStocktakeQuantity asc" + - "LastStocktakeQuantity desc" + - "LastCostPrice" + - "LastCostPrice asc" + - "LastCostPrice desc" + - "ReorderLevel" + - "ReorderLevel asc" + - "ReorderLevel desc" + - "TargetStockLevel" + - "TargetStockLevel asc" + - "TargetStockLevel desc" + - "SupplierID" + - "SupplierID asc" + - "SupplierID desc" + - "ColorID" + - "ColorID asc" + - "ColorID desc" + - "UnitPackageID" + - "UnitPackageID asc" + - "UnitPackageID desc" + - "OuterPackageID" + - "OuterPackageID asc" + - "OuterPackageID desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about StockItems." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /PackageTypes: + get: + tags: + - "PackageTypes" + summary: "Find information about PackageTypes" + description: "Multiple status values can be provided with comma separated strings" + operationId: "PackageTypes" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "PackageTypeID" + - "PackageTypeName" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "PackageTypeID" + - "PackageTypeID asc" + - "PackageTypeID desc" + - "PackageTypeName" + - "PackageTypeName asc" + - "PackageTypeName desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about PackageTypes." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /Colors: + get: + tags: + - "Colors" + summary: "Find information about Colors" + description: "Multiple status values can be provided with comma separated strings" + operationId: "Colors" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "ColorID" + - "ColorName" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "ColorID" + - "ColorID asc" + - "ColorID desc" + - "ColorName" + - "ColorName asc" + - "ColorName desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about Colors." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /StockGroups: + get: + tags: + - "StockGroups" + summary: "Find information about StockGroups" + description: "Multiple status values can be provided with comma separated strings" + operationId: "StockGroups" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "StockGroupID" + - "StockGroupName" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "StockGroupID" + - "StockGroupID asc" + - "StockGroupID desc" + - "StockGroupName" + - "StockGroupName asc" + - "StockGroupName desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about StockGroups." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /BuyingGroups: + get: + tags: + - "BuyingGroups" + summary: "Find information about BuyingGroups" + description: "Multiple status values can be provided with comma separated strings" + operationId: "BuyingGroups" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "BuyingGroupID" + - "BuyingGroupName" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "BuyingGroupID" + - "BuyingGroupID asc" + - "BuyingGroupID desc" + - "BuyingGroupName" + - "BuyingGroupName asc" + - "BuyingGroupName desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about BuyingGroups." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /CustomerCategories: + get: + tags: + - "CustomerCategories" + summary: "Find information about CustomerCategories" + description: "Multiple status values can be provided with comma separated strings" + operationId: "CustomerCategories" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "CustomerCategoryID" + - "CustomerCategoryName" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "CustomerCategoryID" + - "CustomerCategoryID asc" + - "CustomerCategoryID desc" + - "CustomerCategoryName" + - "CustomerCategoryName asc" + - "CustomerCategoryName desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about CustomerCategories." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /SupplierCategories: + get: + tags: + - "SupplierCategories" + summary: "Find information about SupplierCategories" + description: "Multiple status values can be provided with comma separated strings" + operationId: "SupplierCategories" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "SupplierCategoryID" + - "SupplierCategoryName" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "SupplierCategoryID" + - "SupplierCategoryID asc" + - "SupplierCategoryID desc" + - "SupplierCategoryName" + - "SupplierCategoryName asc" + - "SupplierCategoryName desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about SupplierCategories." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /TransactionTypes: + get: + tags: + - "TransactionTypes" + summary: "Find information about TransactionTypes" + description: "Multiple status values can be provided with comma separated strings" + operationId: "TransactionTypes" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "TransactionTypeID" + - "TransactionTypeName" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "TransactionTypeID" + - "TransactionTypeID asc" + - "TransactionTypeID desc" + - "TransactionTypeName" + - "TransactionTypeName asc" + - "TransactionTypeName desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about TransactionTypes." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /PaymentMethods: + get: + tags: + - "PaymentMethods" + summary: "Find information about PaymentMethods" + description: "Multiple status values can be provided with comma separated strings" + operationId: "PaymentMethods" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "PaymentMethodID" + - "PaymentMethodName" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "PaymentMethodID" + - "PaymentMethodID asc" + - "PaymentMethodID desc" + - "PaymentMethodName" + - "PaymentMethodName asc" + - "PaymentMethodName desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about PaymentMethods." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" + /DeliveryMethods: + get: + tags: + - "DeliveryMethods" + summary: "Find information about DeliveryMethods" + description: "Multiple status values can be provided with comma separated strings" + operationId: "DeliveryMethods" + produces: + - "application/json" + parameters: + - name: "$select" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "array" + items: + type: "string" + enum: + - "DeliveryMethodID" + - "DeliveryMethodName" + collectionFormat: "multi" + - name: "$orderby" + in: "query" + description: "Ordering results by properties" + required: false + type: "array" + items: + type: "string" + enum: + - "DeliveryMethodID" + - "DeliveryMethodID asc" + - "DeliveryMethodID desc" + - "DeliveryMethodName" + - "DeliveryMethodName asc" + - "DeliveryMethodName desc" + collectionFormat: "multi" + - name: "$top" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$skip" + in: "query" + description: "Selecting the properties that should be returned by service" + required: false + type: "integer" + - name: "$apply" + in: "query" + description: "aggregation function that should be applied on the results" + required: false + type: "string" + - name: "$filter" + in: "query" + description: "Condition that returned items must satisfy" + required: false + type: "string" + responses: + 200: + description: "Provided information about DeliveryMethods." + 400: + description: "The OData request is not valid" + 500: + description: "Cannot process request" \ No newline at end of file