Possible custom domain api documentation error

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…

Hi,

Thanks for the feedback, I’ll pass it on to the team.

Alan

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