View the Status of an Operation by Job Id
/paas/api/v1.1/activitylog/{identityDomainId}/job/{jobId}
Request
-
identityDomainId: string
Identity domain ID for the MySQL Cloud Service account.
-
jobId: string
Job ID of the operation. This is returned in the response header of the operation request.
-
X-ID-TENANT-NAME: string
Identity domain ID for the MySQL Cloud Service account.
Response
- application/json
200 Response
object
-
activityLogId(optional):
integer
ID of the activity log.
-
authDomain(optional):
string
Identity domain ID for the MySQL Cloud Service account.
-
authUser(optional):
string
Name of the user account used to perform the operation on the MySQL Cloud Service instance.
-
endDate(optional):
string
Date and time the job ended.
-
identityDomain(optional):
string
Identity domain ID for the MySQL Cloud Service account.
-
initiatedBy(optional):
string
Value is
USER
when the job is initiated by a service end user. -
jobId(optional):
integer
Job ID returned by the
Location
URI in the response header when the operation request was made. -
messages(optional):
array messages
Groups activity messages.
-
operationId(optional):
integer
ID of the operation.
-
operationType(optional):
string
Type of operation. For example,
CREATE_SERVICE
,SSH_PUBLIC_KEY_RESET
,CONFIG_CHANGE
, and so on. -
serviceId(optional):
integer
ID of the MySQL Cloud Service instance.
-
serviceName(optional):
string
Name of the MySQL Cloud Service instance.
-
serviceType(optional):
string
Cloud service type. Valid value is
MySQLCS
for MySQL Cloud Service. -
startDate(optional):
string
Date and time the job started.
-
status(optional):
string
Status of the job. Example status messages include:
RUNNING
,SUCCEED
, andFAILED
. -
summaryMessage(optional):
string
Operation type. For example,
CREATE_SERVICE
,SSH_PUBLIC_KEY_RESET
,CONFIG_CHANGE
, and so on.
object
-
activityDate(optional):
string
Date and time the activity was logged.
-
message(optional):
string
Details of the activity.
Examples
The following example shows how to view job status information for a MySQL Cloud Service instance 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.
cURL Command
This example checks the status of job id 5150771. Most POST/PUT actions return unique job id's in the response body as either job_id or jobId.
curl -i -X GET \ -u "username:password" \ -H "X-ID-TENANT-NAME: ExampleIdentityDomain" \ -H "Accept: application/json" \ https://rest_server_url/paas/api/v1.1/activitylog/ExampleIdentityDomain/job/5150771
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK
Server: Oracle-Application-Server-11g
X-ORACLE-DMS-ECID: 00ni2Rpm304ql0bmk0yg0Fvd00B13Whn55
X-ORACLE-DMS-ECID: 00ni2Rpm304ql0bmk0yg0Fvd00B13Whn55
X-Frame-Options: DENY
Content-Language: en
Content-Type: application/json
Vary: user-agent
Date: Tue, 25 Oct 2016 23:44:29 GMT
Content-Length: 2340
Connection: keep-alive
Example of Response Body
This example response body is for job id 5150771, a job that successfully created a MySQLCS instance named MyTestInstance in about 7 minutes.
{ "activityLogId": 4021124, "serviceName": "MyTestInstance", "serviceType": "mysqlcs", "identityDomain": "ExampleIdentityDomain", "serviceId": 192737, "jobId": 5150771, "startDate": "2016-10-25T19:44:13.321+0000", "endDate": "2016-10-25T19:51:29.812+0000", "status": "SUCCEED", "operationId": 192737, "operationType": "CREATE_SERVICE", "summaryMessage": "CREATE_SERVICE", "authDomain": "ExampleIdentityDomain", "authUser": "username", "initiatedBy": "USER", "messages": [ { "activityDate": "2016-10-25T19:44:13.321+0000", "message": "Activity Submitted" }, { "activityDate": "2016-10-25T19:44:13.346+0000", "message": "Activity Started" }, { "activityDate": "2016-10-25T19:44:13.360+0000", "message": "Started operation to create service [MyTestInstance] in identity domain [ExampleIdentityDomain]." }, { "activityDate": "2016-10-25T19:44:13.443+0000", "message": "Creating service [MyTestInstance] resources [mytestinstance-mysql-1]." }, { "activityDate": "2016-10-25T19:49:42.427+0000", "message": "Completed creating service [MyTestInstance] in domain [ExampleIdentityDomain]." }, { "activityDate": "2016-10-25T19:49:43.658+0000", "message": "Started operation to establish security on VMs for component [mysql]." }, { "activityDate": "2016-10-25T19:49:43.658+0000", "message": "Completed operation to establish security on VMs for component [mysql]" }, { "activityDate": "2016-10-25T19:49:43.923+0000", "message": "Started operation to check provisioning status on the VMs for [mysql]" }, { "activityDate": "2016-10-25T19:50:46.901+0000", "message": "Provisioning Succeeded on hosts: mytestinstance-mysql-1" }, { "activityDate": "2016-10-25T19:50:47.939+0000", "message": "Provisioning of [mysql] succeeded." }, { "activityDate": "2016-10-25T19:50:47.939+0000", "message": "Provisioning of all components completed." }, { "activityDate": "2016-10-25T19:50:48.036+0000", "message": "Started service reachability check operation for [mysql]." }, { "activityDate": "2016-10-25T19:51:09.308+0000", "message": "Successfully validated that mytestinstance-mysql-1 returned a status of 200 ; " }, { "activityDate": "2016-10-25T19:51:09.308+0000", "message": "Successfully completed service reachability check for [mysql]" }, { "activityDate": "2016-10-25T19:51:09.434+0000", "message": "Service reachability check of all components completed." }, { "activityDate": "2016-10-25T19:51:09.434+0000", "message": "Service reachability check of [mysql] succeeded." }, { "activityDate": "2016-10-25T19:51:29.812+0000", "message": "Activity Ended" } ] }