Skip to main content
Solved

Powershell - communicate with Indicium


Forum|alt.badge.img

We would like to communicate with the indicium service using powershell. Does anyone have a sample script for me?

Best answer by Dick van den Brink

Hi Marc,

Below you can find a small example.

Let me know if it works out for you!
you can find more information about the api usage here: OData API | Thinkwise Documentation

But of course you can also use the Universal UI and open the browser developer tools to get insights.

 

$apiUrl = "https://<url>/indicium/iam/<appl_id>/<tablenane>?`$top=10"

$username = "<username>"
$password = "<password>"

$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("${username}:${password}"))

$headers = @{
    Authorization = "Basic $base64AuthInfo"
    Accept        = "application/json"
}

$response = Invoke-RestMethod -Uri $apiUrl -Headers $headers -Method Get

Write-Host "Number of items:" + $response.value.Count
Write-Host "Response received from API:" + $response.value[0].titel

 

 

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+3

Hi Marc,

Below you can find a small example.

Let me know if it works out for you!
you can find more information about the api usage here: OData API | Thinkwise Documentation

But of course you can also use the Universal UI and open the browser developer tools to get insights.

 

$apiUrl = "https://<url>/indicium/iam/<appl_id>/<tablenane>?`$top=10"

$username = "<username>"
$password = "<password>"

$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("${username}:${password}"))

$headers = @{
    Authorization = "Basic $base64AuthInfo"
    Accept        = "application/json"
}

$response = Invoke-RestMethod -Uri $apiUrl -Headers $headers -Method Get

Write-Host "Number of items:" + $response.value.Count
Write-Host "Response received from API:" + $response.value[0].titel

 

 


Jeroen van den Belt
Administrator
Forum|alt.badge.img+9

Hi ​@Marc ter Mors,

Did this help, or do you require further assistance?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings