File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 11import os
22import time
3- import json
43import requests
54from requests .adapters import HTTPAdapter , Retry
65
98token = os .environ .get ("JUPITERONE_TOKEN" )
109
1110# JupiterOne GraphQL API:
12- j1_graphql_url = "https://graphql.dev .jupiterone.io"
11+ j1_graphql_url = "https://graphql.us .jupiterone.io"
1312
1413# JupiterOne GraphQL API headers
1514j1_graphql_headers = {
6362 s .mount ('https://' , HTTPAdapter (max_retries = retries ))
6463 url_response = s .post (j1_graphql_url , headers = j1_graphql_headers , json = payload )
6564 download_url = url_response .json ()['data' ]['queryV1' ]['url' ]
66- print (download_url )
65+ # print(download_url)
6766
6867 download_response = s .get (download_url ).json ()
6968
7776 status = download_response ['status' ] # update 'status' for next iteration
7877
7978 all_query_results .extend (download_response ['data' ]) # add results to all results list
80- print (len (download_response ['data' ]))
79+ # print(len(download_response['data']))
8180
8281 # Update cursor from response
8382 if 'cursor' in download_response :
8483 cursor = download_response ['cursor' ]
85- print (cursor )
84+ # print(cursor)
8685
8786 else :
8887 break
8988
90- # print(all_query_results)
89+ print (all_query_results )
9190print (len (all_query_results ))
You can’t perform that action at this time.
0 commit comments