Tutorial: DELETE a note
This tutorial assumes you have set up your environment with Postman and the correct sample data set. For more information, see Tutorial: Set up your Postman environment.
Tutorial steps
- In Postman, start a new request by clicking the + to the right of the
Launchpad tab.
- On the Authorization tab, select Basic Auth using user aapplegate and password gw.
- Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
- Change the operation to POST and enter the following URL, but do not click Send yet:
- Specify the request payload.
- In the first row of tabs (the one that starts with Params), click Body.
- In the row of radio buttons, select raw.
- At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
- Paste the following into the text field underneath the radio buttons.
{ "data": { "attributes": { "body": "API tutorial note to be deleted" } } }
- Click Send. In the response payload, identify the note's id.
- Open a third request tab and right-clicking the second tab and selecting Duplicate Tab.
- Change the operation to DELETE, enter the following URL, but do not click Send yet:
- DELETEs cannot specifies request bodies. On the third tab, navigate to the Body tab and select the none radio button.
- Click Send. (The response to a successful DELETE is "204 - No content".)
Checking your work
Resend the request on the third tab. This request returns a "No resource was found" error because it is attempting to DELETE a note that has already been DELETEd.