What is a Delete REST API and how it deletes data from the servers?

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ย. 2021
  • We are very glad to start the REST APIs made easy course with the very first video on fundamentals of REST APIs, HTTP Methods, taxonomy around REST APIs etc. We hope that you get some value out of this course and these concepts help you thrive in your jobs, interviews and help you become better software engineers every day. Here are few links that you might want to refer before or during the course:
    More on the topic:
    ✒developer.mozilla.org/en-US/d...
    ✒github.com/microsoft/api-guid...
    ------------------------------------------------------------------
    Recommendations
    ------------------------------------------------------------------
    Our full courses on youtube:
    ✒ System Design Primer Course: • System Design Primer C...
    ✒ REST APIs made easy: • REST APIs MADE EASY
    Some paid courses that we recommend:
    ✒Educative.io: bit.ly/3qnW5ku
    ✒Interviewready.io: get.interviewready.io/ (Use coupon code SUDOCODE for extra discount)
    ------------------------------------------------------------------
    About Us
    ------------------------------------------------------------------
    Created and Instructed by:
    Yogita Sharma
    ✒ LinkedIn - / yogita-sharma-83400b55
    ✒ Instagram - / sudo.code1
    ✒ Facebook - / sudo.code
    ✒ Medium - / yogita088
    Post-production(editing, thumbnail etc) managed by:
    CiKi
    ✒ Website: www.ciki.co.in
    ✒ LinkedIn: / 74735937
    Colors and design by:
    Naini Todi
    ✒ LinkedIn - / nainitodi
    Both Arpit and Yogita are software engineers and want to help other software engineers become better by providing high quality and well researched content by adding their creativity and teaching twist.
    ------------------------------------------------------------------
    Join Us
    ------------------------------------------------------------------
    Hangout with sudoCode:
    ✒Discord Server: / discord
    For business:
    ✒Email: sudocode.yogita@gmail.com

