Quantcast
Channel: SCN : Popular Discussions - RESTful Web Services SDK
Viewing all articles
Browse latest Browse all 1088

Missing dataSourceId when retrieving report dataproviders

$
0
0

Hi,

 

I'm writing script that is retrieving information about reports from CMC and I have some issues with retrieving data provider details.

 

For some reason, my script is not able to retrieve dataSourceId in some reports, it's empty:

 

[DBG]: (...) >> $dpDetails.dataprovider

id           : DP0

name         : Query 1

dataSourceId :

updated      : 2014-08-06T08:38:27.000+02:00

duration     : 0

isPartial    : False

rowCount     : 0

flowCount    : 1

dictionary   : @{expression=System.Object[]}

query        : SELECT DISTINCT (...)

 

It appears on about 1 per 5 reports. I've checked few of them, I was able to edit data provider, add new objects from universe, refresh report. I was able to open universe with universe design tool (using the same credentials).

 

I've checked now using chrome advanced restfull client, result is the same:

 

URL: http://serverName:6405/biprws/raylight/v1/documents/5603515/dataproviders/DP0

 

Response:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<dataprovider>

<id>
DP0

 

</id>

<name>

Query 1

 

</name>

<dataSourceId/>

<updated>

2014-08-06T09:02:15.000+02:00

 

</updated>

<duration>

0

 

</duration>

<isPartial>

false

 

</isPartial>

<rowCount>

0

 

</rowCount>

<flowCount>

1

 

</flowCount>

<dictionary>

<expressionqualification="Dimension"dataType="String">
<id>
DP0.DO2b3

 

</id>
(...)

 

What could be the source of the issue?

 

Many thanks and regards

 

Part of my code used to retrieve DP details:

# Send any GET request, returns results

Function GetResults($logonToken, $contentLocale, $URL)

{

    Write-Verbose "GetResults $logonToken, $contentLocale, $URL"

    # Header

    $headers = @{ "X-SAP-LogonToken" = $logonToken ;

              "Accept"           = "application/json" ;

              "Content-Type"     = "application/json" ;

              "X-SAP-PVL"        = $contentLocale

              }

 

    # GET

    $result = (Invoke-RestMethod -Method Get -Uri $URL -Headers $headers)

 

    return ,$result

}

 

# Find dataproviders used by report

Function GetDataProviders($logonToken, $contentLocale, $URL, $reportID)

{

    $reportUrl = $URL + "/raylight/v1/documents/" + $reportID

 

    $result = (GetResults $logonToken $contentLocale ($reportUrl + "/dataproviders"))

 

    Write-Verbose $result.dataproviders

 

    return $result

}

 

# Get given dataprovider details information

Function GetDataProviderDetails($logonToken, $contentLocale, $URL, $reportID, $dataProvider)

{

    $reportUrl = $URL + "/raylight/v1/documents/" + $reportID

 

    $result = (GetResults $logonToken $contentLocale ($reportUrl + "/dataproviders/" + $dataProvider))

 

    return $result

}


Viewing all articles
Browse latest Browse all 1088

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>