The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Check out our BRAND NEW SDK documentation!

Discussion in 'cPanel Developers' started by cPSarah, Jan 8, 2015.

  1. cPSarah

    cPSarah Registered
    Staff Member

    Joined:
    Aug 15, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    This week, we are excited to publish our brand new, completely rewritten and restyled Software Development Kit (SDK).

    The SDK section of our documentation provides detailed information for all of our APIs, plus topic-based documentation to help you use those API calls to integrate your applications with cPanel & WHM.

    Over time, our SDK documentation had sadly gotten a little out of date, and it lacked the example code to make it really user friendly. We've made sure to correct that, and are working toward the best developer documentation we can provide.

    Here are just a few exciting new aspects of the new SDK:
    • A new, friendlier layout.
    • A Quickstart Development Guide for new developers who aren't sure where to start.
    • Code examples for all of our API functions.
    • Code examples and expanded documentation for integration systems like our LiveAPI and Standardized Hooks systems.
    • Step-by-step tutorials for common tasks.

    We have also retired many of our previous SDK's topics that involved deprecated or removed functionality from early versions of cPanel & WHM.

    You can check out our new SDK here.

    cPanel's technical writers are still adding new SDK topics and expanding on what we published today. If there's a topic that you don't see, or a tutorial that you want us to provide, please let us know!
     
    #1 cPSarah, Jan 8, 2015
    Last edited by a moderator: Aug 17, 2015
  2. ottdev

    ottdev Well-Known Member

    Joined:
    Oct 1, 2013
    Messages:
    63
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Just a few suggestions/questions re: Guide to cPanel Plugins
    This is the first time I have tried to add my own icons to CPanel ... it's a bit unclear for those not already familiar.

    - Make it clear on all pages that the URL/URI could be internal or external (full url beginning with http: https:// ) - seems like you mention and use examples for a relative/local instance only on the x3 pages and an external url example on the paper lantern pages. One has to read both.


    Under "Plugin development workflow" at documentation.cpanel.net/display/SDK/Guide+to+cPanel+Plugins
    - Step 5 mentions "plugin registration file" - there is no prior reference using that term. Am I correct in guessing that means either the "dynamicui" or "install.json" file depending on what theme is being built for ?

    - If I am simply linking to an external URL, my tarball only includes said registration file and icon(s)?

    - Step 4,5,6 ... does install_plugin only get used for themes using install.json or also for themes where one has manually dealt with the dynamicui files already? (i.e. I made the dynamicui conf manually and uploaded the icon already?) What else does install_plugin do? Do these 3 steps only apply to paper lantern theme ?

    As for "install_plugin" mentioned as being a replacement for a custom installation script - this refers to installing the plugin interface files and icons ONLY, right - so they appear in the cpanel to the end-user? If the interface then allowed the end-user to activate an installation within his site - for example a guestbook - that would require an installation script, correct?

    The tarball says to include the "application source files" (presumably to automatically upload them) while mentions of the plugin "interface" files direct us where to 'store' them as if we need to manually place them. Do these terms in fact refer to the same - only the former audience is an outside developer and the latter audience is the WHM owner/webhost ?

    I'd like the docs to be more compartmentalized/titled specific to each case (some is addressed separate but is hard to find):
    1 - Host wants to add an icon to direct to an external resource
    2 - Host wants to add an icon for an internal feature or for a click-to-install item
    3 - Host wants to install a third party plugin which came to him as a package
    4 - Developer wants to create a distributable plugin package
    5 - An aside for 2 & 4 re: best practice for click-to-install functions/autoinstaller script

    The "Add Plugins to X3" page at - Removed -
    - mentions rebuild sprites
    while the "Add plugins to paper lanter" page at - Removed -
    - does not mention rebuild sprites - is it done by the install script ?

    Guide to cPanel Plugins - Software Development Kit - cPanel Documentation

    mod note, links above updated

    - Over a week ago I had already used the plugin file generator as per the ?older? page at and How to Install cPanel Plugins - cPanel Knowledge Base - cPanel Documentation. My later version WHM still leads me to the generator and its docs. This page mentions to use register_cpanelplugin - is this no longer necessary? there is no mention on the newer pages? Does install_plugin now perform the registration ?

    I ended up with files in /var/cpanel/registered_cpanelplugins/ and /usr/local/cpanel/whostmgr/addonfeatures - these seem to be not specific to a theme?

    I managed to create my icon to link to an external site for X3 theme. Can I just copy over dynamicui*conf and the icon from /frontend/x3/ into /frontend/paper_lantern/ now ?




    When I try an actual feature can I symlink the interface files between themes? i.e. the same HTML page or perl script instead of multiple copies?

    If I visit the preinstalled sample at ..../frontend/x3/test.live.pl or test.live.cgi - I see the actual file contents - are we missing a scriptalias or some other config is wrong?
     
    #2 ottdev, Jan 13, 2015
    Last edited by a moderator: Nov 5, 2015
  3. cPSarah

    cPSarah Registered
    Staff Member

    Joined:
    Aug 15, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you for your feedback! I will definitely investigate all of your questions/comments and make sure that those concerns are incorporated into the cPanel Plugin guide ASAP.
     
  4. manoj_ghimire

    manoj_ghimire Registered

    Joined:
    Sep 26, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    hello cPSarah,
    I have read the new sdk, its better organized that before. But there is one problem.
    when I go to https://documentation.cpanel.net/display/SDK/Guide+to+cPanel+API+2 and click the sub menu in the left side, suppose
    Backups, inside Backup, listfullbackups, I get this link https://documentation.cpanel.net/display/SDK/Guide+to+cPanel+API+2# and I can't go inside the listfullbackups submenu.

    To actually go to the listfullbackups I google cpanel api2 Backup::listfullbackups then I get the link to
    https://documentation.cpanel.net/display/SDK/cPanel+API+2+Functions+-+Backups::listfullbackups

    Please look at this issue.
     
  5. cPSarah

    cPSarah Registered
    Staff Member

    Joined:
    Aug 15, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for your feedback!

    Yes, we are aware of this issue, which is being caused by a bug in our publication process that's breaking the links in certain menus. We are currently working on a workaround, and I'm hoping we will get it fixed very soon. In the mean time, you should still be able to use the search box in the top corner of our documentation site to find functions - just search for the function name.

    Thanks!
     
  6. SactoBob

    SactoBob Member

    Joined:
    Aug 15, 2015
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Sacramento
    cPanel Access Level:
    DataCenter Provider
    FYI, your link of "documentation.cpanel.net/display/SDK/Software+Development+Kit." the first post returns:

     
    #6 SactoBob, Aug 15, 2015
    Last edited by a moderator: Nov 5, 2015
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I've updated the link in the initial post to reflect the new documentation URL.

    Thank you.
     
Loading...

Share This Page