Child pages
  • WHM API 1 Functions - remote_mysql_monitor_profile_activation
Skip to end of metadata
Go to start of metadata

 

Description

This function returns information about a remote MySQL® server profile activation process. The activation process contains several steps. This function reports the current status of those steps.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/remote_mysql_monitor_profile_activation?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/remote_mysql_monitor_profile_activation?api.version=1
 Command Line
whmapi1 remote_mysql_monitor_profile_activation


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 

 Output (JSON)
{
  "data": {
    "last_job_details": {
      "steps": [
        {
          "status": "INPROGRESS",
          "name": "Validating profile",
          "start_time": 1432220941
        }
      ],
      "end_time": 1432220944,
      "status": "FAILED",
      "start_time": 1432220941,
      "profile_name": "MyProfile"
    },
    "job_in_progress": {
       "steps": [
        {
          "end_time": 1432064519,
          "status": "DONE",
          "name": "Validating profile",
          "start_time": 1432064519
        }
        {
          "end_time": 1432064519,
          "status": "DONE",
          "name": "Updating /root/.my.cnf",
          "start_time": 1432064519
        }
        {
          "status": "INPROGRESS",
          "name": "Updated cPanel Apps that use MySQL",
          "start_time": 1432064520
        }
      ],
  },
      "status": "INPROGRESS",
      "start_time": 1432064519,
      "profile_name": "remote_server"
  }
},
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "remote_mysql_monitor_profile_activation"
  }
}
 Output (XML)
<result>
    <data>
        <last_job_details>
            <steps>
                <status>INPROGRESS</status>
                <name>Validating profile</name>
                <start_time>1432220941</start_time>
            </steps>
            <end_time>1432220944</end_time>
            <status>FAILED</status>
            <start_time>1432220941</start_time>
            <profile_name>MyProfile</profile_name>
        </last_job_details>
        <job_in_progress/>
            <steps>
                <end_time>1432064519</end_time>
                <status>DONE</status>
                <name>Validating profile</name>
                <start_time>1432064519</start_time>
            </steps>
            <steps>
                <end_time>1432064519</end_time>
                <status>DONE</status>
                <name>Updating /root/.my.cnf</name>
                <start_time>1432064519</start_time>
            </steps>
            <steps>
                <status>INPROGRESS</status>
                <name>Updated cPanel Apps that use MySQL</name>
                <start_time>1432064519</start_time>
            </steps>
            <status>INPROGRESS</status>
            <start_time>1432064519</start_time>
            <profile_name>remote_server</profile_name>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>remote_mysql_monitor_profile_activation</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

Return

TypeDescriptionPossible valuesExample
last_job_detailshashA hash of the most recently completed profile activation's data.This hash includes the steps hash and the end_time, status, start_time, and profile_name returns. 

steps

array of hashes

An array of hashes of the completed processes for the most recent profile activation.

The function returns this array of hashes in the last_job_details hash.

This hash includes the end_time, status, name, and start_time returns.
 

end_time

integer

The time when the process finished.

The function returns this value in the steps hash.

A date in Unix time format.

1432220941

status

string

The process's current status.

The function returns this value in the steps hash.

  • DONE — The process completed successfully.
  • INPROGRESS — The process is currently active.
  • FAILUED — The process failed to complete successfully.
DONE

name

string

The name of the process.

The function returns this value in the steps hash.

A valid string. 

start_time

integer

The time when the process began.

The function returns this value in the steps hash.

A date in Unix time format.
1432220941

end_time

integer

The time when the job finished.

The function returns this value in the last_job_details hash.

A date in Unix time format.
1432220941

status

string

The job's current status.

The function returns this value in the last_job_details hash.

  • DONE — The process completed successfully.
  • INPROGRESS — The process is currently active.
  • FAILED — The process failed to complete successfully.
DONE

start_time

integer

The time when the job started.

The function returns this value in the last_job_details hash.

A date in Unix time format.
1432064519

profile_name

string

The the name of the activated profile.

The function returns this value in the last_job_details hash.

A valid string.MyProfile
job_in_progresshashA hash of the profile activation that is currently in progress.This hash includes the steps hash and the status, start_time, and profile_name returns. 

steps

array of hashes

An array of hashes of the completed or active processes for the current profile activation.

The function returns this array of hashes in the job_in_progress hash.

This hash includes the end_time, status, name, and start_time returns. 

end_time

integer

The time when the process finished.

The function returns this value in the steps hash.

A date in Unix time format.
1432064520

status

string

The process's current status.

The function returns this value in the steps hash.

  • DONE — The process completed successfully.
  • INPROGRESS — The process is currently active.
  • FAILED — The process failed to complete successfully.
DONE

name

string

The name of the process.

The function returns this value in the steps hash.

A valid string.Updating /root/.my.cnf

start_time

integer

The time when the process began.

The function returns this value in the steps hash.

A date in Unix time format.
1432064519

status

string

The job's current status.

The function returns this value in the job_in_progress hash.

  • DONE — The process completed successfully.
  • INPROGRESS — The process is currently active.
  • FAILED — The process failed to complete successfully.
INPROGRESS

start_time

integer

The time when the job started.

The function returns this value in the job_in_progress hash.

A date in Unix time format.
1432064519

profile_name

string

The the name of the activated profile.

The function returns this value in the job_in_progress hash.

A valid string.remote_server