ความคิดเห็น • 41

  • @deepalitandale
    @deepalitandale 2 ปีที่แล้ว +7

    Delete is idempotent as resource is deleted the first time and unless it is created again state remains unchanged on server.

  • @bigblast1226
    @bigblast1226 2 ปีที่แล้ว

    Thank you, well explained!🔥👍

  • @hamsaganesh7675
    @hamsaganesh7675 2 ปีที่แล้ว +2

    Learning so much about API, glad i found your channel, can you make more videos on API testing

  • @tejasgosavi7395
    @tejasgosavi7395 2 ปีที่แล้ว +11

    Delete is non-idempotent, because if we delete one entry in first time then if we try to do that again then we will get error
    correct me if i am wrong.....

    • @nicole.michael
      @nicole.michael 5 หลายเดือนก่อน

      I agree - Delete is not Idempotent.

  • @subee128
    @subee128 หลายเดือนก่อน

    Thank you very much

  • @Selvakumar-jp8he
    @Selvakumar-jp8he ปีที่แล้ว

    Hi mam, All videos are informative in your channel and very helpful to learn more...Could you pls make a videos about Sidekiq concept.

  • @janetkalu3064
    @janetkalu3064 ปีที่แล้ว

    Thank you Yogita

  • @AjayGosavi-dk9ze
    @AjayGosavi-dk9ze ปีที่แล้ว

    thank you ..u r so briliant.make more videos on springboot

  • @khushaltrivedi9829
    @khushaltrivedi9829 2 ปีที่แล้ว

    Can you please let us know what would be beat practice when deleting multiple objects in 1 API call

  • @abhishekkhandare4872
    @abhishekkhandare4872 2 ปีที่แล้ว +1

    I like to way to represent and teach.
    Please post videos on web api and specially soap and rest .

  • @SunShine-ge3yj
    @SunShine-ge3yj ปีที่แล้ว +1

    SOFT delete was a new concept to me

  • @sree562
    @sree562 ปีที่แล้ว

    if we send delete request to delete particularrecord ,we get 204 no content right ??

  • @yogeshyts
    @yogeshyts 2 ปีที่แล้ว

    can we delete multiple entry in single request?

  • @nihalkashyap647
    @nihalkashyap647 2 ปีที่แล้ว +1

    Hi @yogita. Should not the HTTP status code in the response for a resource created be 201?

    • @sudocode
      @sudocode  2 ปีที่แล้ว +1

      can be if no data has to be returned.

  • @jay-rathod-01
    @jay-rathod-01 2 ปีที่แล้ว

    Hello why Rest is use more than graphql in industries even though graphql is better?

  • @liveonyoutube5487
    @liveonyoutube5487 2 ปีที่แล้ว +1

    Nice explanation!
    Can you make video on error handling on server side with best practices?

    • @sudocode
      @sudocode  2 ปีที่แล้ว +2

      Sure will try

  • @ozmenta9444
    @ozmenta9444 2 ปีที่แล้ว +5

    The video does provide some quality information. However you have mentioned at 0:58 that all delete responses should contain 200 as status code which isn't true actually. There can be a 204(suitable for operations without soft deletes) and in case where deletion of resource might not happen immediately(a scheduled operation) a 202 will be returned.

    • @sudocode
      @sudocode  2 ปีที่แล้ว +4

      Those are both valid points Ozmenta. I have covered 202 in upcoming videos on async APIs

  • @ducatidiavel9639
    @ducatidiavel9639 2 ปีที่แล้ว +1

    What happens when you POST after doing a soft delete ?

  • @kartikeyamishra3325
    @kartikeyamishra3325 2 ปีที่แล้ว

    There is one thing... If we want to have create unique index in table and if we soft delete an record and then we want to create same entry... Will we need to mark deleted item as non deleted or should we create a new entry ?

    • @sudocode
      @sudocode  2 ปีที่แล้ว

      You create a new entry.

    • @kartikeyamishra3325
      @kartikeyamishra3325 2 ปีที่แล้ว

      @@sudocode then in that particular case we would not be able to create unique index....this is very interesting problem because if you want to make sure that no duplicate entries are created then we generally make index unique but in this case we wont be able to do that....composite index taking isdelete flag won't suffice either....so my actual question is how to make sure that no duplicate records are being created when we are soft deleting the entries

    • @alpanakushwaha9109
      @alpanakushwaha9109 ปีที่แล้ว

      ​@@kartikeyamishra3325in that case, you can change the column "Deleted?" to false that was earlier true, and then add/modify the new information/data whatever you want to.. for that particular row... Hence maintain the uniqueness

  • @pranavbhat29
    @pranavbhat29 2 ปีที่แล้ว +3

    Since the delete request deletes the resource utomst once and after that it always returns a 404 without changing the state of the backend system. I would believe that DELETE is idempotent

  • @truptideshmukh5592
    @truptideshmukh5592 ปีที่แล้ว

    How to fo soft delete

  • @nagavijaykumarprathi8531
    @nagavijaykumarprathi8531 2 ปีที่แล้ว

    I'm not able to find code snipet links in description.
    If you anyone find please share with me

    • @sudocode
      @sudocode  2 ปีที่แล้ว +1

      Will update it soon.

    • @nagavijaykumarprathi8531
      @nagavijaykumarprathi8531 2 ปีที่แล้ว

      @@sudocode Thank you for your response.
      Once updated please post on community or make a video regarding that.
      Thank you

  • @rasikapunde8887
    @rasikapunde8887 ปีที่แล้ว +1

    Could you please post here in comments the answer of the question asked - DELETE is idempotent or not? It would be great for a reference.

    • @lakshminadhYenduri
      @lakshminadhYenduri 6 หลายเดือนก่อน +1

      DELETE is not idempotent because on (1st attempt - will get 200) and on (2nd attempt - will get 404 because as it is already deleted not able find in DB) so here two return responses codes are different. Hence it is not idempotent.

  • @sethunagakarthikm4022
    @sethunagakarthikm4022 2 ปีที่แล้ว +1

    Could you please post a video on Redis.

    • @sudocode
      @sudocode  2 ปีที่แล้ว +1

      In the pipeline!

  • @pamudithajayasundara1259
    @pamudithajayasundara1259 2 ปีที่แล้ว

    can you create a video series on distributed computing....

    • @sudocode
      @sudocode  2 ปีที่แล้ว +2

      In pipeline!

  • @manglesh0605
    @manglesh0605 2 ปีที่แล้ว

    please create a playlist for all these api videos

    • @sudocode
      @sudocode  2 ปีที่แล้ว

      check the description

  • @LegendaryINDIAN55
    @LegendaryINDIAN55 ปีที่แล้ว

    how can a customer reset its api gaming account? is it possible? 😅🤣