Yes you can use the API for this, here are the operations specific to the Account Discovery Rule:
1. GET /v3/AssetPartitions
- Note the AssetPartitions id
2. GET /v3/AssetPartitions/{id}/AccountDiscoverySchedules
- Use the id from #1 to get the scheduleID for the specific AssetPartition
3. GET /v3/AssetPartitions/{id}/AccountDiscoverySchedules/{scheduleId}/Rules
- Use the AssetPartitions id and the ScheduleID to view the current rule details
4. PUT /v3/AssetPartitions/{id}/AccountDiscoverySchedules/{scheduleId}/Rules
- Use the AssetPartitions id and the ScheduleID to modify the rule filter with the end of line character