Katunog API
Katunog api allows other developer to get the information of any musical instrument within the database.
Get the list of musical instrument
Params:
page: 1 # page number
limit: 10 # offset
filter: "katunog" # Search data to all field
Fields:
id
controlNumber
localName
englishName
alternateName
thumbnail
province
city
ethnolinguistic
hornbostel
subHornbostel
length
width
height
dimensionUnit
diameter
diameterUnit
english
filipino
lastUpdated
mediaUploadOngoing
isReported
fileSet
{"query": "{ instruments(page: 1, limit: 10) { page, pages, hasNext, hasPrev, objects { id, localName, province { name }} }}"}
var settings = {
"url": "https://katunog.asti.dost.gov.ph/api/",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({"query":"{ instruments(page: 1, limit: 10) { page, pages, hasNext, hasPrev, objects { id, localName, province { name }} }}"}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
To get the location of instrument like island, region, province, city.
Use the following query:
objects {
id,
province {
name,
region {
name,
island {
name
}
}
}
}
{"query": "{ instruments(page: 1, limit: 10) { page, pages, hasNext, hasPrev, objects { id, province {name} } }}"}
var settings = {
"url": "https://katunog.asti.dost.gov.ph/api/",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({"query":"{ instruments(page: 1, limit: 10) { page, pages, hasNext, hasPrev, objects { id, province {name} } }}"}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
To get the description of musical instrument like english and filipino.
Use the following query:
{
instruments(page: 1, limit: 10) {
page,
pages,
hasNext,
hasPrev,
objects {
id,
english {
generalDescription,
materialAndMake,
playingParts,
otherDetails
},
filipino {
generalDescription,
materialAndMake,
playingParts,
otherDetails
}
}
}
}
{"query": "{ instruments(page: 1, limit: 1) { page, pages, hasNext, hasPrev, objects { id, english { generalDescription }, filipino { generalDescription } } }}"}
var settings = {
"url": "https://katunog.asti.dost.gov.ph/api/",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({"query":"{ instruments(page: 1, limit: 1) { page, pages, hasNext, hasPrev, objects { id, english { generalDescription }, filipino { generalDescription } } }}"}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
To get the available files of the instrument like images, audios and videos.
Use the following query:
{
instruments(page: 1, limit: 10) {
page,
pages,
hasNext,
hasPrev,
objects {
id,
localName,
fileSet {
edges {
node {
name,
size,
caption,
fileType,
isPublic,
uploadDone,
path,
isBackground,
number
}
}
}
}
}
}
{"query": "{ instruments(page: 1, limit: 10) { page, pages, hasNext, hasPrev, objects { id, localName, fileSet { edges { node { name, size, caption, fileType, isPublic, uploadDone, path, isBackground, number } } } } } }"}
var settings = {
"url": "https://katunog.asti.dost.gov.ph/api/",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({"query":"{ instruments(page: 1, limit: 10) { page, pages, hasNext, hasPrev, objects { id, localName, fileSet { edges { node { name, size, caption, fileType, isPublic, uploadDone, path, isBackground, number } } } } } }"}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
To get the specific instrument.
Use the following query:
{
instrument(id: "SW5zdHJ1bWVudFR5cGU6MTAyMw==") {
controlNumber,
localName,
englishName,
alternateName
}
}
You can get the list of media files by adding the fileSet property:
Example:
{
instrument(id: "SW5zdHJ1bWVudFR5cGU6MTAyMw==") {
controlNumber,
localName,
englishName,
alternateName,
fileSet {
edges {
node {
name,
path
}
}
}
}
}
{"query": "{ instrument(id: \"SW5zdHJ1bWVudFR5cGU6MTAyMw==\") { controlNumber, localName, englishName, alternateName } }"}
var settings = {
"url": "https://katunog.asti.dost.gov.ph/api/",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({"query":"{ instrument(id: \"SW5zdHJ1bWVudFR5cGU6MTAyMw==\") { controlNumber, localName, englishName, alternateName } }"}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
This api endpoints allow user to get the list of the region and island
Use the following query:
{
regions {
name
island {
name
}
}
}
{"query": "{ regions { id, name, island { name } } }"}
var settings = {
"url": "https://katunog.asti.dost.gov.ph/api/",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({"query":"{ regions { id, name, island { name } } }"}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
This endpoint will show all the province available in database.
Use the following query:
{
provinces {
id,
name
}
}
Output:
{
"data": {
"provinces": [
{
"id": "UHJvdmluY2VUeXBlOjE=",
"name": "Basilan"
},
{
"id": "UHJvdmluY2VUeXBlOjI=",
"name": "Lanao del Sur"
}
]
}
{"query": "{ provinces { id, name } }"}
var settings = {
"url": "https://katunog.asti.dost.gov.ph/api/",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({"query":"{ provinces { id, name } }"}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});