-
Does anyone have the sample for revealing the maintenance token ? I would like to upgrade our workflow when troubleshooting a agent who's been offline and won't connect to the console. |
Beta Was this translation helpful? Give feedback.
Answered by
jshcodes
Jul 10, 2021
Replies: 2 comments 1 reply
-
Hi @JayBabs! Try this and let us know if you have any questions or problems: from falconpy.sensor_update_policy import Sensor_Update_Policy as SensorPolicies
creds = {
"client_id": "API_CLIENT_ID_HERE",
"client_secret": "API_CLIENT_SECRET_HERE"
}
falcon = SensorPolicies(creds=creds)
result = falcon.revealUninstallToken(body={"device_id": "MAINTENANCE"})
try:
maint_token = result["body"]["resources"][0]["uninstall_token"]
except KeyError:
maint_token = "Unable to retrieve maintenance token, check that your API key has access to the Sensor Update Policy API."
print(f"Result: {maint_token}") |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jshcodes
-
Does this work with any agent that felt out of sync ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @JayBabs!
Try this and let us know if you have any questions or problems: