API Command to read additional domains only

hostpc.com

Verified User
Joined
Aug 2, 2003
Messages
1,178
Location
Schenectady, NY
We're looking for a way to read additional domain names added by a customer.

For instance, customer is initially setup with

xyz.com <- set as master domain

then adds

123.com
321.com

I'm trying to find a way to read JUST the "non master" domains. Is that possible?

Thanks

Joe
 
I don't think this can be done soley through the existing API.

Some options:
If you have a db, file, etc. of some sort that keeps track of each users primary domain you can get a list of all domains and just remove the domain from the list that corresponds to that user. Just keep in mind that users can change their default/primary domain now.

You could use the public_html link found in their home directory to determine the primary domain since it usually always points to it.

Write your own api/wrapper that would read DirectAdmin's data files and determine which domain is the default.

the public_html link would probably be the easiest dynamic way.
 
jmstacey said:
I don't think this can be done soley through the existing API.

Some options:
.....

You could use the public_html link found in their home directory to determine the primary domain since it usually always points to it.

Write your own api/wrapper that would read DirectAdmin's data files and determine which domain is the default.

the public_html link would probably be the easiest dynamic way.

Actually, I'm pretty sure that the public_html link points to the MOST RECENT created domain in an account, NOT the default one.
 
By default the default (pun?)domain is always set to the most recent domain added, however you can change the default domain from the Domain Administration page.
 
Without falling into a discussion on semantics, I was just trying to point out that the public_html symlink is an unreliable way to determine what the original poster was trying to find out. ;)
 
Back
Top