api.apiDelete<T>(endpoint) Convenience method that sends a DELETE request and returns the parsed JSON response (or void for endpoints that return no body).
| argument | Type | Description |
|---|---|---|
| endpointrequired | string | API path starting with /api/v1/... (e.g. /api/v1/cards/123). See the REST section for the full list of endpoints. |
Return value - Promise<T>
const api = window.Addon.iframe();
await api.apiDelete(`/api/v1/cards/${cardId}/comments/${commentId}`);