Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function edits RPM data. When you call this function, it performs the same actions as the following command:

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

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

Note:

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

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/edit_rpm_version?api.version=1&section=rpm_groups&key=3rdparty&value=cpanel-pcre
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/edit_rpm_version?api.version=1&section=rpm_groups&key=3rdparty&value=cpanel-pcre
 Command Line
whmapi1 edit_rpm_version section=rpm_groups key=3rdparty value=cpanel-pcre

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. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
  "metadata": {
    "version": 1,
    "reason": "OK",
    "result": 1,
    "command": "edit_rpm_version"
  },
  "data": {
    "status": 1
  }
}
 Output (XML)
<result>
    <data>
        <status>1</status>
    </data>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>edit_rpm_version</command>
    </metadata>
</result>

Note:

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

   

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