Forum Discussion
Long time to ‘Refresh’ data for a dynamically generated data source
It seems inefficient to make a web call for each event id. How many events are you doing that for? Is there a different API call you can make that will get all events in one shot (still passing the date paramaters in the call)? Even if there is a row limit, you could still get the data in multiple calls with pagination, and probably save a lot of refresh time.
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- Anonymous6 years agoNot applicable
Hi mahoneypat : Thanks for your response.
The Api definition says it can take a max of 50 ids.
How do I now change my parameter and function to call the api? So far I have a parameter, 'Event Id' that is of type ‘text’ and I pass a sample value. Then I created a function on this parameter that I invoke on to create the details table dynamically.
Do I select List of values to create the parameter? Then how does the function know to send 50 different ids at a time?
Many thanks in advance.
- mahoneypat6 years agoMicrosoft Employee
Can you show the example syntax they provide when providing more than 1 ID in the call? I assume it is a comma separated list, but please confirm. How many IDs will you need to search on? If >50, you will have to do it in 50 id chunks (which is trickier but doable).
Please also look at the API documentation to see if there is a way to get all the data (e.g., instead of "?ids=..."). Are there other methods to more efficiently get all the data you want (e.g., ?status=). Can you share a link to the API documentation, so I can take a look directly?
Regards,
Pat
- Anonymous6 years agoNot applicable
Hi mahoneypat : At the API portal- I haven't found any example to specify multiple ids. To test, I passed 2 ids [comma separated] and it returned the details info.
As mentioned earlier, they say max of 50 ids to pass. Below is spec fo the parameters for 'Id'
"parameters": [
{
"name": "ids",
"in": "query",
"description": "Genscape unique id for each maintenance event. This parameter will allow, at maximum, 50 values.",
"required": true,
"type": "string"
},
The link to the api portal is: https://developer.genscape.com/docs/services/natgas-notices-maintenance/operations/GetMaintenanceEvents/console
Many thanks in advance.
- Anonymous6 years agoNot applicable
Hi Anonymous,
You can't use query parameter to send a list of 50 values.
The option 'list of value' and 'query' mean the selection range of current value, it does not mean you can choose multiple values and send them at the same time.I'd like to suggest you create a text type query parameter and input id list which concatenate with 'comma' delimiter.
Regards,
Xiaoxin Sheng