Where to get the base URL for rest service? - rest

I'm learning REST connector in data factory , I'm trying to create a linked services with REST, but it needs to provide base URL ,I wonder where I can get this.

We can use many programe languages to build a REST Service. When you have permission to access this api, it will return a json object or json object array.
For example, using Spring to build a RESTful Web Service. In this case, http://localhost:8080/ is your base url. If your domain is localhost, you need to use self-hosted-integration-runtime to connect to your local server.

Related

Using a Web activity along with a linked service to call a rest api

I have to send data to a rest API via data factory.
I get batches of records from a database, send them in the body of the REST API call, which provides a response that informs the action performed on each record.
I created a linked service to the base API URL, and this linked service does the authentication to the API.
My question is how I use this linked service along with a web activity in a pipeline?
The web activity requires me to enter a full URL, which feels redundant as the base URL is already in the linked service.
The web activity does let me add multiple linked services but I'm unsure why it allows multiple linked services and how this is supposed to work.
I would appreciate expertise regarding how the web activity works with a linked service.
Thanks!

How to create a dynamic API endpoint connection using HTTP or REST connectors in Azure Data Factory V2

I have an external REST based API that I need to create a connection to in order to retrieve data on a regularly scheduled basis (for BI purposes). This API is fairly robust, and supports around 60 distinct endpoints. Also, this same API is used to access information across multiple client sub-domains (e.g. client1.apisource.com, client2.apisource.com, client3.apisource.com, etc.). In other words, the API endpoints are the same for each client subdomain.
So what I'm trying to figure out is whether it's possible to create a single ADF that contains a complete set of pipeline actions for each endpoint THAT uses a "dynamic" URL based on the client subdomains? In other words...what I'm trying to see if its possible to create a single ADF that can manage a dynamic list of base URLs.
I tried to parameterize the HTTP and REST connections, but this doesn't appear to Is this possible yet. Any thoughts? Thanks!
Here is an example of a Web Activity to call a REST API using parameters and expressions. The URL can be an expression like:
#concat('https://management.azure.com/subscriptions/',pipeline().parameters.SubscriptionID,'/resourceGroups/',pipeline().parameters.ResourceGroup,'/providers/Microsoft.Sql/servers/',pipeline().parameters.Server,'/databases/',pipeline().parameters.DW,'?api-version=2014-04-01')

Querying SalesForce DB Records using REST API

I have tried implementing like this to get data from SalesForce DB using the REST api,
uri= ...."/query?q=Select+Acc_Name__c+From+Account__c+where+Acc_ID__c+=+'123456'+Limit+5
HttpGet httpGet = new HttpGet(uri);
This is the syntax i found in here
URI
/vXX.X/query/?q=SOQL query
while this works, I don't really want to expose my query like this in uri, Is there an another efficient way to achieve the same operation using REST api ?
You can't modify the way the REST API works. You can implement your own methods via an Apex Restful Web Service. This would allow you to define a method that receives the querystring via a POST (you could even encrypt it first if you wanted to).
Exposing Apex Classes as RESTful Web Services

What is the benefit of RESTful Web Service Vs Using Just a simple Servlet?

Regardless of whether I create a RESTful Web service to be consumed by Ajax in my own pages, or by any user, I can provide the same functionality (data) to the application or user using a simple servlet.
I mean the user or application don't see any different between response provided by a simple servlet or respone provided by a RESTful web service. So, I'm guessing that the benefit is on the server side and to the developers. Can someone please tell me what are the benefits of using RESTful web services.
I appreciate any respone
By definition a webservice is intended to be consumed by any client granted access. If the client you are developing is the only application that you will ever need or want to access the resource then there is little benefit to creating a webservice. However, if you want to make the resource available as a service endpoint for more than just this application in a way that is implementation agnostic then a Restful webservice is a great way of doing it.

creating a POST request in objective-C

I have implemented a REST based web service and used it to access data back in MySQL database.
I am using this framework to access the json data http://code.google.com/p/json-framework/
I have no problems in getting the content from this web service, but how can I put something in the database? Should I just make a special query string and have the php code in the backend to interpret this special keyword/query string as an insert to the database?
You're looking for ASIHTTPRequest. You can use that for everything from dumping pages to submitting data via POST or FORM.
Have fun :)
POST is a HTTP method. Your web service should behave differently depending on the method used for the request, if you're implementing REST.
If you send a POST request, your web service should inspect the parameters and do what it needs to do.
What parameters you send and how is dependent on how you've written the web service. Ie. Is the web service expecting XML requests or JSON or URL parameters?