Create alias domain via remote api

Operating system: centos 8
OS version: 8

Can anybody help me out creating alias domains via the remote api.
I’ve got create-domain working just fine, list-domains etc etc all good.

I just cant seem to get params right to create an alias.

I’m passing these query params
‘domain’ => ‘alias.dom’,
‘alias’ => ‘alias.dom’,
‘parent’ => ‘parent.dom’,
‘template’ => ‘CustomTemplate’
‘default-features’

I’ve tried various permutations of params but cant get anything to work via remote api

Weirdly The same combination works via cli…
virtualmin create-domain --domain alias.dom --alias alias.dom --parent parent.dom --template CustomTemplate

(I’m not sure all those are required for alias but thats a set that worked)

to be clear I’m using curl via php but I’m pretty sure query format etc isnt the prob since other remote calls are fine under same.

regards

l.

Wrong. domain should be the parent domain. And, you shouldn’t specify parent. This is an alias, not a parent.

Edit: And, it shouldn’t work via CLI! That’s a bug.

Hi @Joe
I’m grateful for the reply and the pointers but I still cant get it working.

This works via cli:
virtualmin create-domain --alias target.dom --domain alias.dom --template CustomTemplate --default-features

The exact same set doesnt work via remote api.
I can create a main domain ok, or a subserver with calls to the same php function so I’m pretty sure thats not the problem.

Its just the aliases that are the issue.

I’m tailing virtualmin log - there is no entry when the create alias domain api call hits.

Is there a way to turn up logging output or debug remote calls?

any other ideas please?

regards

l.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.