Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated Apr 29, 2024

Delete data

DELETE data

import { del } from 'aws-amplify/api';
async function deleteTodo() {
try {
const restOperation = del({
apiName: 'todo-api',
path: '/todo/1'
});
await restOperation.response;
console.log('DELETE call succeeded');
} catch (e) {
console.log('DELETE call failed: ', JSON.parse(e.response.body));
}
}