Child pages
  • WHM API 1 Functions - edit_rpm_version

Versions Compared

Key

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

Description

Excerpt

This function edits RPM data.

 When you call this function, it performs the same actions as the following command:

Code Block
languagebash
/usr/local/cpanel/scripts/update_local_rpm_versions --edit section.key value

For more information, read our The rpm.versions System documentation.

Note
titleNote:

After you call this function, we strongly recommend that you run the /usr/local/cpanel/scripts/check_cpanel_rpms script. 


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/edit_rpm_version?api.version=1&section=rpm_groups&key=3rdparty&value=cpanel-pcre



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/edit_rpm_version?api.version=1&section=rpm_groups&key=3rdparty&value=cpanel-pcre



Expand
titleCommand Line


Code Block
languagebash
whmapi1 edit_rpm_version section=rpm_groups key=3rdparty value=cpanel-pcre

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "edit_rpm_version"
  },
  "data": {
    "status": 1
  }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <data>
        <status>1</status>
    </data>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>edit_rpm_version</command>
    </metadata>
</result>


Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote


   

Parameters

ParameterTypeDescriptionPossible valuesExample
sectionstring

Required

The RPM's section.

A valid RPM section.

rpm_groups
keystring

Required

The RPM's key.

A valid RPM key.

3rdparty
valuestring

Required

The RPM's value.

A valid string.
cpanel-pcre

Returns

ReturnTypeDescriptionPossible valuesExample

status

Boolean

Whether the function succeeded.

  • 1 — Success.
  • 0 — Failure.
1