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:
| Parameter | Type | Location | Description |
|---|---|---|---|
| state | string | query | Filter running or complete jobs (all, running, finished). |
| success | boolean | query | Filter 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:
| Parameter | Type | Location | Description |
|---|---|---|---|
| sourceid | string | query | ID of the source node for this job. |
| targetid | string | query | ID of the target node for this job. |
| failovertarget | string | query | ID of the access zone to failover OR IDs of syncIQ policies (comma separated) to failover. |
| pool | string | query | Pool name in case of pool failover. The name format is groupName:subnetName:poolName. |
| controlled | boolean | query | Execute a controlled failover by running operations against the source cluster as well as the target. |
| datasync | boolean | query | Run the final incremental data sync before failover. |
| configsync | boolean | query | Run a configuration sync before failover. |
| resyncprep | boolean | query | Run resync prep on the source cluster to create the mirror policies. |
| disablemirror | boolean | query | Disable mirror policies created on the failover target. |
| quotasync | boolean | query | Run quota jobs to failover quotas to target. |
| blockonwarnings | boolean | query | Block failover on warnings. |
| rollbackrenamedshares | boolean | query | Rollback renamed shares on failure. |
| smbdataintegrity | boolean | query | SMB 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:
| Parameter | Type | Location | Description |
|---|---|---|---|
| enable | boolean | query | True = Make target writable (Enter DR test mode). False = Make target read-only (Exit DR test mode). |
| configsync | boolean | query | Run a configuration while DR test job. |
| datasync | boolean | query | Run policy while DR test job. |
| policy | string | query | DR 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:
| Parameter | Type | Location | Description |
|---|---|---|---|
| enable | boolean | query | Enable or disable (=false) the rehearsal mode. |
| sourceid | string | query | ID of the source node for this job. |
| targetid | string | query | ID of the target node for this job. |
| failovertarget | string | query | ID of the access zone to failover OR IDs of SyncIQ policies (comma separated) to failover. |
| pool | string | query | Pool 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:
| Parameter | Type | Location | Description |
|---|---|---|---|
| id | string | path | ID of the job to retrieve. |
| empty | object | body | Empty 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:
| Parameter | Value | Description | Parameter Type | Data Type |
|---|---|---|---|---|
| id | required | ID of the job to retrieve | path | string |
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:
| Parameter | Value | Description | Parameter Type | Data Type |
|---|---|---|---|---|
| id | required | ID of the job to retrieve | path | string |
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:
| Parameter | Value | Description | Parameter Type | Data Type |
|---|---|---|---|---|
| state | (optional) | Filter running or complete jobs [all, running, finished] | query | string |
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:
| Parameter | Value | Description | Parameter Type | Data Type |
|---|---|---|---|---|
| id | required | ID of the job to retrieve | path | string |
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:
| Parameter | Value | Description | Parameter Type | Data Type |
|---|---|---|---|---|
| state | Filter running or complete jobs [all, running, finished] | query | string |
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:
| Parameter | Value | Description | Parameter Type | Data Type |
|---|---|---|---|---|
| id | required | ID of the job to retrieve | path | string |
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"
}