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

 

Description

This function retrieves the configuration fields for a external authentication identity provider.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_provider_configuration_fields?api.version=1&provider_id=cpanelid&service_name=cpaneld
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/get_provider_configuration_fields?api.version=1&provider_id=cpanelid&service_name=cpaneld
 Command Line
whmapi1 get_provider_configuration_fields provider_id=cpanelid service_name=cpaneld


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

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{
  "data": {
    "configuration_fields": [ 
      {
        "display_order": 1,
        "value": "",
        "field_id": "client_secret",
        "label": "Client Secret",
        "description": "The Secret of the Client"
      },
      {
        "display_order": 0,
        "value": "",
        "field_id": "client_id",
        "label": "Client ID",
        "description": "The ID of the Client"
      }
    ]
  },
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": "1",
    "command": "get_provider_configuration_fields"
  }
}
 Output (XML)
<result>
    <data>
        <configuration_fields>
            <display_order>1</display_order>
            <value/>
            <field_id>client_secret</field_id>
            <label>Client Secret</label>
            <description>The Secret of the Client</description>
        </configuration_fields>
        <configuration_fields>
            <display_order>0</display_order>
            <value/>
            <field_id>client_id</field_id>
            <label>Client ID</label>
            <description>The ID of the Client</description>
        </configuration_fields>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>get_provider_configuration_fields</command>
    </metadata>
</result>


Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
service_namestring

Required

The cPanel & WHM service's name.

A valid service name.

    • cpaneld
    • whostmgrd
    • webmaild
cpaneld
provider_idstring

Required

The identity provider's key.

A valid identity provider's key.

cpanelid


Returns

ReturnTypeDescriptionPossible valuesExample
configuration_fieldsarray of hashesAn array of hashes that contain the configuration information for each field.This hash includes the display_order, field_id, value, label, and description returns. 

display_order

integer

The display order of the configuration field.

This function returns this value in the configuration_fields hash.

A valid non-negative number.0

field_id

string

The name of the configuration field.

This function returns this value in the configuration_fields hash.

A valid string.

client_id

value

string

The value of the configuration field.

This function returns this value in the configuration_fields hash.

A valid string.ABCDEFGHIJK

label

string

The label of the configuration field.

This function returns this value in the configuration_fields hash.

A valid string.Client Secret

description

string

The description of the configuration field.

This function returns this value in the configuration_fields hash.

A valid string.The secret of the client.