menu button

Chapter 6: Deletion

Delete Protocol

This API guides you to permanently delete a protocol and all its associated data


When you need to permanently remove a protocol (meeting or document) and all its associated data from the system, you can use this mutation. This is useful for data cleanup, privacy compliance, or when protocols are no longer needed.

  • deleteProtocol can be used to permanently delete a protocol and all its associated data.

Example GraphQL Mutation

export const DELETE_PROTOCOL = `
    mutation DeleteProtocol($protocolSlug: String!){
        deleteProtocol(protocolSlug:$protocolSlug){
            success
        }
    }
`;

Parameters for deleteProtocol Mutation


1. protocolSlug

  • A unique identifier (slug) for the protocol (meeting or document) you want to permanently delete.

Response Structure

The mutation returns:

  • success: A boolean indicating whether the deletion was successful

Example JS Code

import axios from "axios";

async function deleteProtocol(protocolSlug) {

  const dataObj = {
    query: DELETE_PROTOCOL,
    variables: {
      protocolSlug: protocolSlug,
    },
  };

  return await axios({
    method: "post",
    url: process.env.VUE_APP_GRAPHQL_API,
    data: JSON.stringify(dataObj),
    headers: {
      "Content-Type": "application/json",
      "x-api-key": process.env.VUE_APP_API_KEY,
    },
  })
    .then((response) => {
      const responseData = response.data.data.deleteProtocol;
      
      if (responseData.success) {
        console.log('Protocol deleted successfully:', protocolSlug);
      } else {
        console.log('Failed to delete protocol:', protocolSlug);
      }
      
      return responseData;
    })
    .catch((error) => {
      console.error('Error deleting protocol:', error);
      throw error;
    });
}

// Example usage
deleteProtocol("<example-protocol-slug>");

Example Response

{
  "data": {
    "deleteProtocol": {
      "success": true
    }
  }
}

Important Notes

  • Permanent Action: This operation permanently deletes the entire protocol and all associated data. This action cannot be undone.
  • Complete Deletion: This includes:
    • Protocol metadata
    • Analysis results
    • Agenda items
    • Transcriptions
    • All related documents
  • Data Compliance: Use this mutation when you need to comply with data retention policies, GDPR requests, or other privacy regulations.
  • Irreversible: Once deleted, the protocol and all its data cannot be recovered. Make sure you have backups if needed.

Have questions?

Still have questions? Talk to support.