I am using SharePoint Designer 2013 to author a workflow and using the "Call HTTP Web Service" access to access the soda endpoint https://health.data.ny.gov/resource/7xgt-tyms.json?fac_id=1
The response I get is the following json object
{"code":"authentication_required","error":true,"message":"Authentication
failed: Unsupported authorization type"}
but, as far as I can tell, this end point does not require authentication. I've also tried it with my own app token and received the same result. I was able to get this workflow to work using Microsoft's sample odata endpoint that they provide at http://services.odata.org/V3/Northwind/Northwind.svc/Customers('ALFKI')?$format=json&$select=ContactName,CompanyName
Why don't you try our OData endpoint for that dataset? It might work better out of the box with Sharepoint Designer.
http://dev.socrata.com/odata/
Related
How to get the token from en API Microsoft Graph from a Talend job?
Under postman it's ok to generate the token but with a tRest component I don't know what kind of parameters I should use and where. All I get is a status200 answer that ask me to sign in.
I tried multiple kind of connection with tRest. Adding a xml body too.
If I use the token from postman with a classic API call in Talend, for exemple https://graph.microsoft.com/v1.0/me, it works. So I need to get first the token.
You can do this with the below workflow:
tREST -> tExtractJson -> tSetGlobalVar
As per the Microsoft documentation, tREST configuration is as per the below (with client secret):
Replace the yellow bits with your own details.
Then extract your token from the response body and save it into globalMap for future use.
If you use other methods than shared secret to identify, look at the Microsoft Graph API documentation Get a Token to see what information you need to send in your POST request.
I got 401 unauthorized when trying to export a report from Power BI online by using the Power BI REST API.
My access token works fine with other API methods. I am also setting full API access in App registrations.
When I logged in by using the same account and use 'try', the access token provided in this test actually works.
https://learn.microsoft.com/en-us/rest/api/power-bi/reports/exportreport
Has anyone successfully used this method?
You will need to create an Authentication app and provide the right privileges corresponding to the REST API you are loading from. For this particular API Microsoft suggests to provide Report.Read.All or Report.ReadWrite.All privileges.
You can achieve this directly by creating an authentication application from https://dev.powerbi.com/apps.
You will also need to make sure you grant the admin consent once your app is up and running.
Also, make sure the request you are creating is in the right format. If you match your request with the one specified here : https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export report and test to check if it working with your parameters and login, you should be able to make it work with your code. Also test it with Postman to make sure you are entering the right configuration in the request and you know what you are requesting.
Once you have all this in place, you should not have any issues accessing the right data.
Our organization has a data collection on their servers. A soap API has been implemented and the data can be accessed using the WSDL on SOAP UI. I am a front-end developer and when I make a POST request using XMLHttpRequest to get the query result, it throws CORS error: "Response to the preflight request doesn't pass access control". It is NOT possible to enable CORS on the data collection servers. I am using Liferay for the website front end and the back end.
Any suggestions how I can get the query results from the front end without enabling CORS on database servers(this is different than the Liferay backend server)? Or I can use a website backend to interact with the database? Or use third-party services like Kinvey?
I have had similar issues in the past. Like you, I wanted to create a basic webpage on my machine and that contained some Javascript to call an API. With this approach, I got the CORS issue you are seeing.
I then hosted my page on a web-server and I still got the CORS issue.
To resolve, I had to create a web app, which I wrote in Java. This back-end contained its own API. One of the resources in 'my' API was a simple wrapper to call the API of interest. I then modified the webpage I wrote (now all hosted in the same web app), to call my API, which in turn calls the API of interest.
I am going thru the documentation and examples related to calling REST APIs for SugarCRM using Chrome REST client or PostMan but most of the examples are PHP and I am not finding a good way to find a proper request and other parameters to be mentioned so that I can get the successful response from the API. I was trying get_entry_list. Can someone please help by providing a working REST API request for this API which I can run on REST client or postman?
I also would like to know if I want to build a SugarCRM connector for my application, which set of APIs I should use? Should I go with REST or SOAP and any supporting arguments to choose one over another?
Thanks
I was trying to access a sharepoint 2013 list using REST over HTTPS
I used the following Syntax
https://name.sharepoint.com/sites/siteName/_api/web/lists
But it respond with a error that says Access denied. You do not have permission to perform this action or access this resource
Should i give permission somewhere?what might be wrong with the request?
In the future post this on sharepoint.stackexchange.com bud you will get a faster answer, I only saw this by accident on a google query.
Basically this is by design, it isn't about giving permission only pre authorised accounts will get direct access without authentication and then it is security trimmed after that.
Otherwise you need to authenticate against the api with OAUTH.
The rest api being a massive subject that I cannot possibly cover here I recommend you google:
"using oauth sharepoint rest api"
Some good links are:
http://msdn.microsoft.com/en-gb/library/jj164022.aspx
http://www.sharepointnutsandbolts.com/2013/01/calling-sharepoint-search-using-rest-eg.html
Good luck matey.