Resource URL: /platform/<<version=1>>/sync/target/policies

    Overview: This resource applies the standard collection pattern to OneFS
              sync target policies (sync policies on other clusters that target
              this cluster).

     Methods: GET

********************************************************************************

Method GET: List all SyncIQ target policies.

       URL: GET /platform/<<version=1>>/sync/target/policies

Query arguments:
target_path=<string> Filter the returned policies to include only those with
                     this target path.
       sort=<string> The field that will be used for sorting.
     limit=<integer> Return no more than this many results at once (see resume).
          dir=<enum> Where <enum> is one of ASC, DESC.  The direction of the
                     sort.
     resume=<string> Continue returning results from previous call using this
                     token (token should come from the previous call, resume
                     cannot be used with other options).

GET response body schema:
{
  "type": "object", 
  "properties": {
    "total": {
      "type": "integer", 
      "description": "Total number of items available."
    }, 
    "policies": {
      "items": {
        "type": "object", 
        "properties": {
          "name": {
            "required": true, 
            "type": "string", 
            "description": "User-assigned name of this sync policy."
          }, 
          "source_cluster_guid": {
            "required": true, 
            "type": "string", 
            "description": "Unique identifier for the source cluster."
          }, 
          "last_job_state": {
            "enum": [
              "scheduled", 
              "running", 
              "paused", 
              "finished", 
              "failed", 
              "canceled", 
              "needs_attention", 
              "skipped", 
              "pending", 
              "unknown"
            ], 
            "type": "string", 
            "description": "The state of the last job run for this policy.", 
            "required": true
          }, 
          "id": {
            "required": true, 
            "type": "string", 
            "description": "The system ID given to this sync policy."
          }, 
          "target_path": {
            "required": true, 
            "type": "string", 
            "description": "Absolute filesystem path on the target cluster for the sync destination."
          }, 
          "legacy_policy": {
            "required": true, 
            "type": "boolean", 
            "description": "Was this policy defined by a OneFS version earlier than 6.0? (Pre-6.0 policies did not have the target policy concept and canceling from the target side will not be available.)"
          }, 
          "source_host": {
            "required": true, 
            "type": "string", 
            "description": "Hostname or IP address of sync source cluster."
          }, 
          "last_update_from_source": {
            "required": true, 
            "type": [
              "integer", 
              "null"
            ], 
            "description": "The last time this cluster was updated with sync information from the source cluster for this policy, in unix epoch seconds.  Null if no such update has occurred yet."
          }, 
          "last_source_coordinator_ip": {
            "required": true, 
            "type": "string", 
            "description": "The IP address from which a SyncIQ coordinator daemon most recently connected to this cluster to update it about the progress of a job for this policy."
          }, 
          "failover_failback_state": {
            "enum": [
              "writes_disabled", 
              "enabling_writes", 
              "writes_enabled", 
              "disabling_writes", 
              "creating_resync_policy", 
              "resync_policy_created"
            ], 
            "type": "string", 
            "description": "The condition of this policy with respect to sync failover/failback.", 
            "required": true
          }
        }
      }, 
      "type": "array"
    }, 
    "resume": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
    }
  }
}
