![]() |
VOOZH | about |
The CData Cmdlets Module for Aha! is a standard PowerShell module offering straightforward integration with Aha!. Below, you will find examples of using our API Cmdlets with native PowerShell cmdlets.
Start by setting the Profile connection property to the location of the Aha! Profile on disk (e.g. C:\profiles\aha.apip). Next, set the ProfileSettings connection property to the connection string for Aha! (see below).
The Aha! API uses OAuth-based authentication.
You will first need to register an OAuth app with Aha!. This can be done from your Aha! account under 'Settings' > 'Personal' > 'Developer' > 'OAuth Applications'. Additionally, set the Domain, found in the domain name of your Aha account. For example if your Aha account is acmeinc.aha.io, then the Domain should be 'acmeinc'.
After setting the following in the connection string, you are ready to connect:
$conn = Connect-API -Profile "$Profile" -ProfileSettings "$ProfileSettings" -Authscheme "$Authscheme" -OAuthClientId "$OAuthClientId" -OAuthClientSecret "$OAuthClientSecret" -CallbackUrl "$CallbackUrl"
Follow the steps below to retrieve data from the Ideas table and pipe the result into to a CSV file:
Select-API -Connection $conn -Table Ideas | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myIdeasData.csv -NoTypeInformation
You will notice that we piped the results from Select-API into a Select-Object cmdlet and excluded some properties before piping them into an Export-Csv cmdlet. We do this because the CData Cmdlets append Connection, Table, and Columns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file.
The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the CData Cmdlets directly into another one.Connect to live data from Aha! with the API Driver
Connect to Aha!