How to obtain the report data from BO with the use of RESTful Web Services? - business-objects-sdk

I would appreciate the sample code (URL String) that returns the data.
So far I am able to get the information about the report but I am not able to get the data.

From: http://help.sap.com/saphelpiis_sbo41sp4wi-sdk/frameset.htm?45f89e086e041014910aba7db0e91070.html
Get the list of data providers:
GET <webiURL>/documents/{documentId}/dataproviders
Within the result you'll get the DP IDs that look like:
<id>DP0</id>
Then get the number of "flows" in the DP:
GET <webiURL>/documents/{documentId}/dataproviders/DP/flows/count
Then get the flow data:
GET <webiURL>/documents/{documentId}/dataproviders/DP0/flows/0

Related

How to get Campaign Summary in Facebook Graph API

I am trying to get the summary from multiple campaigns from the facebook graph api. I already managed to get a filtered view, so i just get the Campaigns i need:
I am able to get the reach and impression data by platform for every Campaign, but if i sum it up, its not the same result as marked in the screenshot.
https://graph.facebook.com/v14.0/act_BUSINESS_ID/campaigns?fields=name,id,status,objective,insights{impressions}&filtering=[{field: "id",operator:"IN", value: ['CAMPAIGN_ID1"','CAMPAIGN_ID2"']}]
Is it possible to get the reach and impression Data as a summary and breakdowned by platform like in the Screenshot?
So, finally i got the right way!
The call should look like this:
act_Accunt_id/insights?breakdowns=publisher_platform&fields=ad_id,clicks,unique_clicks,cpm,impressions,reach,spend&default_summary=true&date_preset=maximum&filtering=[{field: "campaign.id",operator:"IN", value: ['ID1','ID2']},{"field":"publisher_platform","operator":"CONTAIN","value":"facebook"}]
I just came up with also filtering by publisher_platform and thats it!
You can filter any campaign field and as long, as you set the default_summary and the date_preset values correctly, the numbers are exact.

Dynamic query (Current date) via web services in Power Bi

In my project we are consuming the company's data via Web Service REST. Today we don't do the query dynamically by passing the start date and end date parameters via string.
enter image description here
My goal is for the end date to update dynamically. I've already created a query that takes the current date but I can't put it in the parameter without generating an error in the query.
enter image description here
This is the error message I get when I put the column value in the parameter:
enter image description here
I'm pretty sure I'm getting the syntax wrong. Anyone who can help me, I really appreciate it. I would like to point out that the date format for the API call to work is DD/MM/YYYY.
Can you try using
PutYourOtherTableNameHere[Hoje_Coluna]{0}
instead of
[Hoje_Coluna]
?
To see if that will work, put this in right before your query, then click on the step and see what it returns.
x = PutYourOtherTableNameHere[Hoje_Coluna]{0},

Can I get the resulting Big Query SQL from a query string and a list of positional parameters?

I'm using the Java library to connect to Big Query and get data. I'd like to display back to the user what the final SQL was, with its positional parameters inserted. Is that possible? I've looked through the QueryJobConfiguration Builder api and in some other classes, but I couldn't find anything.

Unmarshal set of strings in Amazon DynamoDB

I am using golang and want to store some data in Amazon DynamoDB in set of strings format SS. It is possible to store data but when I want to pull it back on unmarshaling stage it unmarshal every property except of prop that contain set of strings. Structure that I use to unmarshal in has []string type of that property. I saw that dynamodbattribute have some specific methods for unmarshaling like UnmarshalMap and so one but I didn't find specific method for SS. Can someone give me an advise?
Currently I have created custom unmarshaler following that example:
https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/dynamodbattribute/#UnixTime.UnmarshalDynamoDBAttributeValue
but I still think that I am doin smth wrong because it should be easier way to parse set of strings...

How do I save the web service response to the same excel sheet I extracted the data from?

For example:
The given sample HP Flights SampleAppData.xls and using the CreateFlightOrder, we can link the data to the test functions and get a OrderNumber and Price response from the Web Service. And in the SampleAppData.xls Input tab, we can see that there is a empty column of OrderNumber.
So here is my question, is there any ways that I can take the OrderNumber response and fill the empty column in SampleAppData.xls?
My point to do this is because, let's say I have many test cases to do and will take days, and today I do this certain test and I would need the result of today for the next day's test.
Although I know that the responses are saved in the result but it beats the point of automation if I am required to check the response for each and every test cases?
Yes of course you can. There are a number of ways to do this. The simplest is as follows.
'Datatable.Value("columnName","sheetName")="Value"
DataTable.Value(“Result”,”Action1”)=“Pass”
Once you have recorded the results in the Datasheet, your can export them using
DataTable.ExportSheet("C:\SavePath\Results.xls")
You can write back the response programatically , if you already imported mannually .
You can use GetDataSource Class of UFT API , it will work like this lets say you imported excel from FlightSampleData.xls, and named it as FlightSampleData, you have sheet, accessing the sheet will be like below:
GetDataSource("FlightSampleData!input).Set(ROW,ColumnName,yourValue);
GetDataSource("FlightSampleData!input).Get(ROW,ColumnName);
for exporting you can use ExportToExcelFile method of GetDataSourse class after your test run . Please let me know if you have any furthur question about this.