I'm doing an integration with Checkmarx.
I sent the request to create a new report, it worked well. But, the proccess take a time, so, I need to wait to report be create and download it.
Sample Response: { "location": "/reports/sastScan/1", "contentType": "application/xml", "status": { "id": 2, "value": "In Process" } }
Sample Response: { "location": "/reports/sastScan/1", "contentType": "application/xml", "status": { "id": 2, "value": "Created" } }
I'd like to know how create a monitoring in python when the "value" is "Created" get it and continue my python script.
Thanks!
One simple option would be to have a while loop after your initial post that stays looping until the status turns to created. The psuedocode for this would be
post_request()
flag = false
while(flag == false):
if(status == complete):
flag = true
get_status()
This will trap the program in the while loop until your request comes in.