Power BI Web Source Wont Update through Gateway - powerbi

I have an API source I am using on a report. It works fine on my Desktop, and I added the URL and Basic Login credentials to my Gateway. I get an error that my source is unable to update, but I don't know why. When I test the connection in my Gateway it says it connects fine. For some reason my published data set doesn't recognize the report's source as the same one as the one in my gateway.
Is there any additional step required in publishing a Web Data Source in order to make it use the gateway's web source?
This is the Error I get:
This is the Gateway's connection to the API:
This is the (Much Truncated) version of the Query I am using to retrieve the data:
let
Url = "https://rest.avatax.com/api/v2/companies/XXXX/transactions/",
RawData = Web.Contents(Url),
Json = Json.Document(RawData)
in
Json

This an incredibly annoying "feature", but the Power BI service does a different code analysis than Power BI Desktop. The way to overcome it is to present a static URL like this:
let
Source = Json.Document(Web.Contents("https://rest.avatax.com/api/v2/companies/XXXX/transactions/"))
in
Source
Chris Webb described this in more detail (along with hacks to make the URL dynamic) in this blog post:
https://blog.crossjoin.co.uk/2016/08/23/web-contents-m-functions-and-dataset-refresh-errors-in-power-bi/

Related

Appery.io aws S3 integration

Looking for help on how to have a appery.io ionic 5 app upload images, files, videos etc. to aws S3. I am using aws DynamoDB thru API Express successfully and can get a presigned S3 URL thru API Express as well. My problem is using the presigned URL to upload a image/file. Tried fetch, httpClient etc. Some Guidence would be greatly appreciated.
Thank you
To work with binary data in API Express you can do the following:
Create new service of Custom REST API type
In START node select POST method and Binary for request body
With that you should be able to select Binary request as parameter value in SQL node
The second part of the question is how can you get the binary data if you have fileUrl.
Import API Express service created on a previous step into your project with Create New > API Express service
On Code tab create a variable named buffer of type Any
On Data tab add datasource for the imported API Express service. In Before send mapping connect buffer with body.data
Drop the button on Screen1
Add event with TypeScript code to it:
fetch(fileUrl).then(res => res.arrayBuffer()).then(arrayBuffer => {
this.buffer = arrayBuffer;
this.Apperyio.execDataService(this, "myAexService");
});

How to access CloudFront Cache Statistics via SDK

I am trying to access the Cloudfront Cache Statistics programmatically. Via the UI you can see the Statistics via clicking on "CloudFront" and then on the left side under "Reports & analytics" the link "Cache Statistics".
I am using the Java SDK 1.11. However the structure is similar in all sdk bindings. I already tried:
AmazonCloudFront cloudFront = AmazonCloudFrontClientBuilder.defaultClient();
GetDistributionRequest request = new GetDistributionRequest();
request.setId("E3C1N6KKRS04QE");
GetDistributionResult result = cloudFront.getDistribution(request);
System.out.println(result);
However, that seems to get my the information shown on the "Distribution"-Tab in the UI. Any help would be appreciated!

Autodesk Data Management API 403-Error

