Postman Beginner Tutorial 4 | PUT PATCH API Request

All FREE courses - automationstepbystep.com/
Notes:
How to add PUT & PATCH API Request
Run and check Response
#Postman #APITesting
____________________________________________________________
Stories by Raghav - automationstepbystep.com/stor...
My Udemy Courses - automationstepbystep.com/udem...
Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you
You can support my mission for education by sharing this knowledge and helping as many people as you can
If my work has helped you, consider helping any animal near you, in any way you can.
_______ ONLINE COURSES TO LEARN _______
automationstepbystep.com/free...
GitHub - github.com/Raghav-Pal/
Udemy - www.udemy.com/user/raghav-pal-3/
Training by Raghav at your venue - raghav.qna@gmail.com
Training schedule - automationstepbystep.com/trai...
----------- UI TESTING -----------
Selenium Beginners - bit.ly/2MGRS8K
Selenium Java Framework from Scratch - bit.ly/2N9xvR6
Selenium Python - bit.ly/2oyMp5x
Selenium Tips - bit.ly/2owxc50
Selenium Builder - bit.ly/2MKNtlq
Katalon Studio - bit.ly/2wARFdi
Robot Framework with RIDE- bit.ly/2Px6Ue9
Robot Framework with Eclipse - bit.ly/2N8DZxb
Protractor - bit.ly/2KtqVkU
TestProject - bit.ly/2DRNJYE
----------- API TESTING -----------
Web Services (API) - bit.ly/2MGafL7
SoapUI - bit.ly/2MGahmd
Postman - bit.ly/2wz8LrW
General - bit.ly/2PYdwmV
Katalon Studio API Testing - bit.ly/2BwuCTN
----------- MOBILE TESTING -----------
Appium - bit.ly/2ZHFSGX
Mobile Playlist - bit.ly/2PxpeUv
----------- CI | CD | DEVOPS -----------
Jenkins Beginner - bit.ly/2MIn8EC
Jenkins Tips & Trick - bit.ly/2LRt6xC
Docker - bit.ly/2MInnzx
Kubernetes - bit.ly/2MJIlMK
------------VIRTUALISATION------------
Virtualization on windows - bit.ly/2SItIL9
----------- VERSION CONTROL SYSTEM -----------
Git & GitHub - bit.ly/2Q1pagY
GitLab - bit.ly/2kQPGyQ
----------- PERFORMANCE TESTING -----------
JMeter Beginner - bit.ly/2oBbtIU
JMeter Intermediate - bit.ly/2oziNVB
JMeter Advanced - bit.ly/2Q22Y6a
JMeter Tips & Tricks - bit.ly/2NOfWD2
Performance Testing - bit.ly/2wEXbLS
----------- PROGRAMMING -----------
Java Beginners - bit.ly/2PVUcXs
Java Tips & Tricks - bit.ly/2CdcDnJ
GROOVY - bit.ly/2FvWV5C
JAVASCRIPT - bit.ly/2KJDZ8o
PYTHON - bit.ly/2Z4iRye
----------- IDE -----------
Visual Studio Code - bit.ly/2V15yvt
----------- BUILD TOOLS -----------
Maven - bit.ly/2NJdDRS
Gradle - bit.ly/30l3h1B
----------- OTHERS -----------
Redis- bit.ly/2N9jyCG
Misc - bit.ly/2Q2q5xQ
Tools & Tips - bit.ly/2oBfwoR
QnA Friday- bit.ly/2NgwGpw
Sunday Special - bit.ly/2wB23BO
Ask Raghav - bit.ly/2CoJGWf
Interviews - bit.ly/2NIPPxk
All Playlists - bit.ly/2LSiezA
---------- Connect with Raghav -----------
Udemy Courses - www.udemy.com/user/raghav-pal-3/
Twitter - / learnwithraghav
KZread - / automationstepbystep
Never Stop Learning
Raghav

