Skip to main content
Version: 2.9.0

Jobs (v2) - Manage Jobs in Superna Eyeglass

Introduction

The Superna Eyeglass REST API - v2 Jobs allows for programmatic management of jobs, providing endpoints to create, retrieve, update, and delete various types of jobs including failover, readiness, and replication jobs.

Endpoints

GET /v2/jobs/failover

Description: Returns failover jobs from Superna Eyeglass.

Parameters:

ParameterTypeLocationDescription
statestringqueryFilter running or complete jobs (all, running, finished).
successbooleanqueryFilter jobs by result success (true, false).

Response Codes:

  • 200 OK: Successfully retrieved jobs.
  • default: Error payload, see response structure.

Example Responses:

200 OK:

[
{
"id": "job1",
"name": "FailoverJob1",
"status": "running",
"startTime": "2024-11-01T10:00:00Z",
"endTime": "2024-11-01T12:00:00Z"
}
]

Default (Error):

{
"code": 400,
"message": "Invalid request parameters"
}

Model Job:

{
"failoverTarget": {
"policies": [
{
"id": "string",
"name": "string",
"failoverReadiness": {
"status": "OK"
},
"readinessDetail": [
{
"name": "string",
"reason": "string",
"status": {
"status": "OK"
},
"statusChildren": []
}
],
"target": {
"id": "string",
"ip": "string",
"name": "string"
},
"zone": {
"id": "string",
"name": "string",
"failoverReadiness": {
"status": "OK"
},
"readinessDetail": []
}
}
],
"zone": {
"id": "string",
"name": "string",
"failoverReadiness": {
"status": "OK"
},
"readinessDetail": []
}
},
"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 /v2/jobs/failover

Description: Launch a new failover job in Eyeglass.

Parameters:

ParameterTypeLocationDescription
sourceidstringqueryID of the source node for this job.
targetidstringqueryID of the target node for this job.
failovertargetstringqueryID of the access zone to failover OR IDs of syncIQ policies (comma separated) to failover.
poolstringqueryPool name in case of pool failover. The name format is groupName:subnetName:poolName.
controlledbooleanqueryExecute a controlled failover by running operations against the source cluster as well as the target.
datasyncbooleanqueryRun the final incremental data sync before failover.
configsyncbooleanqueryRun a configuration sync before failover.
resyncprepbooleanqueryRun resync prep on the source cluster to create the mirror policies.
disablemirrorbooleanqueryDisable mirror policies created on the failover target.
quotasyncbooleanqueryRun quota jobs to failover quotas to target.
blockonwarningsbooleanqueryBlock failover on warnings.
rollbackrenamedsharesbooleanqueryRollback renamed shares on failure.
smbdataintegritybooleanquerySMB data integrity failover.

Response Codes:

  • 201 Created: Successfully created the failover job.
  • default: Error payload, see response structure.

Example Responses:

201 Created:

{
"id": "job1"
}

Default (Error):

{
"code": 400,
"message": "Invalid request parameters"
}

POST /v2/jobs/failover/drtest

Description: Enter/Exit DR test mode for a given policy.

cURL Example:

curl -X POST --header 'Content-Type: application/json' 'https://<your-ip>/sera/v2/jobs/failover/drtest?enable={enable}&configsync={configsync}&datasync={datasync}&policy={policy}'

Parameters:

ParameterTypeLocationDescription
enablebooleanqueryTrue = Make target writable (Enter DR test mode). False = Make target read-only (Exit DR test mode).
configsyncbooleanqueryRun a configuration while DR test job.
datasyncbooleanqueryRun policy while DR test job.
policystringqueryDR testing policy id (as retrieved with /nodes/{id}/policies GET).

Response Codes:

  • 201 Created: Successfully created the DR test job.
  • default: Error payload, see response structure.

Example Responses:

201 Created:

{
"id": "job1"
}

Default (Error):

{
"code": 400,
"message": "Invalid request parameters"
}

POST /v2/jobs/failover/rehearsal

Description: Launch a new rehearsal job in Eyeglass.

Parameters:

ParameterTypeLocationDescription
enablebooleanqueryEnable or disable (=false) the rehearsal mode.
sourceidstringqueryID of the source node for this job.
targetidstringqueryID of the target node for this job.
failovertargetstringqueryID of the access zone to failover OR IDs of SyncIQ policies (comma separated) to failover.
poolstringqueryPool name in case of pool failover. The name format is groupName:subnetName:poolName.

Response Codes:

  • 201 Created: Successfully created the rehearsal job.
  • default: Error payload, see response structure.

Example Responses:

201 Created:

{
"id": "job1"
}

Default (Error):

{
"code": 400,
"message": "Invalid request parameters"
}

DELETE /v2/jobs/failover/{id}

Description: Cancels a running failover job.

Parameters:

ParameterTypeLocationDescription
idstringpathID of the job to retrieve.
emptyobjectbodyEmpty body for delete request {}.

Response Codes:

  • 200 OK: Successfully canceled the job.
  • default: Error payload, see response structure.

Example Responses:

200 OK:

{
"id": "job1"
}

Default (Error):

{
"code": 400,
"message": "Invalid request parameters"
}

GET /v2/jobs/failover/{id}

Description: Retrieve a failover job by ID.

Parameters:

ParameterValueDescriptionParameter TypeData Type
idrequiredID of the job to retrievepathstring

Response Codes:

  • 200 OK: Successfully retrieved the failover job.
  • default: Error payload, see response structure.

Example Responses:

200 OK:

{
"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"
}
}

