Dédalo Publication Server
El sistema de publicación de MIB es accesible mediante Dédalo Publication Server API.Puedes hacer consultas REST utilizando el panel interactivo inferior o integrar los datos directamente haciendo consultas al API en la url: https://monedaiberica.org/dedalo_publication_server/
Ejemplo usando el navegador:
https://monedaiberica.org/dedalo_publication_server/tables_info?code=654asdiKrhdTetQksluoQaW2
Ejemplo usando CURL:
curl -X GET "https://monedaiberica.org/dedalo_publication_server/tables_info?code=654asdiKrhdTetQksluoQaW2" -H "accept: application/json"
Ejemplo usando Javascript:
function request_data(options) {
const url = options.url || 'https://monedaiberica.org/dedalo_publication_server/'
const method = options.method || 'POST' // *GET, POST, PUT, DELETE, etc.
const mode = options.mode || 'cors' // no-cors, cors, *same-origin
const cache = options.cache || 'no-cache' // *default, no-cache, reload, force-cache, only-if-cached
const credentials = options.credentials || 'same-origin' // include, *same-origin, omit
const headers = options.headers || {'Content-Type': 'application/json'} // 'application/json'
const redirect = options.redirect || 'follow' // manual, *follow, error
const referrer = options.referrer || 'no-referrer' // no-referrer, *client
const body = options.body // body data type must match "Content-Type" header
// code defaults
if (!body.code) {
body.code = '654asdiKrhdTetQksluoQaW2'
}
// lang defaults
if (!body.lang) {
body.lang = 'lg-spa'
}
const handle_errors = function(response) {
if (!response.ok) {
console.warn("-> handle_errors response:",response);
throw Error(response.statusText);
}
return response;
}
const api_response = fetch(
url,
{
method : method,
mode : mode,
cache : cache,
credentials : credentials,
headers : headers,
redirect : redirect,
referrer : referrer,
body : JSON.stringify(body)
})
.then(handle_errors)
.then(response => {
const json_parsed = response.json().then((result)=>{
return result
})
return json_parsed
})// parses JSON response into native Javascript objects
.catch(error => {
console.error("!!!!! [request_data] ERROR:", error)
return {
result : false,
msg : error.message,
error : error
}
});
return api_response
}//end request_data
request_data({
body : {
dedalo_get : 'records',
lang : 'lg-spa',
table : 'catalog',
ar_fields : '*',
sql_filter : '',
limit : 10,
group : null,
count : true,
offset : 0,
order : null
}
}).then(function(api_response){
// Note some values are JSON encoded objects/array. You can parse them to get the proper data
console.log("api_response:",api_response);
})
Codepen playground:

Open API initiative
