Apigee Integration: How to use listEntitiesPageSize parameter in conjunction with the listEntitiesPageToken parameter o navigate through the pages - google-bigquery

Good day everyone,
we are trying to have through the use of the integrations of the Apigee service of google all the rows in a bigquery table that have a certain value in a field.
this operation is quite easy to do, but when we have more than 200 lines as a result, problems arise.
The problem is that using the integration to connect to BigQuery I am not returning any listEntitiesPageToken value and not even any listEntitiesNextPageToken value
so i can't figure out how i can go about navigating the result pages
Has anyone had the same problem? What do you suggest?
In the tutorial: "https://cloud.google.com/apigee/docs/api-platform/integration/connectors-task#configure-the-connectors-task" is write : "For example, if you are expecting 1000 records in your result set, you can set the listEntitiesPageSize to 100. So when the Connectors task runs for the first time, it returns the first 100 records, the next 100 records in the second run and so on."
And there is a tip: "Use the listEntitiesPageSize parameter in conjunction with the listEntitiesPageToken parameter to navigate through the pages."
I used the tutorial to understand how to use the task for loop and I understood that I should create a "subintegration" which must be called by a "main integration" for each element present in a list / array.
But what what can i do since these tokens are empty?

Related

How to handle delete booking webtours in jmeter?

How to handle the remove flight booking in webtours? It came to my mind that if I wanna run the test with 3 virtual users and how they supposed to delete the booking if the information down here (refer below) are unique for each virtual user? Does any of these variables below need to be parameterized or need to apply correlation?
If there are multiple flight id to be deleted, we can create a CSV file having those ids
and use a while loop controller to delete each of them.
You may refer -
https://guide.blazemeter.com/hc/en-us/articles/206733689-Using-CSV-DATA-SET-CONFIG
https://www.blazemeter.com/blog/using-while-controller-jmeter
As you said, it will differ for a different user, you can store each value from the response of each user(extract value using regex) and pass them in delete call.
reference link - https://guide.blazemeter.com/hc/en-us/articles/207421325-Using-RegEx-Regular-Expression-Extractor-with-JMeter-Using-RegEx-(Regular-Expression-Extractor)-with-JMeter
I don't know what "webtours" is, however there is one "golden" rule: each and every parameter which is dynamic needs to be correlated.
If you don't have any idea regarding which ones are dynamic - record the same action one more time using JMeter's HTTP(S) Test Script Recorder and compare the generated requests, parameter values (or even names) which differ needs to be correlated.
Another approach is to inspect the previous response(s) using View Results Tree listener and look if the data is present there
Check out Advanced Load Testing Scenarios with JMeter: Part 1 - Correlations article for more information and example implementation

PagerDuty Pagination

