{"type":"api","title":"Set maintenance mode state of Crosswork","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/21eb1d117a633ad17a20da730c09f519133958a8/6c49d803-9bf6-348b-b43b-bf553e163c6f","info":{"title":"Crosswork Backup Restore Manager API","description":"Backup Restore Manager provides API methods for backup and restore operations on Crosswork. This includes backup, data only backup, restore, data only restore and migration.","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"https://www.cisco.com/public/sw-license-agreement.html"},"version":"2.0.0"},"x-parser-conf":{"overview":{"markdownPath":"reference/INFRA/BACKUP_RESTORE/backup-restore-v2-overview.md"}},"openapi":"3.0.1","servers":[{"url":"https://{cw_ip}:30603/crosswork/platform/v2"}],"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Security definitions details.","name":"Authorization","in":"header"}}},"spec":{"tags":["BackupServices"],"summary":"Set maintenance mode state of Crosswork","description":"Enables or disables maintenance mode for Crosswork, which temporarily suspends normal operations to allow for safe backup, restore, or maintenance activities. When enabled, this mode ensures data consistency during critical operations by preventing new jobs from starting and allowing existing jobs to complete safely.","operationId":"BackupServices_RequestMaintenanceMode","requestBody":{"description":"Parameters to set maintenance mode state of Crosswork","content":{"application/json":{"schema":{"type":"object","properties":{"isSetMaintenance":{"type":"boolean","description":"Flag to enable (true) or disable (false) maintenance mode on Crosswork"}},"description":"Request object for setting the maintenance mode state of Crosswork","example":{"isSetMaintenance":true},"$$ref":"#/components/schemas/backupRequestMaintenanceModeOp"}}},"required":true},"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Status message about the maintenance mode operation result"},"requestStatus":{"type":"string","description":"Enumeration of possible status outcomes for maintenance mode requests on Crosswork","default":"Maintenance_Mode_Request_Status_Success","enum":["Maintenance_Mode_Request_Status_Success","Maintenance_Mode_Request_Status_Failed"],"$$ref":"#/components/schemas/backupMaintenanceModeRequestStatusType"},"modeStatus":{"type":"string","description":"Enumeration of possible maintenance mode states for Crosswork system","default":"Maintenance_Mode_Off","enum":["Maintenance_Mode_Off","Maintenance_Mode_On","Maintenance_Mode_On_In_Progress","Maintenance_Mode_Off_In_Progress"],"$$ref":"#/components/schemas/backupMaintenanceModeStatusType"}},"description":"Response containing the result of a maintenance mode operation on Crosswork","example":{"message":"Processing maintenance mode request","requestStatus":"Maintenance_Mode_Request_Status_Success","modeStatus":"Maintenance_Mode_On"},"$$ref":"#/components/schemas/backupResponseMaintenanceModeOp"}},"example":{"example":{}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message"},"code":{"type":"integer","description":"gRPC status code indicating the type of error","format":"int32"},"message":{"type":"string","description":"Detailed error message with context"},"details":{"type":"array","description":"Additional error details in protocol buffer format","items":{"type":"object","properties":{"type_url":{"type":"string","description":"URL that describes the type of the serialized message"},"value":{"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","type":"string","description":"Serialized protocol buffer message content","format":"byte"}},"description":"A generic message type that can hold any serialized protocol buffer message along with a URL that describes the type of the serialized message","example":{"type_url":"type.googleapis.com/error.details","value":"CgVoZWxsbw=="},"$$ref":"#/components/schemas/protobufAny"}}},"description":"Standard error response containing error details, status code, message, and additional context","example":{"error":"Internal server error","code":13,"message":"Failed to process backup request due to insufficient resources","details":[]},"$$ref":"#/components/schemas/runtimeError"}},"example":{"example":{"error":"","code":13,"message":"failed to marshal error message","details":[]}}}}},"x-codegen-request-body-name":"body","__originalOperationId":"BackupServices_RequestMaintenanceMode","method":"post","path":"/platform/maintenance/set"}}