Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
IrieSec
Regular Visitor

Overcome API limit

I have the folling query however it only returns 100 rows and I  need to get 1000 tines that.

IrieSec_0-1646844510269.png

 

I need to add two parameters from the API under "request data":

- search_from

- search_to

 

like this:

IrieSec_1-1646844931308.png

 

Any ideas how to include that?

 

2 REPLIES 2
IrieSec
Regular Visitor

This is the API that I am using so the parameters are a little different. See API here: Get Endpoints (paloaltonetworks.com)

 

let
body = "{ ""request_data"": {}}",
GetJson = Json.Document(Web.Contents("https://[URI].paloaltonetworks.com/public_api/v1/endpoints/get_endpoint/",
[
Headers= [
#"Content-Type"="application/json",
#"x-xdr-auth-id"="Auth_ID",
#"Authorization"="API_KEY",
#"search_from"="100",
#"search_to"="100000"
],
Content=Text.ToBinary(body)
]
)),
reply = GetJson[reply],
endpoints = reply[endpoints],
#"Converted to Table" = Table.FromList(endpoints, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"endpoint_id", "endpoint_name", "endpoint_type", "endpoint_status", "os_type", "os_version", "ip", "users", "domain", "alias", "first_seen", "last_seen", "content_version", "installation_package", "active_directory", "install_date", "endpoint_version", "is_isolated", "isolated_date", "group_name", "operational_status", "operational_status_description", "scan_status", "content_release_timestamp", "last_content_update_time"}, {"endpoint_id", "endpoint_name", "endpoint_type", "endpoint_status", "os_type", "os_version", "ip", "users", "domain", "alias", "first_seen", "last_seen", "content_version", "installation_package", "active_directory", "install_date", "endpoint_version", "is_isolated", "isolated_date", "group_name", "operational_status", "operational_status_description", "scan_status", "content_release_timestamp", "last_content_update_time"})
in
#"Expanded Column1"

 

The search_from & search_to highlighted in red should be under request_data also highlighted in red at the top of the query.

 

The syntax to get that don't is the part that I am having trouble with.

amitchandak
Super User
Super User

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.