Rollback a Patch
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/MySQLCS/instances/{serviceId}/patches/{rollbackId}/rollback
Request
- application/json
-
identityDomainId: string
Name of the identity domain for the MySQL Cloud Service account.
-
rollbackId: string
ID of the rollback that is associated to the completed patching operation.
-
serviceId: string
The user-defined name of the Oracle MySQL Cloud Service instance.
-
X-ID-TENANT-NAME: string
Name of the identity domain for the MySQL Cloud Service account.
object
-
additionalNote(optional):
string
Free-form text to provide additional information about the rollback.
Response
- application/json
202 Response
object
Response Body
-
jobId(optional):
string
Job ID for the operation.
-
message(optional):
string
System message that describes the operation. For example:
Submitted job to create service [{serviceId}] in domain [{identityDomainId}].
Examples
The following example shows how to roll back an applied patch to a MySQL Cloud Service instance by submitting a PUT request on the REST endpoint using cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the Oracle Public Cloud or Oracle Cloud Machine REST server to contact for your identity domain or tenant name. See Send Requests for the appropriate URL structure to use on Oracle Public Cloud or Oracle Cloud Machine.
Note: Sending a request body is always required, but it may be empty as demonstrated in this example.
cURL Command
curl -i -X PUT \ -u "username:password" \ -H "X-ID-TENANT-NAME: ExampleIdentityDomain" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d "{}" \ https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/instances/MyTestInstance/patches/234688/rollback
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 202 Accepted
Server: Oracle-Application-Server-11g
Location: https://rest_server_url:443/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/instances/MyTestInstance/patches/applied/job/4208393
Content-Language: en
Access-Control-Allow-Headers: Content-Type, api_key, Authorization
Retry-After: 60
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
X-ORACLE-DMS-ECID: 005GtE6esmu6uHFpR05Eid0003Vg0003Dr
X-ORACLE-DMS-ECID: 005GtE6esmu6uHFpR05Eid0003Vg0003Dr
Access-Control-Allow-Origin: *
X-Frame-Options: DENY
Content-Type: application/json
Vary: user-agent
Date: Wed, 14 Dec 2016 00:36:22 GMT
Connection: close
Example of Response Body
The following shows an example of the response body in JSON format.
{
"status": "Completed",
"details": {
"message": "PATCHING-5038: Rollback of service from patch [5.7.16-EE] is submitted as an asynchronous job.",
"jobId": "4208393"
}
}
Example Checking the Rollback Status
The following shows an example of checking a Rollback status. Included here is the cURL example, Response Header, and Response Body.
curl -i -X GET \ -u "username:password" \ -H "X-ID-TENANT-NAME: ExampleIdentityDomain" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/instances/MyTestInstance/patches/applied/job/4208393 HTTP/1.1 202 Accepted Server: Oracle-Application-Server-11g Content-Language: en Content-Location: https://rest_server_url:443/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/instances/MyTestInstance/patches/applied/234688 Access-Control-Allow-Headers: Content-Type, api_key, Authorization Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD X-ORACLE-DMS-ECID: 001GtEBQ4wj6uHFpR05Eid0003Vg0003Ee X-ORACLE-DMS-ECID: 001GtEBQ4wj6uHFpR05Eid0003Vg0003Ee Access-Control-Allow-Origin: * X-Frame-Options: DENY Content-Type: application/json Vary: user-agent Date: Wed, 14 Dec 2016 00:37:42 GMT Connection: close [ { "backupStatus":"Available", "additionalNote":"This note is the default note: Rolling back the service from the patch [234688].", "appliedBy":"someone@example.org", "appliedDate":"2016-12-14T00:36:22.831+0000", "totalTime":"0 min, 0 sec", "patchId":"5.7.16-EE", "patchDescription":"MySQL Server version 5.7.16", "patchReleaseUrl":"https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-16.html", "releaseDate":"2016-10-12T09:00:00.000+0000", "resultMessage":"Rollback in progress", "lastStatus":"IN_PROGRESS", "lastStatusMessage":"Rollback in progress", "componentPatches":{ "mysql":{ "id":1451, "version":"5.7", "releaseVersion":"5.7.16", "displayName":"MySQL Server version 5.7.16", "description":"MySQL Server version 5.7.16", "zipBundles":{ "MSAAS":{ "id":1521, "md5sum":"ec434747c1e3d5d0f644ff3d9bd54915", "provisioningObjectRef":"MSCS/5.7.16/MySQL_Binaries-5.7.16.zip", "storageKey":"MSCS/5.7.16/MySQL_Binaries-5.7.16.zip", "releaseDate":"10/12/2016", "releaseUrl":"https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-16.html", "displayName":"MySQL Server version 5.7.16" } }, "preserveFiles":[ ] } }, "patchComponents":[ { "id":1451, "component":"mysql", "version":"5.7", "md5sum":"ec434747c1e3d5d0f644ff3d9bd54915", "provisioningObjectRef":"MSCS/5.7.16/MySQL_Binaries-5.7.16.zip", "patchingObjectRef":"MSCS/5.7.16/MySQL_Binaries-5.7.16.zip", "preserveFiles":[ ] } ], "patchType":"Quarterly", "patchCategory":"Upgrade", "patchSeverity":"Normal", "jobId":"4208393", "displayName":"5.7.16", "toVersion":"5.7.16", "inProgress":true, "operationType":"Rollback", "id":234688, "patchingResult":{ "patchingId":195821, "versionBeforeThisPatch":"mysql 5.7.15", "strategy":"Rolling", "releaseVersionBeforeThisPatch":"5.7.15", "customRollbackId":"8207169_1481663596038", "startDate":"2016-12-13T21:13:16.038+0000", "endDate":"2016-12-13T21:15:04.030+0000", "patchingStatus":"COMPLETED", "resultMessage":"MySQL patching succeeded", "additionalNote":"Applying 5.7.16-EE patch as discussed with team on KB-43123.", "appliedBy":"someone@example.org", "jobId":"4207169", "completeLog":"", "progressMessages":[ "9:13:15.926 PM Phase initialize started", "9:13:16.079 PM Phase initialize completed", "9:13:16.195 PM Phase patch started", "9:13:16.308 PM Phase patch-rex started", "9:15:03.436 PM Phase patch-rex completed", "9:15:03.697 PM Phase patch completed", "9:15:03.814 PM Phase finalize started", "9:15:03.911 PM Completed" ] }, "rollbackResult":{ "rollbackId":552, "startDate":"2016-12-14T00:36:22.831+0000", "endDate":"2016-12-14T00:36:23.033+0000", "patchingStatus":"IN_PROGRESS", "additionalNote":"This note is the default note: Rolling back the service from the patch [234688].", "appliedBy":"someone@example.org", "jobId":"4208393", "completeLog":"", "progressMessages":[ "12:36:22.828 AM Phase initialize started", "12:36:22.872 AM Phase initialize completed", "12:36:22.938 AM Phase rollback started", "12:36:23.025 AM Phase rollback-rex started" ] }, "rollbackId":"234688", "rollbackVersion":"mysql 5.7.15", "currentPatchLevel":"mysql 5.7.16", "progressMessages":[ "12:36:22.828 AM Phase initialize started", "12:36:22.872 AM Phase initialize completed", "12:36:22.938 AM Phase rollback started", "12:36:23.025 AM Phase rollback-rex started" ] } ]