Skip to content

Instantly share code, notes, and snippets.

Last active December 16, 2022 22:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?

VSI 5 Business Unit Forecast by Data Center Export

This REST api call allows you to export your company's business unit forecast by data center. You need to send an HTTP POST to along with the folloing parameters in JSON format:

export_format : "json" or "csv" request_date : formatted as mm-dd-yyyy such as 11-04-2022 request_user : the email address you use to login to VSI request_password : the password you use to login to VSI

In this gist, we have a curl script, a PowerShell script, and a Python 3 script to help with automated retrieval.

curl --location --request POST '' \
--header 'Content-Type: application/json' \
--data-raw '{
"export_format": "json",
"request_date": "11-04-2022",
"request_user": "your email here",
"request_password": "your password here"
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$body = "{
`n `"export_format`": `"json`",
`n `"request_date`": `"10-31-2022`",
`n `"request_user`": `"your email address here`",
`n `"request_password`": `"your password here`"
$response = Invoke-RestMethod '' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
import http.client
import json
conn = http.client.HTTPSConnection("")
payload = json.dumps({
"export_format": "json",
"request_date": "10-31-2022",
"request_user": "your email here",
"request_password": "your password here"
headers = {
'Content-Type': 'application/json'
conn.request("POST", "/api/export/v1/get_bu_forecasting", payload, headers)
res = conn.getresponse()
data =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment