You can find our user documentation at docs.cpanel.net.

Check out our new API beta site!

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

Description

This function returns the state of a start_background_pkgacct session.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_pkgacct_session_state?api.version=1&session_id=username20200323154328kDJ2Kx4xua2KtG
 Command Line
whmapi1 get_pkgacct_session_state session_id=username20200323154328kDJ2Kx4xua2KtG


Notes:

  • Unless otherwise noted, 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.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "data": {
    "state": "COMPLETED"
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "get_pkgacct_session_state"
  }
}


Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample
session_idstring

Required

The start_background_pkgacct session ID.

A valid ID.

username20200323154328kDJ2Kx4xua2KtG

Returns

ReturnTypeDescriptionPossible valuesExample
statestringThe start_background_pkgacct session's state.
  • COMPLETED
  • FAILED
  • RUNNING

COMPLETED