Hello,
I have noticed an error with the documentation to get custom domains found on this page List custom domains
This is what the code looks like for a NodeJS app (for example)
const sdk = require('api')('@render-api/v1.0#dnrc1ulf088q9j');
sdk.auth('rnd_2Bhkj08tiutzt4svg876r9');
sdk.getCustomDomains({limit: '20', name: 'domain1.com,domain2.com', serviceId: 'srv-ceerm6ftuf76r'})
.then(({ data }) => console.log(data))
.catch(err => console.error(err));
Although this works in your online test environment, it returns an empty array in development mode when I tried to fetch more than one domain.
There need to be some changes to this line
name: 'domain1.com,domain2.com'
To
name: [domain1.com,domain2.com]
This is the modification I did that enabled me to fetch selected domains.
Please look into it.
Thanks,
Zino…