Пікірлер: 75

  • @aylinbekem3701
    @aylinbekem37012 жыл бұрын

    Raghav , Can you imagine how many students have been inspired by you ? I like the way your video ends with Never stop leaning ! Thank you for your hard work

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    So nice of you Aylin

  • @akhil100

    @akhil100

    Жыл бұрын

    Aylin I think you meant "inspired" and not "expired". :)

  • @aylinbekem3701

    @aylinbekem3701

    Жыл бұрын

    @@akhil100 You are right . I just corrected

  • @AnjuliKhare
    @AnjuliKhare2 жыл бұрын

    Hello Sir..Thank You So much for sharing video on postman. But plz share next video early so we can go fast .. thank you.

  • @RaghavPal

    @RaghavPal

    2 жыл бұрын

    I will try Anjuli

  • @revolver_84
    @revolver_84 Жыл бұрын

    Very clear and at a good pace video. Well done.

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Thanks a lot

  • @CookingUnlocking
    @CookingUnlocking Жыл бұрын

    Great explanation with user friendly tools👍

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Glad it was helpful Sonu

  • @prasadchavakula8451
    @prasadchavakula8451 Жыл бұрын

    Nice video, now understood the importance between post and put Thanks Raghav

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Glad it was helpful Prasad

  • @marcioardanuy3089
    @marcioardanuy30895 ай бұрын

    Amazing tutorial. Greetings from Brazil!!

  • @RaghavPal

    @RaghavPal

    5 ай бұрын

    Glad you liked it Marcio

  • @mohammadhabib8334
    @mohammadhabib83342 жыл бұрын

    Thank you Raghav 😊

  • @RaghavPal

    @RaghavPal

    2 жыл бұрын

    So nice of you

  • @gayatritankar7856
    @gayatritankar78569 ай бұрын

    Hello, Sir thank you so much for sharing these videos, it will be really helpful for us.

  • @RaghavPal

    @RaghavPal

    9 ай бұрын

    So nice of you Gayatri

  • @kuklosmissingeye9609
    @kuklosmissingeye9609 Жыл бұрын

    Saved me brother! Thank you :D

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Most welcome

  • @justinecasiong9147
    @justinecasiong9147 Жыл бұрын

    thank you sir!

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Most welcome Justine

  • @user-bz4bx3nd9x
    @user-bz4bx3nd9x6 ай бұрын

    Good Explanation bro

  • @RaghavPal

    @RaghavPal

    6 ай бұрын

    Thanks a lot Lakshmi

  • @fidawani7200
    @fidawani72007 ай бұрын

    Jio bhai Great explanation 😊

  • @RaghavPal

    @RaghavPal

    7 ай бұрын

    Thanks a lot

  • @prernasharma1307
    @prernasharma13072 жыл бұрын

    Hi Raghav, if I want to update partially.... PUT works in that case too so could you pls elaborate more on the difference between patch n put with examples

  • @RaghavPal

    @RaghavPal

    2 жыл бұрын

    Hi Prerna, sure I will add a video on this, I recently created a community post for it, Can find it here - kzread.info/dron/Tt7pyY-o0eltq14glaG5dg.htmlcommunity

  • @prernasharma1307

    @prernasharma1307

    2 жыл бұрын

    @@RaghavPal thanks Raghav... Will check

  • @amarnath1494
    @amarnath149410 ай бұрын

    Hi Raghav, Thanks for posting the video. Can you give more clarity b'n Put and Patch requests?

  • @RaghavPal

    @RaghavPal

    10 ай бұрын

    Amarnath The PUT and PATCH HTTP methods are both used to update resources, but they differ in how they do it. *PUT* sends the entire resource to the server, replacing the existing resource with the new one. *PATCH* sends a partial representation of the resource to the server, which is then used to update the existing resource. So PUT replaces the resource PATCH updates the resource (partially or completely) *Which method to use depends on the specific needs of your application.* If you need to update the entire resource, then you should use PUT. If you only need to update a portion of the resource, then you should use PATCH. *Here are some general guidelines for choosing between PUT and PATCH:* * Use PUT if you need to update the entire resource. * Use PATCH if you only need to update a portion of the resource. * Use PUT if you want to ensure that the resource is in a consistent state after the update. * Use PATCH if you want to allow the client to update the resource without having to know the entire state of the resource.

  • @jatingirdhar1589
    @jatingirdhar15895 ай бұрын

    Thanks for the awesome video, Raghav sir ! However I could not understand exactly here what is the difference b/w PUT & PATCH bcoz I am able to change the data partially with PATCH too...I believe it would be clarified in next videos...The way you explain is just awesome....Hats off to you !

  • @RaghavPal

    @RaghavPal

    5 ай бұрын

    I will add more on this Jatin... keep watching

  • @mubashar-nouman
    @mubashar-nouman9 ай бұрын

    Which tool you are using for highlighting something on screen? Like during video you highlight some sections with red bordered triangle etc

  • @RaghavPal

    @RaghavPal

    9 ай бұрын

    It's screen annotation tools

  • @Tamanbir
    @Tamanbir Жыл бұрын

    What about updating an index of array? I get out of bound exception if i go as per docs

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    will need to check the scripts and logs

  • @dantegutierrezsantos9367
    @dantegutierrezsantos9367 Жыл бұрын

    Hi Raghav, what if I want to use PATCH on an API but I don't know the record ID but I already know the user_name for example? How can I apply the PATCH command in this example? Thanks.

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Hi Dante, It will depend on your APIs, basically for a PATCH we need to point to the exact resource, whatever way you can in an API, whether it is through any unique value, like ID, Name or some combination

  • @YashSharma-qo1sy
    @YashSharma-qo1sy Жыл бұрын

    Thanks for the video, sir. But couldn't get any difference between PUT and PATCH!

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Hi Yash, Sure, I can explain the difference between PUT and PATCH in easy language with an example! Imagine you have a toy car that you want to customize. You can change its color, add stickers, or modify its shape. In the context of web development, PUT and PATCH are two methods that are used to modify resources on a web server. PUT is like replacing the entire toy car with a new one. If you use PUT to modify a resource, you must send the complete representation of that resource to the server. This means that if you want to change a single attribute of the resource, you need to send the entire resource with the new attribute value. For example, if you have a toy car resource with attributes like "color," "sticker," and "shape," and you want to change the color of the car, you would need to send the entire toy car resource with the new color attribute value using the PUT method. On the other hand, PATCH is like modifying the toy car piece by piece. With PATCH, you can modify specific attributes of a resource without sending the entire representation of that resource to the server. This makes PATCH more efficient than PUT for making small changes. For example, if you want to change only the color of the toy car using the PATCH method, you can send a request to the server with just the new color attribute value, without including the entire toy car resource. In summary, PUT is used to completely replace a resource, while PATCH is used to make partial modifications to a resource

  • @javedislam5921
    @javedislam5921 Жыл бұрын

    I am using postman to test my rest api PUT request against the app created on STS 4 spring boot framework. I am getting this error: Resolved [org.springframework.web.HttpMediaTypeNotAcceptableException: No acceptable representation] client content type raw JSON. I understand that once the client and server are both using compatible media types, the HttpMediaTypeNotAcceptableException should no longer occur and the response should be returned successfully. How do I fix it? Thanks

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Hi Javed, The error you're seeing (HttpMediaTypeNotAcceptableException) typically occurs when the server is unable to provide a response in a format that the client can accept. This means that the client and server are not using compatible media types, as you correctly noted. To fix this error, you'll need to ensure that the client and server are both using compatible media types. Here are a few steps you can take to troubleshoot and resolve this issue: Check the request headers: In your Postman request, make sure that the Content-Type header is set to application/json. This tells the server that the request body is in JSON format. Check the response headers: In the server response, make sure that the Content-Type header is set to a format that the client can accept. If the client is expecting JSON, the Content-Type header should be set to application/json. You can set this header in your Spring Boot application by adding the produces attribute to your @RequestMapping annotation, like this: @RequestMapping(value = "/your-endpoint", method = RequestMethod.PUT, produces = "application/json") Check the response body: Make sure that the response body is actually in the format specified by the Content-Type header. If the Content-Type header is set to application/json, the response body should be a valid JSON string. Check the server logs: If the above steps don't help, check the logs of your Spring Boot application to see if there are any additional error messages that might help you diagnose the problem. By following these steps, you should be able to identify and fix the issue causing the HttpMediaTypeNotAcceptableException error.

  • @mv8167
    @mv8167 Жыл бұрын

    Could you please tell me how you got to the Rest Request at time 1:16, showing the resources we can use?

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Hi Mike, it is a demo rest service available here - thomas-bayer.com/sqlrest

  • @itsme-vc8fs
    @itsme-vc8fs Жыл бұрын

    Sir, when i tried to do the put in the exact way you do, in repose, i could see only "updated at..." Why iam not getting name amd job? Please help

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    its demo sample APIs, may have changed

  • @victoriduh3130
    @victoriduh3130 Жыл бұрын

    Please if I want to use patch request on all data in the api how do I do it?

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    will need to see some example Victor

  • @sivaporeddy72
    @sivaporeddy722 жыл бұрын

    What happens if we use PATCH to update both name and Job. Is that not similar to PUT?

  • @RaghavPal

    @RaghavPal

    2 жыл бұрын

    Hi Siva, Patch - update some information of the resource Put - replace the resource

  • @kalpanabadri27
    @kalpanabadri277 ай бұрын

    Hi raghav, i have doubt first i performed get operation to get all users(have first name is kalpana and id is 1) after i performed put operation that body has first name is rakesh who have id is 1.Next time i performed get operation that firstname will be updated or not who have id=1 ??

  • @RaghavPal

    @RaghavPal

    7 ай бұрын

    Kalpana Yes, if you perform a GET operation to get all users with the first name "Kalpana" and ID 1, and then perform a PUT operation to update the first name of the user with ID 1 to "Rakesh", the next time you perform a GET operation, the first name of the user with ID 1 will be "Rakesh". This is because the PUT operation updates the data on the server, and the GET operation retrieves the updated data from the server. Here's a more detailed explanation of how these operations work: **GET Operation:** The GET operation is used to retrieve data from a server. When you perform a GET operation, the server sends you back the current state of the data. In this case, you are performing a GET operation to retrieve all users with the first name "Kalpana" and ID 1. The server will send you back a JSON object with the following data: ```json { "id": 1, "firstName": "Kalpana" } ``` **PUT Operation:** The PUT operation is used to update data on a server. When you perform a PUT operation, you send the server a JSON object with the new data. In this case, you are performing a PUT operation to update the first name of the user with ID 1 to "Rakesh". The server will update the data on its end, and then send you back a JSON object with the following data: ```json { "id": 1, "firstName": "Rakesh" } ``` **Subsequent GET Operations:** The next time you perform a GET operation to retrieve all users with the first name "Kalpana" and ID 1, the server will send you back the JSON object with the updated data: ```json { "id": 1, "firstName": "Rakesh" } ``` This is because the PUT operation updated the data on the server, and the GET operation is retrieving the updated data from the server.

  • @asimameer3445
    @asimameer3445 Жыл бұрын

    Is this course for API testing or developing the API?

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Testing API

  • @muneeburrehman2280
    @muneeburrehman22802 жыл бұрын

    Hello sir. I am getting "403 forbidden" error on calling 'put' method. Why is it happening?

  • @RaghavPal

    @RaghavPal

    2 жыл бұрын

    Hi Muneeb, you api may be needing some authorization, pls check or try with a diff api

  • @ammarsadeq6078
    @ammarsadeq60786 ай бұрын

    Is there no test to do at the end?

  • @RaghavPal

    @RaghavPal

    5 ай бұрын

    Ammar Have covered Tests in a separate session.

  • @moviekazi1536
    @moviekazi1536 Жыл бұрын

    But the PATCH method also changed the whole object in your example. Shouldn't there still be job in the result in patch method?

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    This may be the case as these are dummy APIs we are using for demo

  • @vipintekade6400
    @vipintekade6400 Жыл бұрын

    Please add video including HEAD ,TRACE AND OPTION METHOD.

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Sure Vipin, will plan to add

  • @vipintekade6400

    @vipintekade6400

    Жыл бұрын

    With practical examples.

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    ok

  • @lavanyasilla8744
    @lavanyasilla87449 ай бұрын

    how to create own api?????

  • @RaghavPal

    @RaghavPal

    9 ай бұрын

    Check this - kzread.info/dash/bejne/aaqskrSCp6u8qso.html

  • @chinmayk2657
    @chinmayk2657 Жыл бұрын

    Authentication token need to pass as cookie. Cookie name is “token” and value is generated auth token. ‘Cookie: token=’. HOW TO DO THIS - STEPS

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    Hi Chinmay Sure, here are the steps on how to pass an authentication token as a cookie in Postman: 1. Open the Postman app and create a new request. 2. In the Request tab, enter the URL of the API that you want to authenticate with. 3. In the Headers tab, click on the **Cookies** tab. 4. Click on the **Add Cookie** button. 5. In the **Name** field, enter the name of the cookie, which is "token" in this case. 6. In the **Value** field, enter the value of the cookie, which is the generated auth token. 7. Click on the **Save** button. 8. Click on the **Send** button to send the request. The API should now be authenticated with the generated auth token. Here are some additional tips for passing authentication tokens as cookies in Postman: * You can also use the **Authorization** tab to pass authentication tokens. The **Authorization** tab allows you to select different types of authentication, such as Basic Auth, Bearer Auth, and OAuth. * You can use the **Variables** feature in Postman to store authentication tokens. This can be useful if you need to use the same authentication token for multiple requests. * You can use the **Collection Runner** feature in Postman to run a collection of requests that all use the same authentication token. This can be useful for automating tasks that require authentication

  • @himachaliravi
    @himachaliravi4 ай бұрын

    you did not explain why we need patch when we can do same in post

  • @RaghavPal

    @RaghavPal

    4 ай бұрын

    Ravi Both methods serve different purposes: - POST: This method is used to create a new resource or submit data to the server. When you send a POST request, you're asking the server to accept the data enclosed in the body of the request and use it to create a new object. It's like adding a new file to a folder. - PATCH: This method is used for making partial updates to an existing resource. If you only need to update a few fields of a resource, PATCH is more appropriate. It's like editing a few words in a sentence without rewriting the whole page. Here's why you might choose PATCH over POST for updates: - Efficiency: PATCH requests only send the changes, rather than the entire updated entity, which can be more efficient for both bandwidth and processing. - Clarity: Using PATCH makes it clear that you're updating a resource rather than creating a new one. - Control: PATCH provides finer control over the update process, allowing partial updates and potentially reducing conflicts when multiple clients are modifying the same resource. In summary, while POST can be used for updates in some cases, PATCH is specifically designed for partial updates and can be more suitable for that purpose .

  • @chinmayk2657
    @chinmayk2657 Жыл бұрын

    you have not shown post in intellij

  • @RaghavPal

    @RaghavPal

    Жыл бұрын

    I will check

  • @haroldambid9445
    @haroldambid94455 ай бұрын

    tytytyty

  • @RaghavPal

    @RaghavPal

    5 ай бұрын

    Most welcome ..