{"id":421,"date":"2012-02-22T06:53:41","date_gmt":"2012-02-22T11:53:41","guid":{"rendered":"http:\/\/blogs.wp.stage.cpanel.net\/?p=421"},"modified":"2012-02-22T06:53:41","modified_gmt":"2012-02-22T11:53:41","slug":"test-it-in-the-user-interface","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/","title":{"rendered":"Test it in the User Interface"},"content":{"rendered":"

After spending time in the Developer section of the cPanel Community Forums, we’ve found a commonly asked question: “Why won’t my script work with XYZ function using the XML\/JSON-API?”<\/p>\n

Rewinding a bit, the purpose of the XML\/JSON API is to allow usage of cPanel & WHM functions through applications or scripts. Naturally, the first question we often ask, when trying to figure out why a script isn’t working, is if the user is trying to do something that they couldn’t normally do through cPanel & WHM.<\/p>\n

For example, let’s say you’re trying to park a domain on top of an existing domain. Parking a domain is like adding an additional domain name for the same content in your hosting account. Given this option is allowed by your hosting provider, the first thing to do would be to attempt to add the parked domain through cPanel. Running through the process of parking the domain through cPanel will give you, the user, a good sense of what’s actually happening when parking a domain.<\/p>\n

After testing through the interface and finding out more about the function, the next step would be to consult our documentation at sdk.cPanel.net to find more about the module name and function. Following the parking a domain example, we find in the documentation<\/a> that the name of the module is “Park”, with function “park”. (On a side note, there are also other functions available within the Park module, including “unpark”, “listparkeddomains”, and “listaddondomains”.)<\/p>\n

In this case, we’re only interested in using the “domain” parameter, since we’re wanting to park the new domain on the primary domain for the account. If the user wanted to park a domain onto a subdomain in the account, the user would also use the parameter, “topdomain”. This parameter would contain the name of the subdomain to attach the new parked domain to. Often, the error in the script has to do with incorrect parameters, or the order of parameters (for API1 functions) within the array.<\/p>\n

So after testing the function through cPanel, then making sure you have the correct parameters passed in through the XML\/JSON-API, you should be well on your way to troubleshooting your script.<\/p>\n","protected":false},"excerpt":{"rendered":"

After spending time in the Developer section of the cPanel Community Forums, we’ve found a commonly asked question: “Why won’t my script work with XYZ function using the XML\/JSON-API?” Rewinding a bit, the purpose of the XML\/JSON API is to allow usage of cPanel & WHM functions through applications or scripts. Naturally, the first question […]<\/p>\n","protected":false},"author":77,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[49],"tags":[],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-products"],"acf":[],"yoast_head":"\nTest it in the User Interface | cPanel<\/title>\n <!-- Mirrored from cpanel.net/wp-json/wp/v2/posts/421/ by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 06 Sep 2024 09:53:51 GMT --> <meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=_-2074.html \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Test it in the User Interface | cPanel\" \/>\n<meta property=\"og:description\" content=\"After spending time in the Developer section of the cPanel Community Forums, we’ve found a commonly asked question: “Why won’t my script work with XYZ function using the XML\/JSON-API?” Rewinding a bit, the purpose of the XML\/JSON API is to allow usage of cPanel & WHM functions through applications or scripts. Naturally, the first question […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/\" \/>\n<meta property=\"og:site_name\" content=\"cPanel\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cpanel\/\" \/>\n<meta property=\"article:published_time\" content=\"2012-02-22T11:53:41+00:00\" \/>\n<meta name=\"author\" content=\"cPanel Community\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cPanel\" \/>\n<meta name=\"twitter:site\" content=\"@cPanel\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cPanel Community\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/\",\"url\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/\",\"name\":\"Test it in the User Interface | cPanel\",\"isPartOf\":{\"@id\":\"https:\/\/devel.www.cpanel.net\/#website\"},\"datePublished\":\"2012-02-22T11:53:41+00:00\",\"dateModified\":\"2012-02-22T11:53:41+00:00\",\"author\":{\"@id\":\"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8\"},\"breadcrumb\":{\"@id\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/devel.www.cpanel.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Test it in the User Interface\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/devel.www.cpanel.net\/#website\",\"url\":\"https:\/\/devel.www.cpanel.net\/\",\"name\":\"cPanel\",\"description\":\"Hosting Platform of Choices\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/devel.www.cpanel.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8\",\"name\":\"cPanel Community\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g\",\"caption\":\"cPanel Community\"},\"description\":\"The web hosting industry's most reliable management solution since 1997. With our first-class support and rich feature set, it's easy to see why our customers and partners make cPanel & WHM their hosting platform of choice. For more information, visit cPanel.net.\",\"sameAs\":[\"https:\/\/cpanel.net\"],\"url\":\"https:\/\/devel.www.cpanel.net\/blog\/author\/cpadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Test it in the User Interface | cPanel","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/","og_locale":"en_US","og_type":"article","og_title":"Test it in the User Interface | cPanel","og_description":"After spending time in the Developer section of the cPanel Community Forums, we’ve found a commonly asked question: “Why won’t my script work with XYZ function using the XML\/JSON-API?” Rewinding a bit, the purpose of the XML\/JSON API is to allow usage of cPanel & WHM functions through applications or scripts. Naturally, the first question […]","og_url":"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/","og_site_name":"cPanel","article_publisher":"https:\/\/www.facebook.com\/cpanel\/","article_published_time":"2012-02-22T11:53:41+00:00","author":"cPanel Community","twitter_card":"summary_large_image","twitter_creator":"@cPanel","twitter_site":"@cPanel","twitter_misc":{"Written by":"cPanel Community","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/","url":"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/","name":"Test it in the User Interface | cPanel","isPartOf":{"@id":"https:\/\/devel.www.cpanel.net\/#website"},"datePublished":"2012-02-22T11:53:41+00:00","dateModified":"2012-02-22T11:53:41+00:00","author":{"@id":"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8"},"breadcrumb":{"@id":"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/devel.www.cpanel.net\/blog\/products\/test-it-in-the-user-interface\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devel.www.cpanel.net\/"},{"@type":"ListItem","position":2,"name":"Test it in the User Interface"}]},{"@type":"WebSite","@id":"https:\/\/devel.www.cpanel.net\/#website","url":"https:\/\/devel.www.cpanel.net\/","name":"cPanel","description":"Hosting Platform of Choices","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devel.www.cpanel.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/8cf97408aad4fb70cf55d11a1d4f57f8","name":"cPanel Community","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/devel.www.cpanel.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e1949945083b5526bb95711bd3d616b3?s=96&d=mm&r=g","caption":"cPanel Community"},"description":"The web hosting industry's most reliable management solution since 1997. With our first-class support and rich feature set, it's easy to see why our customers and partners make cPanel & WHM their hosting platform of choice. For more information, visit cPanel.net.","sameAs":["https:\/\/cpanel.net"],"url":"https:\/\/devel.www.cpanel.net\/blog\/author\/cpadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/posts\/421"}],"collection":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/comments?post=421"}],"version-history":[{"count":0,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/posts\/421\/revisions"}],"wp:attachment":[{"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/media?parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/categories?post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devel.www.cpanel.net\/wp-json\/wp\/v2\/tags?post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}