We have a new documentation site for cPanel & WHM! You can find our new documentation site at docs.cpanel.net.

We will continue to maintain our API documentation on this server.

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

Description

This function returns build log content.

 

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/package_manager_get_build_log?api.version=1&build=1234&offset=4567
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/package_manager_get_build_log?api.version=1&build=1234&offset=4567
 Command Line
whmapi1 package_manager_get_build_log build=1234 offset=4567


Notes:

  • Unless otherwise noted, 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":{  
      "offset":9672,
      "content":[  
         "line1",
         "line2",
         "line2"
      ]
   },
   "metadata":{  
      "version":1,
      "reason":"OK",
      "result":1,
      "command":"package_manager_get_build_log"
   }
}
 Output (XML)
<result>
    <data>
        <offset>9672</offset>
        <content>line1</content>
        <content>line2</content>
        <content>line3</content>
    </data>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>package_manager_get_build_log</command>
    </metadata>
</result>



Note:

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
buildinteger

Required

The build process ID.

An integer value that WHM's package_manager_submit_actions  function returns.

1234
offsetinteger

Required

The position in the build log from which you wish to display entries.

An integer value, in bytes.
4567


Returns

ReturnTypeDescriptionPossible valuesExample
offsetinteger

The last position that the system read in the build log.

An integer value, in bytes.9672
contentarrayThe most recent build log entries.A valid array.line2
still_runningBoolean

Whether the build process is in progress.

  • 1 — In progress.
  • 0 — Complete. 
1