Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    teh
    teh is offline
    Member
    Join Date
    Jul 2008
    Posts
    5

    Default listsuspended XML/JSON output but without authentication

    Hello,

    I need to get the output from listsuspended (JSON or XML - doesn't matter) but without authentication when called locally by root. I need to use the output in a script. Is there something that can do this or it'll be easier to just parse /var/cpanel/suspended/ in some way?

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

    Default

    well, parsing /var/cpanel/suspended would probably be your easiest route for this, however I do have a script written for this.

    This requires that the server has /root/.accesshash setup (got to "Setup Remote Access Keys" in WHM to generate the file this uses)

    To use this script, run it f.ex. "./hash_query.pl /xml-api/listsuspended"

    and it should return the correct data.
    Attached Files
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

Similar Threads & Tags
Similar threads

  1. is XML/JSON-API available only to WHM accounts?
    By eschminke in forum cPanel Developers
    Replies: 6
    Last Post: 12-02-2011, 04:35 PM
  2. XML or JSON API?
    By Azavia in forum cPanel Developers
    Replies: 3
    Last Post: 05-21-2010, 01:16 PM
  3. Cpanel XMLAPI 1.0.3 - JSON Output
    By netrix37 in forum cPanel Developers
    Replies: 3
    Last Post: 03-04-2010, 11:13 AM
  4. XML/JSON inside the WHM
    By shaun in forum cPanel Developers
    Replies: 1
    Last Post: 10-22-2009, 11:56 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube