Hi,
I’m working my way through the API documentation to build an internal proof of concept based on the data on your demo site.
I’m looking for the label “Control last audit expired” in this view.
I have queried compliance-managements/index
and receive all the data in the format I expect. I’ve also queried the compliance-managements/dynamic-statuses
endpoint and receive, among other items, this data which I believe is what I’m looking for.
{
"id": 151,
"slug": "SecurityService-current_audit_expired",
"name": "Control Last Audit Expired",
"description": null,
"model": "ComplianceManagements",
"field": null,
"type": 1,
"color": "#FF9800",
"status": 1,
"created": "2022-09-09T14:08:11+02:00"
},
A theory I have is that I want to look in the compliance-managements/{foreign_key}/dynamic-status-values
endpoint but this is where I’m lost. I’m regardless what foreign key I put in, I get the same result back:
{'data': [{'dynamic_status_id': 145, 'foreign_key': 1, 'id': 1450, 'value': 0},
{'dynamic_status_id': 146, 'foreign_key': 1, 'id': 1451, 'value': 0},
{'dynamic_status_id': 147, 'foreign_key': 1, 'id': 1452, 'value': 0},
{'dynamic_status_id': 148, 'foreign_key': 1, 'id': 1453, 'value': 0},
{'dynamic_status_id': 149, 'foreign_key': 1, 'id': 1454, 'value': 0},
{'dynamic_status_id': 150, 'foreign_key': 1, 'id': 1455, 'value': 0},
{'dynamic_status_id': 151, 'foreign_key': 1, 'id': 1456, 'value': 0},
{'dynamic_status_id': 152, 'foreign_key': 1, 'id': 1457, 'value': 0},
{'dynamic_status_id': 153, 'foreign_key': 1, 'id': 1458, 'value': 0},
{'dynamic_status_id': 154, 'foreign_key': 1, 'id': 1459, 'value': 0},
{'dynamic_status_id': 155, 'foreign_key': 1, 'id': 1460, 'value': 0},
{'dynamic_status_id': 156, 'foreign_key': 1, 'id': 1461, 'value': 0},
{'dynamic_status_id': 157, 'foreign_key': 1, 'id': 1462, 'value': 0},
{'dynamic_status_id': 158, 'foreign_key': 1, 'id': 1463, 'value': 0},
{'dynamic_status_id': 159, 'foreign_key': 1, 'id': 1464, 'value': 0},
{'dynamic_status_id': 160, 'foreign_key': 1, 'id': 1465, 'value': 0},
{'dynamic_status_id': 214, 'foreign_key': 1, 'id': 3576, 'value': 0},
{'dynamic_status_id': 215, 'foreign_key': 1, 'id': 3703, 'value': 0},
{'dynamic_status_id': 216, 'foreign_key': 1, 'id': 3830, 'value': 0},
{'dynamic_status_id': 217, 'foreign_key': 1, 'id': 3957, 'value': 0},
{'dynamic_status_id': 218, 'foreign_key': 1, 'id': 4084, 'value': 0},
{'dynamic_status_id': 219, 'foreign_key': 1, 'id': 4211, 'value': 0},
{'dynamic_status_id': 224, 'foreign_key': 1, 'id': 8201, 'value': 0},
{'dynamic_status_id': 225, 'foreign_key': 1, 'id': 8328, 'value': 0},
{'dynamic_status_id': 287,
'foreign_key': 1,
'id': 32727,
'value': 0}],
'pagination': {'count': 25,
'current_page': 1,
'has_next_page': False,
'has_prev_page': False,
'limit': 100,
'page_count': 1},
'success': True}
Can you please suggest how I would go about fetching the dynamic status data for each item in the compliance analysis view (ie Eramba)?
Thank you.