Web Analytics
 Contoh API CRUD Couch DB

Contoh API CRUD Couch DB


Download Postman : https://it.ullilfahri.com/file_download/postman-couch-db-f364db0c830b73d9761494797abe87b2


Contoh Langsung dalam Curl  


Semua data

curl --location --request GET 'http://admin:tik@localhost:5984/siswa/_all_docs?include_docs=true'

 

Cari Data By ID

curl --location --request GET 'http://admin:tik@localhost:5984/siswa/e582879e40e71c44dd41ee3956005797'

 

Delete

curl --location --request DELETE 'http://admin:tik@localhost:5984/siswa/1?rev=1-ccd18fcf01ae1312002e0511ba40175a'

 

Cari By Field 

curl --location --request POST 'http://admin:[email protected]:5984/siswa/_find' \

--header 'Content-Type: application/json' \

--data-raw '{

    "selector":{"nama": "Siswa B"}

}'

 

Simpan Data

curl --location --request PUT 'http://admin:[email protected]:5984/siswa/e5dsdas' \

--header 'Content-Type: application/json' \

--data-raw '{

"nama":"siswa xxx",

"kelas":"semua"

}'

 

 

 

Edit Data

curl --location --request PUT 'http://admin:[email protected]:5984/siswa/e582879e40e71c44dd41ee3956005797' \

--header 'Content-Type: application/json' \

--data-raw '{

    "_rev":"1-1f132a02ee528797758911f5dfaa39b0",

    "nama":"siswa xxx",

"kelas":"semua"

}'


Lanjut Part : 1
Jam : 15:58:30
Durasi Part : 0:0:1
Durasi Total : 0:0:1

Punya Pertanyaan , Silahkan Whatsapp Langsung
Muhammad Ullil Fahri
WA : 089696380422
Tautan WA : https://wa.me/message/SG4YA2XQP5FPE1
Theme Customizer

Theme Styles