Child pages
  • WHM API 1 - Output Columns
Skip to end of metadata
Go to start of metadata

 

Introduction

You can limit the results of WHM API version 1 functions to display selected columns with the following variables:

Notes:

  • cPanel & WHM introduced this feature in version 11.48.
  • If you sort the results of your API function call, you must use a displayed column as a sort key.

Columns output

WHM API 1 columns use two basic variables:

VariableTypeDescriptionPossible values
api.columns.enableBooleanWhether to enable columns.
  • 1 — Enable columns.
  • 0 — Disable columns.
api.columns.astringThe return to display.The name of one of the function's returns.

To display additional columns, add a variable and increment the letter (for example, api.columns.b, api.columns.c, api.columns.d).

Examples

The following example function calls execute the listaccts function and limit the results to return only the user and domain columns:

/json-api/listaccts?api.version=1&api.columns.a=user&api.columns.b=domain&api.columns.enable=1

Important:

cPanel & WHM version 66 deprecated XML output.

/xml-api/listaccts?api.version=1&api.columns.a=user&api.columns.b=domain&api.columns.enable=1
whmapi1 listaccts api.columns.enable=1 api.columns.a=user api.columns.b=domain