simokhounti

Member
Nov 19, 2021
5
3
3
morocco
cPanel Access Level
Root Administrator
hello i'm trying to delete add on the domain using Cpanel API

- I tested the request to get Cpanel redirection and it's working.

now I want to delete the addon domain and response is this

Code:
 POST /execute/AddonDomain/deladdondomain HTTP/1.1
> Host: ***:2083
> User-Agent: insomnia/2021.7.2
> Authorization: cpanel  myusername:myapiTokken
> Content-Type: application/x-www-form-urlencoded
> Accept: */*
> Content-Length: 55
body
Code:
 domain=example.com&subdomain=example&apiversion=2
response

JSON:
{
    "status": 0,
    "warnings": null,
    "metadata": {},
    "data": null,
    "messages": null,
    "errors": [
        "Failed to load module “AddonDomain”: The system failed to load the module “Cpanel::API::AddonDomain” because of an error: Can't locate Cpanel/API/AddonDomain.pm in @INC (you may need to install the Cpanel::API::AddonDomain module) (@INC contains: /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib /usr/local/cpanel/3rdparty/perl/532/lib/perl5/532/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/532/lib/perl5/532 /opt/cpanel/perl5/532/site_lib/x86_64-linux-64int /opt/cpanel/perl5/532/site_lib) at (eval 2) line 1.\nBEGIN failed--compilation aborted at (eval 2) line 1.\n"
    ]
}
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
9,867
1,535
313
cPanel Access Level
Root Administrator
Hey there! It looks like you're using the old http://documentation.cpanel.net:8090/display/DD/cPanel+API+2+Functions+-+AddonDomain::deladdondomain function to try this work. Can you try using this one instead:


and see if that gives you better results?