Default (Error):

{
"code": 0,
"message": "string"
}

GET /v2/jobs/failover/{id}/log

Description: Get the failover job log by ID.

Parameters:

ParameterValueDescriptionParameter TypeData Type
idrequiredID of the job to retrievepathstring

Response Codes:

  • 200 OK: Successfully retrieved the failover job log.
  • default: Error payload, see response structure.

Example Responses:

200 OK:

<log content here>

Default (Error):

{
"code": 0,
"message": "string"
}

GET /v2/jobs/readiness

Description: View all recent readiness jobs.

Parameters:

ParameterValueDescriptionParameter TypeData Type
state(optional)Filter running or complete jobs [all, running, finished]querystring

Response Codes:

  • 200 OK: Successfully retrieved readiness jobs.
  • default: Error payload, see response structure.

Example Responses:

200 OK:

[
{
"childrenDetails": [
{}
],
"finished": 0,
"id": "string",
"info": "string",
"name": "string",
"started": 0,
"state": "string",
"status": "string"
}
]

Default (Error):

{
"code": 0,
"message": "string"
}

POST /v2/jobs/readiness

Description: Run a zone readiness job.

Response Codes:

  • 201 Created: Successfully created readiness job.
  • default: Error payload, see response structure.

Example Responses:

201 Created:

{
"id": "string"
}

Default (Error):

{
"code": 0,
"message": "string"
}

GET /v2/jobs/readiness/{id}

Description: Retrieve a specific recently run readiness job, if it exists.

Parameters:

ParameterValueDescriptionParameter TypeData Type
idrequiredID of the job to retrievepathstring

Response Codes:

  • 200 OK: Successfully retrieved readiness job.
  • default: Error payload, see response structure.

Example Responses:

200 OK:

{
"childrenDetails": [
{}
],
"finished": 0,
"id": "string",
"info": "string",
"name": "string",
"started": 0,
"state": "string",
"status": "string"
}

Default (Error):

{
"code": 0,
"message": "string"
}

GET /v2/jobs/replication

Description: View all recent replication jobs.

Parameters:

ParameterValueDescriptionParameter TypeData Type
stateFilter running or complete jobs [all, running, finished]querystring

Response Codes:

  • 200 OK: Successfully retrieved replication jobs.
  • default: Error payload, see response structure.

Example Responses:

200 OK:

[
{
"childrenDetails": [
{}
],
"finished": 0,
"id": "string",
"info": "string",
"name": "string",
"started": 0,
"state": "string",
"status": "string"
}
]

Default (Error):

{
"code": 0,
"message": "string"
}

POST /v2/jobs/replication

Description: Run a configuration replication job.

Response Codes:

  • 201 Created: Successfully created the replication job.
  • default: Error payload, see response structure.

Example Responses:

201 Created:

{
"id": "string"
}

Default (Error):

{
"code": 0,
"message": "string"
}

GET /v2/jobs/replication/{id}

Description: Retrieves a specific replication job, if it was run recently.

Parameters:

ParameterValueDescriptionParameter TypeData Type
idrequiredID of the job to retrievepathstring

Response Codes:

  • 200 OK: Successfully retrieved the replication job.
  • default: Error payload, see response structure.

Example Responses:

200 OK:

{
"childrenDetails": [
{}
],
"finished": 0,
"id": "string",
"info": "string",
"name": "string",
"started": 0,
"state": "string",
"status": "string"
}

Default (Error):

{
"code": 0,
"message": "string"
}