• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question API - Get a customers service plan

intervations-au

New Pleskian
Server operating system version
Microsoft Windows Server 2012 R2
Plesk version and microupdate number
18.0.56 Update #4
Hi everyone,

I am new here so please be kind ))

I am working on implementing a little integration between my website (coldfusion code-base) and plesk.
I can manage to get basic requests to work, but I am trying to find out how to get a customers subscription or service plan to display some basic data like a list of domains, sub-domains, disk usage, traffic, number of email accounts, etc.

I also want to add a link/button where they can click and they are automatically logged-in to the control panel.

Can anyone guide me what calls/endpoints I need to use to the API to get this information?
I can store locally in a local database anything relevant that would be needed on an initial call, like client_id, etc.

I really want to get this working and all help/advice is appreciated.

Thanks in advance.
 
Hi welcome, have a look at REST API reference and playground on you Plesk server in Tools & Settings. Alternatively there is the XML-RPC API, which has more options but also has a stronger learning curve.
 
I’ve been delving around the reference and playground, but it’s not giving me what I would consider the basics of what I’m looking for. It’s almost there, but there doesn’t seem to be anything that remotely indicates getting subscriptions or plans per client.

Thanks for the recommendation about the XML-RPC api. Do you have any hints on where to start looking?
 
I’ve been delving around the reference and playground, but it’s not giving me what I would consider the basics of what I’m looking for. It’s almost there, but there doesn’t seem to be anything that remotely indicates getting subscriptions or plans per client.
Subscriptions can retrieved using the /domain endpoint of the REST API. For the Service Plans you'll probably need to use the /cli endpoint and run the CLI service_plan command that way. With the /cli endpoint you can run Plesk CLI commands, which greatly increases the REST API options.

Thanks for the recommendation about the XML-RPC api. Do you have any hints on where to start looking?
It all depends on what you are looking for. Give the search function a go on the documentation page for finding specific topics. But if you are planning on using the XML-RPC API it might not be a bad idea to go over the whole documentation. Granted, it's a lot. But it's probably the best way to see what options/functions are available.

Tip: there is an API explorer extension you can install on your Plesk server. Which can greatly help you exploring the API options.
 
Back
Top