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:

  • 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

This parameter identifies the build process when the system performs WHM's package_manager_submit_actions API call.

An integer value.

1234
offsetinteger

Required

This parameter indicates the start position, in bytes, in the build log from which you wish to display entries.

An integer value.
4567

 

Returns

ReturnTypeDescriptionPossible valuesExample
offsetinteger

This return displays the last position, in bytes, that the system read to in the build log. You can use it for subsequent calls.

An integer value.9672
contentarrayThis returns displays the most recent build log entries.A valid array.line2
still_runningBoolean

Whether the build process is in progress.

  • 1 — The build is in progress.
  • 0 — The build is complete. 
1