====== 1.1 REST končne točke ====== Pregled vseh razpoložljivih REST((Representational State Transfer: https://de.wikipedia.org/wiki/Representational_State_Transfer)) končnih točk. ===== Arhitektura ===== API sledi REST načelom((REST Constraints: https://restfulapi.net/rest-architectural-constraints/)) in uporablja HTTP((Hypertext Transfer Protocol: https://datatracker.ietf.org/doc/html/rfc7231)) metode za CRUD operacije. ===== Tabele ===== ^ Metoda ^ Pot ^ Opis ^ | GET | ''/tables'' | Seznam vseh tabel | | GET | ''/tables/{name}'' | Branje podatkov | | POST | ''/tables/{name}'' | Vstavljanje zapisa | | PUT | ''/tables/{name}'' | Posodabljanje zapisa | | DELETE | ''/tables/{name}'' | Brisanje zapisa | | PATCH | ''/tables/{name}'' | [[.:entwickler:rest:batch|Batch spremembe]] | ===== Pogledi ===== ^ Metoda ^ Pot ^ Opis ^ | GET | ''/views'' | Seznam vseh pogledov | | GET | ''/views/{name}'' | Branje podatkov pogleda | ===== Shranjene procedure ===== ^ Metoda ^ Pot ^ Opis ^ | GET | ''/procedures'' | Seznam vseh procedur | | POST | ''/procedures/{name}/execute'' | Izvajanje procedure | ===== Ad-Hoc poizvedbe ===== ^ Metoda ^ Pot ^ Opis ^ | POST | ''/query'' | Izvajanje SQL poizvedbe | ===== HTTP statusne kode ===== API uporablja standardne HTTP statusne kode((HTTP Status Codes: https://datatracker.ietf.org/doc/html/rfc7231#section-6)): ^ Koda ^ Pomen ^ Uporaba ^ | 200 | OK | Uspešen GET/PUT/PATCH | | 201 | Created | Uspešen POST | | 204 | No Content | Uspešen DELETE | | 400 | Bad Request | Neveljavna zahteva | | 401 | Unauthorized | Zahtevana avtentikacija | | 403 | Forbidden | Ni dovoljenja | | 404 | Not Found | Vir ni najden | | 500 | Server Error | Notranja napaka | ===== Naprej ===== * [[.:entwickler:rest:query-parameter|Query parametri]] za filtriranje in razvrščanje * [[.:entwickler:rest:crud|CRUD operacije]] podrobno * [[.:entwickler:rest:batch|Batch operacije]] za množične spremembe ===== Viri ===== * [[https://datatracker.ietf.org/doc/html/rfc7231|RFC 7231: HTTP/1.1 Semantics]] * [[https://restfulapi.net/|REST API Tutorial]]