My company uses Power BI and we are trying to get incidents data from PagerDuty API.
I have been struggling to find a way to get all the data but I am unknowledgeable about PowerBI, PowerQuery or dealing with API. I am in database role.
I used Get Data option in Power BI and selected Web as data source. Entered My API link, and passed the headers. The result I get is limited to 25 by default, I can change it to up to 100 but my main issue is with not being able to get next set of results.
I need to have some kind of loop to increase the offset parameter and refeth the query.
My current query in PowerBI looks like this.
= Json.Document(Web.Contents("https://api.pagerduty.com/incidents", [Headers=[Accept="application/vnd.pagerduty+json;version=2",
#"Content-Type"="application/json", Authorization="Token token=MY API KEY"]]))
And it returns me this:
I can expand the list and get the data I need. but I only see 25 right now.
You'll need a way to keep updating an offset parameter in the URL -- for example if you've set limit 25, you'd set offset to 25 to get the next page, 50 to get the next page after that, and so on, like so:
https://api.pagerduty.com/incidents?offset=25
I'm not sure how you'd accomplish that in your tool, though! Here's a link to the PagerDuty documentation on pagination in case you need extra details.

Can podio's api filter item response with only a mini detail level for each item?

My script needs to check from time to time that all items present in an app are recorded in its own db. Indeed even when using the podio hooks, it happens that my script and podio are getting desynchronised.
It uses the filter item api call by batch of 100 of items. In this case the script doesn't need to know all the fields values, but only the basic informations: item_id, app, title, link and current_revision.
I wonder if it's possible to set a query parameter in the filter function only only get the mini view of each item. This could improve greatly performances.
You can use fields parameter for that.
More details on how it works and how else it could be used are right here: https://developers.podio.com/index/api in "Bundling responses using fields parameter" section.
Using fields to bundle objects can be a way to drastically reduce the amount of API requests you have to make.
Most likely you are looking for fields=items.view(micro) parameter. Podio API will return then only 5 values for each item:
app_item_id
item_id
title
link
revision

Restriction on retrieving file information from a folder

I am trying to get information about files in a folder using https://apis.live.net/v5.0/folderid/files?
This particular folder of mine has around 5200 files. So I am getting a readtimeout when I make the above mentioned request. Is there any restriction on the number of files that I can make the request.
Note : I am able to successfully retrieve the file information from folder if I restrict the file count to 500 say https://apis.live.net/v5.0/folderid/files?limit=500
In general it's good to page queries that could potentially return a large number of requests. You could try using the limit query parameter in combination with the offset query parameter to read sets of the children at a time and see if that works better for you.
I'll quote in the relevant information from the documentation for ease of reference:
Specify the first item to get by setting the offset parameter in the preceding code to the index of the first item that you want to get. For example, to get two items starting with the third item, use FOLDER_ID/files?limit=2&offset=3.
Note In the JavaScript Object Notation (JSON)-formatted object that's returned, you can look in the paging object for the previous and next structures, if they apply, to get the offset and limit parameter values of the previous and next entries, if they exist.
You may also want to consider swapping to the new API, which has it's own paging model (using the next links).

ATTASK/WORKFRONT - API - This "is not a top level object"

This sample will give me ALL the GUIDs for HOURS (Yes over 2000 you need to page to get the rest)
htps://YOURCOMAPNY.attask.com/attask/api/v4.0/hour/search?$$LIMIT=2000&fields=ID:*
Object=Hour
field=ID:* (wildcard for all)
If I wanted to do the same thing to SCANS (ScoreCard Answer)
htps://YOURCOMAPNY.attask.com/attask/api/v4.0/scans/search?$$LIMIT=2000&fields=ID:*
Object=scans (Scorecard Answer)
Field=ID:* (Wildcard All)
I get an error:
{"error":{"class":"java.lang.IllegalArgumentException","message":"SCANS is not a top level object and can't be requested directly in internal"}}
I Can do this to pull a ton of project information and I have to parse it all such as produced by this code.
htps://YOURCOMAPNY.attask.com/attask/api/v4.0/proj/search?fields=alignmentScoreCard:,alignmentValues:,alignmentValues:scoreCardQuestion:*
And if I click thru it I can find a ID for a scans and a scoreq and if I take that scans or scoreq and attempt to pull it using the field=ID or
htps://YOURCOMPANY.attask.com/attask/api/v4.0/scans/YOURGUIDHEREXXXXXXXXX/
This again tells me:
{"error":{"class":"java.lang.IllegalArgumentException","message":"SCANS is not a top level object and can't be requested directly in internal"}}
I can pull just about anything and get a list of ID's and then manually pull those items by ID but the scores/scorecard answers/scorecard questions (Even as the API seems to indicate that I can pull this like anything else does NOT allow me to do so?
Suggestions? I know its all associated with projectIDs and such I just want to get a list of them all and work with the ones that I want on a one - one basis without having to pull the PROJ and then rummage thru to locate all the ID's associated with it (If there are one or many) Is this possible?
Thank you!
I don't think there is any workaround for this..
you have to go via projects only..
I am also searching a method for this...
I had to update scorecard answers and I had to go via projects..