$username = "username"
$password = "password"
$apiUrl = "https://apiurl.com"
# Create the authentication header
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("${username}:${password}")))
$headers = @{
Authorization = "Basic $base64AuthInfo"
}
# Make the API call
$response = Invoke-RestMethod -Uri $apiUrl -Method Get -Headers $headers
# Process the response (assuming JSON response)
$responseData = $response | ConvertTo-Json | ConvertFrom-Json
# Export the results to a CSV file
$responseData | Export-Csv -Path "C:UserstestDesktopacd automationapioutput.csv" -NoTypeInformation
Using above powershell. But I am getting the data count output. I am looking for actually data with row and coloum