TestCaseExecutions.TestCaseExecutionAttachments - always empty?

I’m on Orchstrator version 2021.10.4

I’m building a simple TestCase report and try to verify TestCaseExecutions via the API.

I like to check if there are any screenShots attached (at all). I don’t care about the actual file/content at this point - just to check: is the “TestCaseExecutionAttachments” DTO populated or not?

My problem → TestCaseExecutionAttachments is always empty, even when there is media available. Is this by Design or am I doing something wrong?

Comparing how uiPath Orch does it,
I can see, via the browsers web tool (F12), that uiPath Orch web makes a 2nd additional call to:

If there is no data, the uiPath web GUI catch that exception and that’s how it is able to show “no ScreenShots”. But - I don’t want to pull files for 500 Test Case, just to check if there is a file or not…

My powerShell function below

function uiPath_odata_TestCaseExecutions {

$Method = "GET"

$StartDateTime = $StartDateTime.AddSeconds(2); ##bug on the API "greater then" includes the same second.

[string]$str_StartTime = $StartDateTime.ToString('yyyy-MM-ddTHH:mm:ss.fffZ')
[string]$str_EndTime   = $EndDateTime.ToString('yyyy-MM-ddTHH:mm:ss.fffZ')
$filter = "((StartTime gt $str_StartTime) and (EndTime le $str_EndTime))"
$select = "TestCaseId, ReleaseVersionId, VersionNumber, EntryPointPath, HasAssertions, StartTime, EndTime, Status"

Write-Host "filter: $filter"
Write-Host "select: $select"

######$uri = "$global:uiPathBaseUrl/odata/TestCaseExecutions?`$filter=$filter&`$expand=TestCaseAssertions&`$select=$select"
$uri = "$global:uiPathBaseUrl/odata/TestCaseExecutions?`$filter=$filter&`$expand=TestCaseAssertions,TestCaseExecutionAttachments"

$uri = [uri]::EscapeUriString($uri)
write-host $uri
$headers = @{}
$headers.Add('Authorization',"Bearer $global:bearer_token")
$httpsResult = Invoke-WebRequest -Uri $uri -Headers $headers -Method $Method -ContentType "application/json" -TimeoutSec 180 -ErrorAction:Stop
if ($httpsResult.StatusCode -ne 200) {
    $myerror = 'Function {0} failed ' -f $MyInvocation.MyCommand
    $myerror = $myerror + "with Status code: " + $httpsResult.StatusCode
    throw $myerror

$json = $httpsResult.Content | ConvertFrom-Json
return $json.value


Added a ticket with uiPath Support.
They confirmed - The above is a defect (byDesign) on Orchestrator version 2021.10.4
Fixed on 2022.4

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.