• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Question Add plan with api

colubian

New Pleskian
Server operating system version
centos 7
Plesk version and microupdate number
last
Hello to all friends! I had a small question how to add a plan to a client with api because with api I can create clients but not assign them a plan?

thanks
 
In Plesk you don't assign a Service Plan to a customer, but to a subscription. On the REST API you can use the /domains endpoint and specify the Service Plan in the body. See example bellow.
JSON:
{
  "name": "example.com",
  "hosting_type": "virtual",
  "hosting_settings": {
    "ftp_login": "test_login",
    "ftp_password": "changeme1Q**"
  },
  "owner_client": {
    "id": 7,
    "login": "owner",
    "guid": "b623e93d-dc72-4102-b5f0-ded427cf0fb1",
    "external_id": "b623e93d-dc72-4102-b5f0-ded427cf0fb1"
  },
  "ip_addresses": [
    "93.184.216.34",
    "2606:2800:220:1:248:1893:25c8:1946"
  ],
  "plan": {
    "name": "Unlimited"
  }
}

On the XML API you'd use the webspace descriptor to create a subscription on which you can specify a Service Plan.
 
Back
Top