FortiDirector uses conditions to determine if a redirector Rule is a match for a given request.
Article Id 192397
This article provides information regarding the functionality of the FortiDirector API.

FortiDirector offers an extensive developer API.  However, there have been a few scenarios that customers have requested that the current API does not address.

Ability to configure Health Checks via the API

There are no APIs at this time that will manage a health check that is assigned to a network resource.  It is recommended that once a Network Resource is created via an API, that a user log in and create a health check manually for the network resource.

Ability to modify a rule

There are no APIs at this time that will manage the details of rule within a ruleset.  It is recommended that and changes to rules within a ruleset be performed manually by a logged-in user.

Ability to modify the Geographic routing of a Rule

If a Network Resources is assigned to rule, the network resource cannot be deleted via the API.  Additionally, users cannot assign network resources to a rule to extend the geographic routing.

Bulk management of Health Checks

There is currently no ability via the Dashboard UI to modify health checks in bulk, nor have "template" health checks that can be assigned to a network resource.