A RESTful API(Representational State Transfer) wani nau'i ne na gine-gine da ƙa'ida don ƙira da sarrafa mu'amalar shirye-shiryen aikace-aikacen(APIs) a cikin tsarin rarrabawa. RESTful API an gina shi akan mahimman ƙa'idodin gine- REST gine, hanyar da Roy Fielding ya bayyana a cikin littafinsa na 2000.
Babban halayen sun RESTful API haɗa da:
hanyar shiga ta tushen adireshi
Kowace hanya tana wakilta ta URL(Uniform Resource Locator), ba da damar tsarin sadarwa ta buƙatun HTTP kamar GET, POST, PUT, da GAME.
Samun shiga mara jiha
Kowace bukata daga abokin ciniki ta ƙunshi isassun bayanai don uwar garken don fahimtar buƙatar ba tare da dogara ga bayanan jihar da ta gabata ba. Sabar ba ta adana bayanai game da yanayin abokin ciniki tsakanin buƙatun.
Amfani da hanyar HTTP
RESTful API yana amfani da hanyoyin HTTP(GET, POST, PUT, DELETE) don ayyana manufar kowace buƙata. Misali, yi amfani GET da don dawo da bayanai, POST don ƙirƙirar sabbin bayanai, PUT don ɗaukakawa, da GAME don cirewa.
Amfani da nau'ikan watsa labarai
Ana watsa bayanai ta hanyar hanyar sadarwa ta amfani da tsari irin su JSON, XML, ko wasu sifofi na al'ada. Kowane buƙatu yana buƙatar ƙayyade tsarin bayanan da ake so.
Gane albarkatun
Ana gano albarkatun ta hanyar URLs na musamman, yana bawa abokan ciniki damar samun damar albarkatu ta amfani da masu gano tushen hanya.
Mai iya cache
RESTful API Ana iya adana buƙatun da amsawa a cikin abokin ciniki ko ƙwaƙwalwar uwar garken wakili don haɓaka aiki.
Tsarin lebur
Gine REST -ginen yana ba da damar ƙari na tsaka-tsakin yadudduka kamar ma'aunin nauyi ko sabar wakili don haɓaka haɓakawa da sarrafawa.
APIs masu RESTful ana amfani da su sosai a yanar gizo da haɓaka aikace-aikacen wayar hannu, suna ba da damar ingantaccen sadarwa da musayar bayanai tsakanin aikace-aikace. Manyan ayyukan gidan yanar gizo kamar Facebook, Twitter, da Google kuma suna amfani da gine-ginen RESTful don samar da APIs ga masu haɓakawa.