Skip to Content

404 when using Crystal Reports REST SDK

Feb 14 at 06:13 PM


avatar image

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"
<attrs xmlns="">
<attr name="query" type="string">$Query</attr>
$response = Invoke-RestMethod -Uri $url -Method Post -Headers $headers -Body $payload

SI_ID  : 175706

What am I doing wrong?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Bharath B N
Feb 15 at 08:23 AM
Show 1 Share
10 |10000 characters needed characters left characters exceeded

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