Child pages
  • WHM API 1 Functions - get_provider_configuration_fields

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

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

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/get_provider_configuration_fields?api.version=1&provider_id=cpanelid&service_name=cpaneld
Expand
titleXML API
Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/get_provider_configuration_fields?api.version=1&provider_id=cpanelid&service_name=cpaneld
Expand
titleCommand Line
Code Block
languagebash
whmapi1 get_provider_configuration_fields provider_id=cpanelid service_name=cpaneld

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{
  "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"
  }
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<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>

Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

   

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.