Deprecated cPanel API 1 planned for removal AFTER cPanel & WHM version 86

cPanelTJ

Product Owner
Staff member
Jan 29, 2019
97
50
93
Houston, TX
cPanel Access Level
Root Administrator
Twitter
We want to ensure that everyone is informed and prepared for the planned removal of the deprecated cPanel API 1 framework. We intend to have all cPanel API 1 functionality that is still relevant in the system ported to UAPI equivalents. This plan means that your integrations, extensions, scripts, hooks, etc., can quickly be updated and continue operating without interruption.

We want to provide you with access to cPanel functionality in our most feature-rich API. UAPI offers a much more intuitive experience by having consistent formats for both data output and error reporting, as well as some more advanced organization methods (filter, sort, columns, etc.) for the data being returned.

The current plan is to have cPanel API 1 retired in version 88, contingent on first ensuring that the UAPI equivalents are in place. By doing so, servers with cPanel API 1 dependencies can remain on the version 86 LTS (Long-Term Support) for up to approximately a year to resolve these dependencies.

We are currently maintaining a table of cPanel API 1 equivalents in the Guide to Replacing cPanel API 1 Functions with UAPI Equivalents with new UAPI functions being added with every release. This table is a great starting point to find what UAPI you need in order to replace your cPanel API 1 function(s). Each cPanel API 1 function's documentation also includes a link to any existing UAPI equivalents.

Additional information can be found in our blog post with the release of cPanel & WHM version 82. Please post any questions that you have in this thread.
 

sneader

Well-Known Member
Aug 21, 2003
1,195
68
178
La Crosse, WI
cPanel Access Level
Root Administrator
Hi TJ. Tonight we received emails from several cPanel servers with the subject "Deprecated cPanel API 1 usage detected on your server. Action required. " and it provides several example pages that it says are making API 1 calls. These all seem to be cPanel itself, but maybe I'm wrong?

Code:
/usr/local/cpanel/base/frontend/paper_lantern/index.html
/usr/local/cpanel/base/webmail/paper_lantern/mail/doaddars.html.tt
There is no other information given, as to what that "page" is calling... it's really difficult to know where to go next. Suggestions?

- Scott
 

cPanelTJ

Product Owner
Staff member
Jan 29, 2019
97
50
93
Houston, TX
cPanel Access Level
Root Administrator
Twitter
Hi @sneader (Scott),

Thank you for reaching out. The index.html page is often occurring because of a 3rd party plugin that is making an API 1 call as it loads. Installatron is an example of a plugin that has done this in the past (we've notified them about the API 1 removal).

The mail/doaddars.html.tt, I believe, is a false positive, and it should be addressed in a minor update as soon as next week.

For further investigation on your end, you can use WHM API 1 get_api_calls to get the full list of cPanel API 1 calls made on the server.

Lastly, I'm here to help. Please let me know if you have any further questions.
 

mtindor

Well-Known Member
Sep 14, 2004
1,497
130
193
inside a catfish
cPanel Access Level
Root Administrator
Hi @sneader (Scott),

Thank you for reaching out. The index.html page is often occurring because of a 3rd party plugin that is making an API 1 call as it loads. Installatron is an example of a plugin that has done this in the past (we've notified them about the API 1 removal).

The mail/doaddars.html.tt, I believe, is a false positive, and it should be addressed in a minor update as soon as next week.

For further investigation on your end, you can use WHM API 1 get_api_calls to get the full list of cPanel API 1 calls made on the server.

Lastly, I'm here to help. Please let me know if you have any further questions.
Hi T,

The WHM API 1 get_api_calls gives even less information about just what is making the calls than the emails we received. How can we determine what is making those calls / where those calls are being made from?

Mike
 

cPanelTJ

Product Owner
Staff member
Jan 29, 2019
97
50
93
Houston, TX
cPanel Access Level
Root Administrator
Twitter
Hi T,

The WHM API 1 get_api_calls gives even less information about just what is making the calls than the emails we received. How can we determine what is making those calls / where those calls are being made from?

Mike

Hey @mtindor ,

The file path that is included in the email should be enough information for you to determine what is making the API call as plugins normally install into their own directory within paper_lantern. If you have files from our webmail directory showing up, please know that this was a bug and should be resolved by the next time you receive a notification.

If you'd like me to take a look at what you are seeing specifically, you can send me a direct message over the forums or on our Discord or Slack, and I'd be happy to help.
 

mtindor

Well-Known Member
Sep 14, 2004
1,497
130
193
inside a catfish
cPanel Access Level
Root Administrator
Hey @mtindor ,

The file path that is included in the email should be enough information for you to determine what is making the API call as plugins normally install into their own directory within paper_lantern. If you have files from our webmail directory showing up, please know that this was a bug and should be resolved by the next time you receive a notification.

If you'd like me to take a look at what you are seeing specifically, you can send me a direct message over the forums or on our Discord or Slack, and I'd be happy to help.
Thanks. Everything is fine here. The files I saw mentioned were all within /usr/local/cpanel/base/webmail/paper_lantern

Mike
 

qwerty

Well-Known Member
Jan 21, 2003
215
2
168
Having the same issues ...we also use Installatron.

Does this mean that if we updated to cpanel 88 installatron will stop working? Why arent they updating their software to not use api1 ??
 
Nov 27, 2020
5
2
3
Nottz
cPanel Access Level
Root Administrator
Hey, Just had chase to visit this. It looks like that function doesn't output a url which can be used for a single sign on session to the cPanel account. As seen in API 1


The link you've provided states

  • Because this function requires a valid cPanel session ID, you must call it via a cPanel or Webmail session URL. If you call this function via the command line or Template Toolkit, it will not create a temporary user session. You must use the WHM API 1 create_user_session function to create a temporary user session.

The API 1 version allows a User parameter and allows me to set this within our controller and redirect a customer to a url to sign on to cPanel that the API provides upon the request.
 

cPanelTJ

Product Owner
Staff member
Jan 29, 2019
97
50
93
Houston, TX
cPanel Access Level
Root Administrator
Twitter
Hey @FlippinSlipper ,

The API you are referring to is from WHM API 1, which is still supported and will stay in support for some time. The API system we are referring to is cPanel API 1. This case is the exact reason we want to retire it. We understand that it can be confusing.

Here's a complete list of our current API systems for reference:

WHM API 1 (supported/recommended)
WHM API 0 (deprecated)

cPanel UAPI (supported/recommended)
cPanel API 2 (supported)
cPanel API 1 (deprecated and retiring)
 
Nov 27, 2020
5
2
3
Nottz
cPanel Access Level
Root Administrator
Hey @FlippinSlipper ,

The API you are referring to is from WHM API 1, which is still supported and will stay in support for some time. The API system we are referring to is cPanel API 1. This case is the exact reason we want to retire it. We understand that it can be confusing.

Here's a complete list of our current API systems for reference:

WHM API 1 (supported/recommended)
WHM API 0 (deprecated)

cPanel UAPI (supported/recommended)
cPanel API 2 (supported)
cPanel API 1 (deprecated and retiring)

Hi,

Thanks for that. I think I've got them mixed up. I'm glad that this is still supported. Hope you guys are keeping safe. Thank you :)
 
  • Like
Reactions: cPRex and cPanelTJ