cancel
Showing results for 
Search instead for 
Did you mean: 

404 when using Crystal Reports REST SDK

first_last
Participant
0 Kudos

I'm getting a 404 when I use the Url to get a Crystal Report via the SAP Crystal Reports RESTful Web Services SDK (4.2 sp4).

When I query the SDK (via PowerShell) for the folder that contains the report, it returns the report's canonical URL:

PS> $Url = http://SERVER:6405/biprws/infostore/9734/children
PS> $response = Invoke-WebRequest $Url -Headers $headers -Method Get
PS> ($response.Content | ConvertFrom-Json).entries
...
__metadata  : @{uri=http://SERVER:6405/biprws/infostore/175706}
cuid  : AZjqSTpRhAtOtcbq0nB8_SM
name  : REDACTED
description : REDACTED
id  : 175706
type  : CrystalReport
...

When I use the URL to get the report, it returns 404:

PS> $Url = http://SERVER:6405/biprws/infostore/175706/rpt
PS> $response = Invoke-WebRequest $Url -Headers $headers -Method Get
PS> $response.Content
Response status code does not indicate success: 404 (Not Found).

However, I can find the report via the cmsquery interface:

$Url = http://SERVER:6405/biprws/v1/cmsquery";
$Query = "SELECT * FROM ci_infoobjects WHERE si_id=175706"
...
$payload=@"
<attrs xmlns="http://www.sap.com/rws/bip">
<attr name="query" type="string">$Query</attr>
</attrs>
"@
$response = Invoke-RestMethod -Uri $url -Method Post -Headers $headers -Body $payload
$response.entries

SI_ID  : 175706

What am I doing wrong?

Accepted Solutions (1)

Accepted Solutions (1)

former_member230921
Active Contributor
first_last
Participant

In essence, the Crystal Reports REST SDK only works with reports created by Crystal Reports for Enterprise, not Crystal Reports 2013.

Answers (0)