PowerShell module to integrate with Barium Live API.
- PowerShell 3.0
| Function | Description |
|---|---|
Get-BariumToken |
Post login details to authenticate user |
Get-BariumList |
Get all lists |
Get-BariumObject |
Get information about objects, such as forms, files and folders |
Edit-BariumObject |
Edit information about objects, such as forms, files and folders |
Import-Module .\Barium.psm1
$settings = @{
Uri = 'https://live.barium.se/api/v1.0'
}$token = Get-BariumToken -Uri $settings.Uri -UserName 'uu@domain.se' -ApiKey '2a699363-f2b7-4ebf-8fe1-82b9ab7062bf' -Password 'pw1'If the '-Data' parameter is set, all data will be displayed. Otherwise, it's just the list.
$list = Get-BariumList -Uri $settings.Uri -Token $token -List 'd4463ae9-a50a-49ab-9160-80c60637c78d' -DataOr you can use this row to fetch all lists.
$list = Get-BariumList -Uri $settings.Uri -Token $token$object = Get-BariumObject -Uri $settings.Uri -Token $token -List $list.'form.formId'$object.Data | Select-Object Name, ValueThis will return the current values, etc samAccountName: user1 from the list.
$values = @{
samAccountName = 'USX1'
Password = 'Random'
}This item above updates 'samAccountName' and 'Password' with new values.
Edit-BariumObject -Uri $settings.Uri -Token $token -List $list.'form.formId' -Values $values