The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi everyone. I am posting again because could'nt find my solution.
ISSUE:
URL: https://vcc-na8.8x8.com/api/stats/agents//agents/{agent-id}/activities?n={offset}
As you can see in above URL that I have to add agent id every single time and this API provides 50 rows per request.
NOTE: API does not provide any information on count etc
With help of @mahoneypat I was able to create a function which allows me to extract all id's along with the pagination, PFB,
(id as text)=>
let
Source =
List.Generate( ()=>[result = try Xml.Tables(Web.Contents("https://vcc-na8.8x8.com",[RelativePath="/api/stats/agents/"&(id)&"/activities?n=1"])) otherwise null, n=1],
each [result]<> null,
each [result = try Xml.Tables(Web.Contents("https://vcc-na8.8x8.com",[RelativePath="/api/stats/agents/"&(id)&"/activities?n="&Number.ToText([n]+50)])) otherwise null, n=[n]+50],
each [result])
in
Source
Issue with the function:
1.Function is providing infinite tables. it is on constant loop I think.
2. When i try to invoke this function with Agent id's from new table it only formats the table with the first ID which is empty and provides null values.
3. It is on constant load. does'nt do anything.
PFB the link to my video which i have created for the better understanding. It will save your time to provide the solution.
Link: https://drive.google.com/file/d/1xbASl1EaziV3qp1ptZlzCtA-fbXnbJ3R/view?usp=sharing
API Documentation: https://support.8x8.com/cloud-contact-center/virtual-contact-center/developers/8x8-contact-center-st...
Requirment: Looking for a function which provides all the id's with all the rows(Pagination).
Really looking forward for someone's help.
Best,
Saad.
Hi @Saadii_360o ,
After watching the videos and formulas you provided many times, it is difficult to find out the specific issue. Unfortunately, I can't go deep into the issue because of the website needs to log in and cannot be registered, this may involve your privacy information. It is recommended that you create a support ticket for further help.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.