I am using a REST API to pull down information. It returns a max of 100 records and returns a boolean (is there more) and an offset (what to pass to next call for where to start). I was able to create the one time pull of records from the API to a SQL DB no problem. I want to now check the boolean and pass the offset into the next call. I had the thought to call the same logic app in a sort of recursive matter but I am not seeing where to set parameters for an HTTP request/action.
Here is what I am currently doing
and this is what I am intending to do
I was reading the documentation for http endpoint in a logic app but I am not seeing anything for what I am trying to do.
Sounds like it should work if you put all of that above inside an Until loop that repeats until more pages == false. Now the tricky part will be setting the offset every time, as our variables today only support increment and decrement. Set Value for variables should roll out in next week or two and you could set the value of the offset to the variable. In the meantime you could store the offset in any external state.
Related
I am using List secrets activity to get all the secrets from key vault. I am only able to get first few values as pagination is not Woking for this activity. Is there any other way I can get all the secrets values from the logic apps.Right now I am only able to do for first page values only and as per Microsoft there is limitation of maximum 25 items.
I've managed to recreate the problem in my own tenant and yes, it is indeed an issue. There should be a paging option in the settings but there's not.
To get around this, I suggest calling the REST API's directly. The only consideration is how you authenticate and if it were me, I'd be using a managed identity to do so.
I've mocked up a small example for you ...
The steps are ...
Create a variable that stores the nextLink property. Initialise it with the initial URL for the first call to the REST API, it looks something like this ... https://my-test-kv.vault.azure.net/secrets?maxresults=25&api-version=7.3 ... and is straight out of the doco ... https://learn.microsoft.com/en-us/rest/api/keyvault/secrets/get-secrets/get-secrets?tabs=HTTP
In the HTTP call as shown, use the Next Link variable given that will contain the URL. As for authentication, my suggestion is to use a managed identity. If you're unsure how to do that, sorry but it's a whole other question. In simple terms, go to the Identity tab on the LogicApp and switch on the system managed status to on. You'll then need to assign it access in the KeyVault itself (Key Vault Secrets User or Officer will do the job).
Next, create an Until action and set the left hand side to be the Next Link variable with the equal to value being expression string('') which will check for a blank string (that's how I like to do it).
Finally, set the value of the Next Link value to the property in the response from the last call, the expression is ... body('HTTP')?['nextLink']
From here, you can choose what you do with the output, I'd suggest creating an array and appending all of the entries to that array so you can process it later. I haven't taken the answer that far given I don't know the exactness of how you want to process the results.
That should get you across the line.
I am using DirSync Control (Cookie) to get the latest changes using the below technique. Is it possible to get that result with pagination ?
https://learn.microsoft.com/en-us/windows/win32/ad/polling-for-changes-using-the-dirsync-control
Example: If 500 updates have happened, can i get updates from 1-50, or 51-100 (paging with skip) ?
The result returned is paginated. You need to put the cookie, returned from the previous response into the next request. However, from my experience the number of changes on every page may vary. You can set the upper border, but I would not recommend to rely on it. If you want to display/send changes in batches with predefined size additional processing should be done on the client side
When using push task queues in Google AppEngine, I know we can use the "X-AppEngine-TaskRetryCount" and "X-AppEngine-TaskExecutionCount" request header parameters to tell how many times we have tried to process an specific task.
Is it possible to detect if it's the last attempt or not?
A workaround is to pass the max retry count as a parameter in the HTTP request when you add tasks to TaskQueue. Then, you can detect if is the last attempt comparing the header attribute "X-AppEngine-TaskRetryCount" with your custom param:
Boolean isLastAttempt = (taskRetryCount == (maxRetryCount - 1));
Not exactly a good design approach though...
I need to track a single traffic variable (a "prop") on a 3rd party site that is embedding our content.
We don't want the Omniture call to increment a visit or page view or any other metric that is normally captured by the s code library.
The 3rd party site on which we're capturing the prop variable will need to track this in the client, so using the data insertion API is not an option.
How to achieve this? Would a s.tl() method do this? i.e. not count a visit, etc.
Using a s.tl() call would not work. Even though that call does not increment a page view, any "first" call made will register a visitor and a visit. What I mean by that is even if a standard visit begins with a s.tl() call as opposed to a s.t() call, which ever one happens first will start the visitor and visit being counted.
What you are looking for is called a Light Server Call. This allows you to fire a call and capture some variables but will not register a page view, visit, or visitor. Plus they cost much less than a standard server call. You will need to work with Client Care to get it set up and implemented.
I was able to get this working by making an image request that looks something like:
< img src='http://somersid.122.2o7.net/b/ss/somersid/1/H.XX.X--NS/0?c[some_prop]=data height='1' width='1' alt='' />
This is the first I've heard of Light Server Calls. Can't find anything about them in the documentation. Thanks.
No, not another question that asks, "How can I make my messages flow like on Foursquare???"
What I want to know is, how they are getting their messages in the right order and timeframe.
Here's my situation. I have a proc that can get messages for a given day, and then return the selected result set to the web and have on the front end, my code show them and slide new ones on top. However, these "new" ones, aren't new ones, they are just the ones in the set that didn't initially fit on the page, although they "look new". Now what happens when I get to the end, and the set is empty finally...I make another call right?
Well this call is going to get, yes some ones they didn't see, but also all the ones they already saw.
What's a work around for this?
Thanks.
If you only want to show messages once, then persist the Id of the last message and use that as input into the proc on the second call, basically asking for any messages that came in since the last call.
re: Foursquare, I assume you are referring to the "recent activity" on their main page. They seem to call for 30 activities, then just cycle through them showing 11 at a time. They loop through a static list of 30. No second call that I can see.