I am trying to receive data via Autodesk Data Management API. So far I've created an Forge-App and connected it with a BIM360 Integration.
Then I wanted to get a list of all hubs, but when I do so, I receive an JSON-Object which contains a warning:
warnings: [{
"AboutLink":null,
"Detail":""You don't have permission to access this API",
"ErrorCode": "BIM360DM_ERROR",
"HttpStatusCode": "403",
...
}]
I called the webservice via AJAX wich looks like that:
this.getToken(function(token) {
$.ajax({
url: "https://developer.api.autodesk.com/project/v1/hubs",
beforeSend: function(xhr) {
xhr.setRequestHeader("Authorization", "Bearer "+token);
}
}).done(...);
The token is a 3-legged one. I am not sure which API I do not have permission for because I am pretty sure, that I have permission for BIM360.(I created the Integration as an administrator).
In addition to was ZHong mentioned, I would suggest you try this sample. It will ask you to provision your Forge Client ID under your BIM 360 settings, just follow the steps that the app will present.
On both 2- or 3-legged, the app accessing the data (Forge Client ID) needs authorization from the account admin. Without that, the Hubs endpoint will not return your BIM 360 hub, and inside that, the sample applies for Projects endpoint.
Does everything else work fine? For example, can you get all the hubs successfully? I just verified on my side, and I can see the response including the same warning as you mentioned, but the hubs are listed correctly, and you can get the projects/items/versions without problem. I pasted my postman response as follow.
If you check the blog https://forge.autodesk.com/blog/tutorial-using-curl-3-legged-authentication-bim-360-docs-upload, it also has the same warning, but seems no impact to the following operation. I am not exactly sure what the warning means, l will check and update the details, but so far, it seems you can ignore it for now.

Create product in Microsoft Dynamics 365 for Financials

I try to create a product (item) using OData V4 URL available in Web Services section in Microsoft Dynamics 365 for Financials as shown below.
I use Postman to execute the POST request. Each request is proceed with an authenticated and valid account.
The POST OData V4 URL is taken from the Web Services sections example: https://xyz.financials.dynamics.com:7048/MS/ODataV4/Company('my-company')/Items
I also tried the entity "Item_Card", same result.
Here is the config set in Postman:
Headers
Body
When I execute the request, I get the following error:
What is the missing "Data object"? Is this a standard of OData V4 protocol? Do I must supply a "Data object" into the body?
Is there anyone encountered that error and could explain what is missing/not working?
Update 2017-05-10
It seems that the REST endpoint is not available for Microsoft Dynamics Financials build < 16552. I currenly use build 16259.
Update 2017-05-23
I am now running on build 16552. I still get the same error. The update seems to have no effect on the POST request.
I had a similar issue today.
I am using SoapUI for testing a simple webservice on a custom table in an on premise version nav2017.
In the end I found out that I was writing a Date on a Date field in NAV. After changing that to DateTime and sending a correct date time string it was working.
It probably does not answer your question as I see no date in your body, but maybe for others who are searching for the error "Data Object not provide" it might help to check if the datatypes used in the body matches the datatypes in NAV.
Regards, Henry Verheij
I receive this error as well. In my case I was adding a vendor and I missed the NO. (this field is not on the interface'vendor card', but it appears in the listing and is mandatory in the service, however no documentation about it). So my guess you probable is missing a mandatory field.
PS:I used OData v4 Client Code Generator to generate my proxy from the metadata.

What do I need to write to be able to communicate with a web service?

I've been tasked (I'm not a web developer) with creating something (a web service "client") that will connect to a web service, retrieve a list of files (url's) and then download them (HTTP Post) for further processing. I guess anything like a command line app that I can schedule to run daily will do (but I'm open to suggestions).
I have documentation for the web service, it uses SOAP 1.1 which I am somewhat familiar with (used it in a few web pages, but that was classic asp). They are even offering a WSDL to download in order to generate proxy classes, or you can create your own.
Below is the description of the objects that the WSDL creates:
There are six software entities that you will need to implement in your web service client. If your development environment automatically generates these from the WSDL, they will have the following names and purposes:
DownloadSvc
Response
ResponseCodeEnum
UserType
CertificationEnum
FileFormat.
DownloadSvc Class – This is the central object you will use. It implements the majority of the behavior needed to login to the service, to check the availability of a download and to obtain the download URL. For example, it has a Login and a GetURLS method. This class supports both full and change list (“delta”) downloads.
Response Class – Most methods of the DownloadSvc return this Response object. The fields in Response are as follows:
The Response.code field always describes the success or failure of a method call.
The Response.value field sometimes contains additional information.The remaining four items are simple enumerations that define the allowable values in the fields passed from or to the service.
ResponseCodeEnum – Describes the possible values of the Response.code field. For example, it may return a code of LoginOK or DownloadOK for successful calls, or an error-specific code for failures. You can see the specific code values listed in the sample SOAP responses in the SOAP Appendix.
UserType – Only used with the Login method. It identifies which password is being used to login: your Representative password or your Downloader password.
CertificationEnum – An enumeration that you use to certify your agreement with the FTC’s conditions for downloading these phone number files as specified on the download full or download change page.
FileFormat – An enumeration that lets you select a flat text file or an XML file format.
Here's my question: where do I start in Visual Studio? What type of project do I need? Thank you!