I’ve installed a CKAN in my laptop and I can access it via browser with the localhost address, but I cannot access via API.
Is there some configuration I didn’t do?
If I make a Google App Script API call to some CKAN repository, I get the expected response.
function conectarComCKAN() {
var response = UrlFetchApp.fetch('https://dados.ufrj.br/api/3/action/group_list');
Logger.log(response.getContentText());
}
Response:
11:11:13 Notificação Execução iniciada
11:11:13 Informação {"help": "https://dados.ufrj.br/api/3/action/help_show?name=group_list", "success": true, "result": ["chs", "pr5", "pr6", "pr1", "pr4", "pr3", "pr7", "pr2", "siarq", "sibi"]}
11:11:14 Notificação Execução concluída
If I make the same API call to my localhost repository, I get an error.
function conectarComCKAN() {
var response = UrlFetchApp.fetch('https://localhost/api/3/action/group_list');
Logger.log(response.getContentText());
}
Error:
11:16:40 Notificação Execução iniciada
11:16:41 Erro
Exception: DNS error: https://localhost/api/3/action/group_list
conectarComCKAN @ Código.gs:2
New contributor
Roberto Rezende de Assis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.