Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member XenomediaBV's Avatar
    Join Date
    Sep 2009
    Location
    The Netherlands
    Posts
    29
    cPanel/Enkompass Access Level

    Root Administrator

    Default [Case 33066] Request XML-API functions: park and unpark domains

    I re-programmed the xml-api class and added a consistent method to use API1 and API2 functions along with some new functions.

    The reason for this was because I really need the park and unpark domain functions. I searched this forum and found some solutions by using:

    PHP Code:
    api2_query($username'Park''park'$args
    and
    PHP Code:
    api2_query($username'Park''unpark'$args
    However, the problem is that the “park a domain”-feature must be enabled for cPanel users to be able to use this, because API1 and API2 are collection of cPanel functions which require an account username. Documentation about API1 and API2 functions: "required string - user —> The user as whom you wish to call the function."

    I've this cPanel park-feature disabled to prevent users from messing up there parked domains thru there cPanel GUI. Instead a external order/billing GUI should manage parking and unparking domains (f.e. order a domain and park it directly afterwards, cancel a domain subscription and unpark it or to rearrange domains over multiple accounts; unpark and park), therefore I really need the park and unpark domain functions on a reseller/root level.

    Is it possible to implement this in the XML-API collection?
    WHM contains functions to manage this as well, which still works while the park-feature for cPanel users is disabled, so it’s probably possible.

    Edit: Additional documentation research
    * API version 1 (also known as API1), which is designed to generate output compatible with browsers. This API is used mainly to add, modify, or delete data on the server.
    * API version 2 (also known as API2), which is also designed to generate output compatible with browsers. This API is used mainly to return data.

    This means park and unpark should be API1 functions. The documentation for park and unpark mention that these functions belong to API2 (see documentation). Threads about park and unpark in this forum mention it should be API1. I tested both without succes.
    Last edited by XenomediaBV; 09-04-2009 at 06:39 AM.
    Kind regards,
    Miquel
    Xenomedia B.V.

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by XenomediaBV View Post
    I re-programmed the xml-api class and added a consistent method to use API1 and API2 functions along with some new functions.

    The reason for this was because I really need the park and unpark domain functions. I searched this forum and found some solutions by using:

    PHP Code:
    api2_query($username'Park''park'$args
    and
    PHP Code:
    api2_query($username'Park''unpark'$args
    However, the problem is that the “park a domain”-feature must be enabled for cPanel users to be able to use this, because API1 and API2 are collection of cPanel functions which require an account username. Documentation about API1 and API2 functions: "required string - user —> The user as whom you wish to call the function."

    I've this cPanel park-feature disabled to prevent users from messing up there parked domains thru there cPanel GUI. Instead a external order/billing GUI should manage parking and unparking domains (f.e. order a domain and park it directly afterwards, cancel a domain subscription and unpark it or to rearrange domains over multiple accounts; unpark and park), therefore I really need the park and unpark domain functions on a reseller/root level.

    Is it possible to implement this in the XML-API collection?
    WHM contains functions to manage this as well, which still works while the park-feature for cPanel users is disabled, so it’s probably possible.

    Edit: Additional documentation research
    * API version 1 (also known as API1), which is designed to generate output compatible with browsers. This API is used mainly to add, modify, or delete data on the server.
    * API version 2 (also known as API2), which is also designed to generate output compatible with browsers. This API is used mainly to return data.

    This means park and unpark should be API1 functions. The documentation for park and unpark mention that these functions belong to API2 (see documentation). Threads about park and unpark in this forum mention it should be API1. I tested both without succes.
    I have added your request for this functionality to our internal systems. Internal Case 33066.

    Regarding seeing the park domain function as both API1 and API2, both are currently correct.

    Originally the park domain function was API1 only. However, many folks wanted to use Function Hooks (designed to work with API2 functions but not API1 functions) with the the park domain function. So, due to customer demand, we added the park domain function as an API2 function to make such things easier to implement.

    As a result, you will see the park domain function mentioned as both an API1 function and as an API2 function.

    For those wondering about function hooks and API1, there is an alternative system called Custom Event Handlers that can be used for both API1 and API2 functions. However, one must be careful with Custom Event Handlers as a minor script error could cause all of API1 and API2 to cease functioning until the script error is resolved. That's why we recommend Function Hooks for most situations.

  3. #3
    Member XenomediaBV's Avatar
    Join Date
    Sep 2009
    Location
    The Netherlands
    Posts
    29
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Thank you David for your additional explanation and adding my request
    Last edited by XenomediaBV; 09-04-2009 at 02:11 PM.
    Kind regards,
    Miquel
    Xenomedia B.V.

  4. #4
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    Yes, I think this is a good idea to implement as well.

    I should note that in older versions of cPanel function hooks only worked with API2... this is no longer the case, any API call can now be hooked into.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    2

    Default

    Hi,

    I know this is an old thread, however I would love to add my support for this features as it would be a great help on my current software project.

  6. #6
    Member
    Join Date
    Feb 2008
    Posts
    49

    Default Re: [Case 33066] Request XML-API functions: park and unpark domains

    I really need this option as well. I also have disabled direct editing of parked domains in the cPanel interface.

    I would need this API to:
    - park domains bought trough our ordering process
    - park a <username>.ourdomain.com on top of new accounts that await a domain transfer. This way they can start preparing their site until the move. I find this works much better then using mod_userdir (no suPHP problems for one thing).

    Is there a workaoround to achieve this?

    For example:
    - Change users feature set to allow edititng of parked domains
    - park domain
    - change features again

Similar Threads & Tags
Similar threads

  1. XML-API Request: Allow multiple DNS operations prior to restarting nameserver
    By ozace in forum Feature Requests for cPanel/WHM
    Replies: 5
    Last Post: 04-01-2011, 07:44 AM
  2. Planned for 11.34 XML API2 functions - Batch support [Case 43047]
    By rusev in forum Feature Requests for cPanel/WHM
    Replies: 4
    Last Post: 02-21-2011, 10:35 AM
  3. Park domains cPanel API
    By diwan1 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-07-2010, 01:44 AM
  4. XML-API request: APIs for better reseller IP address management
    By jfillmore in forum Feature Requests for cPanel/WHM
    Replies: 2
    Last Post: 10-15-2009, 10:01 AM
  5. Request XML-API function: change password
    By XenomediaBV in forum cPanel Developers
    Replies: 2
    Last Post: 09-14-2009, 01:41 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube