Can we hit a URL and check for the response as a job in Azure Data Factory? - azure

Say I have a URL like (https://hello.world.com). Is it possible to hit this URL in Azure Data Factory and observe the response?

Yes, you can. You can use the Web activity.
Specify the URL you want and choose Get as method.
This will output the html content in the response json element.

Related

Azure ADF Web Activity Form data

I am using Web Activity to get the response from an API. The API takes a Csv file as its body parameter along with some string. I tried using this link How can i pass file as parameter in post request (Web Activity) Azure Data Factory? but could not succeed, I was getting the below error
The other help says to use logic apps for this , has anyone tried using web activity for posting form-data.

How to pass CSV or XML data as Body Parameters to API Post operation using API Management Action in Logic App?

This is in relation to the question : -
How can I pass Body Parameters to API Post operation using API Management Action in Logic App?
Now I am able to pass JSON through the body of my logic app.
I would like to pass CSV or XML data as Body Parameters to API Post operation using API Management Action in Logic App.
Currently, the APIM accepts JSON sample only.
I am able to pass CSV or XML data using postman without any issues. Please find the attached pictures for details of this issue.
Thanks,
Paul
As I mentioned in comments, the solution is:
Add representation with "CONTENT TYPE" as text/csv and leave the "SAMPLE" and "DEFINITION" box empty like below screenshot:
And then in your logic app, request the api like this:

Provide a videoUrl to the videoindexer with query parameters in it

We're in the process of implementing the videoindexer.
To upload videos, we'd like to use the videoUrl method instead of uploading the video file. For this we're using url's of videos on our blob storage. These require a SAS token to be served, so the url contains query parameters.
However, I'm unable to provide a videoUrl with query parameters to the endpoint on the videoindexer.
Example of a test request:
https://api.videoindexer.ai/trial/Accounts/MY_ACCOUNT_ID/Videos?accessToken=MY_ACCESS_TOKEN&name=interview&description=interview&privacy=private&partition=some_partition&indexingPreset=AudioOnly&streamingPreset=NoStreaming&videoUrl=https://manualtovideos.blob.core.windows.net/asset-xxxxx/interview.mp4?sp=rl&st=2020-12-03T16:48:42Z&se=2020-12-04T16:48:42Z&sv=2019-12-12&sr=b&sig=l57dDjKYr...8%25253D
When I shorten the blob url using a url shortener service, it works.
The docs say I need to url encode the videoUrl, so I'm doing that using javascript's encodeURI
But this doesn't change the url much, since it disregards ?'s and &'s.
Do I need to encode the url in a different way somehow?
Or is there another way to authenticate, so I can use the blob url without the sas token, since it's also on Azure?
You need to encode the URL.
You can see how it's created using the Azure Video Analyzer for Media Developer Portal in the upload method.
So it turned out I needed to use encodeURIComponent() to encode the videoUrl parameter instead of just encodeURI() or escape()

Get Records from Salesforce using Azure Logic Apps

I am trying to use Azure Logic Apps to read data from one of the Salesforce objects which has huge number of records. The Salesforce connector fetches the record and returns the pagination link as #odata.nextLink. But when I try to use a JSON parser to read the value it’s coming as null.
I tried to access the nextlink in a browser but it requires authentication. What authentication do we pass here ?
I would like to use an until action to iterate till I get a next link . So how do I check the condition for the until loop ?
nextLink doesn't look like core Salesforce thing, it might be the OData connector preprocessing the results for you. You'd have to consult the documentation for the connector (if any).
Salesforce's REST API will return field with nextRecordsUrl if there's next page of results, you'd call that in loop until the field disappears. You'd call it like any other REST API resource available after login, by passing Authorization: Bearer <sessionId also known as accessToken here>. Again - probably the connector abstracts this away from you. Don't think you can send headers like that in browser, you'd need curl, Postman, SoapUI or similar http client.
If you don't get better answer and documentation is scarce - consider using raw REST API. Or Azure Data Factory has an almost-decent Salesforce connector?
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm

How to Redirect to an MVC web app controller from azure logic app

I am using azure logic app which consumes a web API via a connector and based on some condition, I want to send some data to a controller of my web application.
any ideas how this can be done ?
You can use an HTTP action in your Logic App to send data to a specific endpoint:
As you can see you're also able to add dynamic content to the body you would like to send.
For more information, check Get started with the HTTP action.
I would say don't over think this too much. It's a pretty basic process.
Get the response form your API.
Extract the values you need to test for the condition
Test the values in a Condition Action
Call the end points based on each Condition.

Resources