Job (v1) - Starting and Stopping Jobs
Introduction
The Superna Eyeglass REST API - v1 Jobs allows for starting, stopping, and managing failover jobs, rehearsal jobs, and failover-related tasks. This API provides programmatic access to various job management operations for disaster recovery and system resilience.
Endpoints
GET /v1/jobs
Description: Returns failover jobs from Superna Eyeglass.
Response Content Type: application/json
Parameters:
| Parameter | Value | Description | Parameter Type | Data Type | 
|---|---|---|---|---|
| state | optional | filter running or complete jobs [all, running, finished] | query | string | 
| success | optional | filter jobs by result success [true, false] | query | boolean | 
Response Codes:
200 OK: Successfully retrieved jobs.default: Error payload, see response structure.
Example Responses:
[
  {
    "failoverTarget": {
      "policies": [
        {
          "failoverReadiness": {
            "status": "OK"
          },
          "id": "string",
          "name": "string",
          "readinessDetail": [
            {
              "name": "string",
              "reason": "string",
              "status": {
                "status": "OK"
              },
              "statusChildren": [
                {}
              ]
            }
          ],
          "target": {
            "id": "string",
            "ip": "string",
            "name": "string"
          },
          "zone": {
            "failoverReadiness": {
              "status": "OK"
            },
            "id": "string",
            "name": "string",
            "readinessDetail": [
              {
                "name": "string",
                "reason": "string",
                "status": {
                  "status": "OK"
                },
                "statusChildren": [
                  {}
                ]
              }
            ]
          }
        }
      ],
      "zone": {
        "failoverReadiness": {
          "status": "OK"
        },
        "id": "string",
        "name": "string",
        "readinessDetail": [
          {
            "name": "string",
            "reason": "string",
            "status": {
              "status": "OK"
            },
            "statusChildren": [
              {}
            ]
          }
        ]
      }
    },
    "finished": 0,
    "id": "string",
    "jobStatusDetails": {
      "childrenDetails": [
        {}
      ],
      "finished": 0,
      "id": "string",
      "info": "string",
      "name": "string",
      "started": 0,
      "state": "string",
      "status": "string"
    },
    "jobType": "zone_failover",
    "name": "string",
    "sourceNode": {
      "id": "string",
      "ip": "string",
      "name": "string"
    },
    "started": 0,
    "success": true,
    "targetNode": {
      "id": "string",
      "ip": "string",
      "name": "string"
    }
  }
]
POST /v1/jobs
Description: Launch a new failover job in Eyeglass.
Response Content Type: application/json
Parameters:
| Parameter | Value | Description | Parameter Type | Data Type | 
|---|---|---|---|---|
| sourceid | required | ID of the source node for this job | query | string | 
| targetid | required | ID of the target node for this job | query | string | 
| failovertarget | required | ID of the access zone to failover OR IDs of syncIQ policies (comma separated) to failover | query | string | 
| pool | optional | Pool name in case of pool failover. The name format is groupName:subnetName:poolName | query | string | 
| controlled | true (default) | Execute a controlled failover by running operations against the source cluster as well as the target | query | boolean | 
| datasync | true (default) | Run the final incremental data sync before failover | query | boolean | 
| configsync | false (default) | Run a configuration sync before failover | query | boolean | 
| resyncprep | true (default) | Run resync prep on the source cluster to create the mirror policies | query | boolean | 
| disablemirror | false (default) | Disable mirror policies created on the failover target | query | boolean | 
| quotasync | true (default) | Run quota jobs to failover quotas to target | query | boolean | 
| blockonwarnings | true (default) | Block failover on warnings | query | boolean | 
| rollbackrenameshares | true (default) | Rollback renamed shares on failure | query | boolean | 
| smbdataintegrity | false (default) | SMB data integrity failover | query | boolean | 
Response Codes:
201 Created: Job successfully created.default: Error payload, see response structure.
Example Responses:
    {
    "id": "string"
    }
GET /v1/jobs/{id}
Description: Retrieve a failover job by id.
Response Content Type: application/json
Parameters:
| Parameter | Value | Description | Parameter Type | Data Type | 
|---|---|---|---|---|
id | required | ID of the job to retrieve | path | string | 
Response Codes:
200 OK: Job successfully retrieved.default: Error payload, see response structure.
Example Responses:
    {
    "failoverTarget": {
        "policies": [
        {
            "failoverReadiness": {
            "status": "OK"
            },
            "id": "string",
            "name": "string",
            "readinessDetail": [
            {
                "name": "string",
                "reason": "string",
                "status": {
                "status": "OK"
                },
                "statusChildren": [
                {}
                ]
            }
            ],
            "target": {
            "id": "string",
            "ip": "string",
            "name": "string"
            },
            "zone": {
            "failoverReadiness": {
                "status": "OK"
            },
            "id": "string",
            "name": "string",
            "readinessDetail": [
                {
                "name": "string",
                "reason": "string",
                "status": {
                    "status": "OK"
                },
                "statusChildren": [
                    {}
                ]
                }
            ]
            }
        }
        ],
        "zone": {
        "failoverReadiness": {
            "status": "OK"
        },
        "id": "string",
        "name": "string",
        "readinessDetail": [
            {
            "name": "string",
            "reason": "string",
            "status": {
                "status": "OK"
            },
            "statusChildren": [
                {}
            ]
            }
        ]
        }
    },
    "finished": 0,
    "id": "string",
    "jobStatusDetails": {
        "childrenDetails": [
        {}
        ],
        "finished": 0,
        "id": "string",
        "info": "string",
        "name": "string",
        "started": 0,
        "state": "string",
        "status": "string"
    },
    "jobType": "zone_failover",
    "name": "string",
    "sourceNode": {
        "id": "string",
        "ip": "string",
        "name": "string"
    },
    "started": 0,
    "success": true,
    "targetNode": {
        "id": "string",
        "ip": "string",
        "name": "string"
    }
    }
GET /v1/jobs/{id}/log
Description: Get the failover jobs log.
Response Content Type: text/plain
Parameters:
| Parameter | Value | Description | Parameter Type | Data Type | 
|---|---|---|---|---|
| id | required | ID of the job to retrieve | path | string | 
Response Codes:
200 OK: Log successfully retrieved.default: Error payload, see response structure.