Katunog API

Katunog api allows other developer to get the information of any musical instrument within the database.

POST getInstrumentList
https://katunog.asti.dost.gov.ph/api/

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
HEADERS

Content-Type
application/json
BODY raw

{"query": "{ instruments(page: 1, limit: 10) { page, pages, hasNext, hasPrev, objects { id, localName, province { name }} }}"}


Example Request
getInstrumentList
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);
});
POST getInstrumentLocation
https://katunog.asti.dost.gov.ph/api/

To get the location of instrument like island, region, province, city.

Use the following query:

objects {
    id,
    province {
        name,
        region {
            name,
            island {
                name
            }
        }
    }
}
HEADERS

Content-Type
application/json
BODY raw

{"query": "{ instruments(page: 1, limit: 10) { page, pages, hasNext, hasPrev, objects { id, province {name} } }}"}


Example Request
getInstrumentLocation
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);
});
POST getInstrumentDescriptions
https://katunog.asti.dost.gov.ph/api/

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
      }
    }
  }
}
HEADERS

Content-Type
application/json
BODY raw

{"query": "{ instruments(page: 1, limit: 1) { page, pages, hasNext, hasPrev, objects { id, english { generalDescription }, filipino { generalDescription } } }}"}


Example Request
getInstrumentDescriptions

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);
});

            
POST getInstrumentMediaFiles
https://katunog.asti.dost.gov.ph/api/

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
          }
        }
      }  
    }
  }
}
HEADERS

Content-Type
application/json
BODY raw

{"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 } } } } } }"}


Example Request
getInstrumentMediaFiles
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);
});
POST getInstrumentById
https://katunog.asti.dost.gov.ph/api/

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
        }
      }
    }
  }
}
HEADERS

Content-Type
application/json
BODY raw

{"query": "{ instrument(id: \"SW5zdHJ1bWVudFR5cGU6MTAyMw==\") { controlNumber, localName, englishName, alternateName } }"}


Example Request
getInstrumentById
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);
});
POST getRegionAndIslandList
https://katunog.asti.dost.gov.ph/api/

This api endpoints allow user to get the list of the region and island

Use the following query:

{
  regions {
    name
    island {
      name
    }
  }
}
HEADERS

Content-Type
application/json
BODY raw

{"query": "{ regions { id, name, island { name } } }"}


Example Request
getRegionAndIslandList
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);
});
POST getProvinceList
https://katunog.asti.dost.gov.ph/api/

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"
      }
    ]
}
HEADERS

Content-Type
application/json
BODY raw

{"query": "{ provinces { id, name } }"}


Example Request
getProvinceList
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);
});