Page size in List By Factory method in REST API - azure-data-factory

I'm trying to list all the pipelines stored in the Azure Data Factory instance. I want to use Azure Data Factory REST API v2, Pipelines - List By Factory method.
I noticed the "nextLink" field in the PipelineListResponse, which contains the link to the next page of results, if any remaining results exist.
My question is, how many PipelineResources are sent in a single page of the response?
I didn't find any documentation regarding this question.

How many PipelineResources are sent in a single page of the response?
In normal, the list operation response includes the nextLink property when the list operation returns more than 1,000 items. For more details, please refer to here.

Related

Azure Data Factory: Pagination in Data Flow with Rest API Source

I have a API source in an ADF DataFlow task. The API source gives me the current page and the toatl number of pages in the body of the response. I want to use that information to paginate through my API source. I'm able to paginate through it just fine outside of a DataFlow activity using the range function. The issue is that the Rest transformation in a DataFlow activity does not support the range function. I've been trying to use the AbsoluteUrl function plus an expression to do add one to the current page returned by the body but either pagination does not accept expressions or I cannot figure out the syntax
I have a url like this:
BaseURL/fabricationcodes?facets=relatedArticles:Not%20Empty&page={PageNumber}.
In this example my rest linked service URL has everything I need minus the &page=pageNumber. So I'm trying to add that part with the key/value pair function of AbsoluteUrl. The Key being &page= and the value should be currentPage +1. My desire is for it to get the first page, page 0 and then add +1 to that to formulate the next pages url. the end condition being when body.totalPages == body.currentPage
I've tried a bunch of different expression formaulations but none seem to work and debugging in a Data flow is tough b/c the logging and error messaging is poor
What I have right now.
As data flow don't support Range option or you cannot use dynamic expression to get page from API response.
To work around the issue, you can use Data Flow activity within ForEach loop using range function in dynamic expression.
First take a web activity and pass the URL of the Rest API as below Ito get the total no of Pages from API response
then take a for each activity to iterate on API like pagination give the Dynamic expression as #range(1,activity('Web1').output.total_pages)
I will iterate the API till the respective range in sequential manner.
create parameter with type string in source DataSource.
give that parameter as dynamic value in relative URL.
after this gave parameter value as ?page=#{item()} to give the no coming from range to the page.
OUTPUT:

REST API Pagination in Azure Data Factory

I have a project scenario to get all values from an endpoint URL. I am using ADF Pipeline but I'm having some issues with pagination.
To get the following values, I need to make requests with the PaginationCursor value in the current body response in the following request header.
I have read that ADF supports the following case, which would be mine.
Next request’s header = property value in current response body ADF - Pagination support
I don't know how to use the following attributes in order to use the paginationCursor value from the current response body in the header of the next request.
Attributes for pagination in ADF
I tried to reproduce above but not successful. Instead, if you want to do it without pagination, you can try this approach.
First create a web activity with any page URL of your API to get the total number of pages count.
In ForEach create an array for page numbers using the count from web activity as
#range(1,activity('Web1').output.total_pages)
Inside ForEach use the copy activity and give the source REST dataset parameter for the page number like ?page=#{item()}.
In the sink dataset also, create a dataset for each page with the dataset parameter value like APIdataset#{item()}.csv. This generates the sink dataset names like APIdataset1.csv, APIdataset2.csv,...
Now, you can copy from your REST API without pagination.
My repro for your reference:
Copy activity:
I could solve this problem with the following attributes.
Solution
In the Headers I had to put the name of the header of the next call. In my case the name is PaginationCursor and I got the value of this header from the actual body response called paginationCursor.

Jama API - GET item with tag at the same time

I need to fetch items from JAMA API, and I do not get the Tag value with the data.
I tried to call GET/{item}/{id} API and then I also need to execute GET/{tags}/{id}/{item} to discover item tag, which takes too much time for multiple items.
Is there any more efficient way to get all data in one API call?
There is the /items/{id}/tags endpoint: https://rest.jamasoftware.com/#operation_getTagsOnItem

Aggregate functions in WIQL query

I want download WIQL report using REST API. REST response doesn't give all fields but it gives a list of URLS as workItems.
To get field values I need to download each WorkItem separately.
Any direct REST way to accomplish this in a single REST call?
Repeated REST calls gives me rate limiting or similar error. I get error 500 types after repeated GET request.
Genesis of this need is - There are no aggerate functions available likes of SUM, MAX, MIN, AVG Etc.
REST response doesn't give all fields but it gives a list of URLS as
workItems.
To get field values I need to download each WorkItem separately. Any
direct REST way to accomplish this in a single REST call?
Sorry but as I know, there's no direct rest api available to get WIQL report. An alternative workaround should be:
1.Use Query By Wiql to return the list of WorkItem IDs and Urls (I think this is the same rest api you use).
2.Then use Get Work Items Batch to get all the details(fields) about the requested work item ids. And here's one issue which has similar needs like yours, you can use the upgraded script from konpro11 to get list of IDs and use the IDs to get your report (with the help of second rest api).
Hope it helps :)

Dwolla MassPay get data for each user?

Its not clear from Dwolla's API if there is a way to get info for each user's failed vs. succeeded payment using Dwolla's MassPayCreate() or MassPayDetails() API calls?
Both API calls seem to report the aggregated data which seems confusing because I'd expect MassPayDetails() to return an array of data that could be parsed to get transaction details for each user.
What's the deal with this?
I've extended the JobByID() API call to accept an "include_details" parameter, which when specified True, returns the job's rows and their details.
Additionally, I've added another API call, RowByID(), which accepts a job row ID, and returns detailed information for the specified row only.