Chapter 3: Edit and Save Document
Recreate Protocol after Speaker Change
This API involves recreating a protocol after doing the changes in protocol
After editing speaker names:
- Run the
recreateProtocolAfterSpeakerChange
mutation.
Example body of recreateProtocolAfterSpeakerChange mutation
export const RECREATE_PROTOCOL_AFTER_SPEAKER_CHANGE = `
mutation RecreateProtocolAfterSpeakerChange($protocolSlug:String!){
recreateProtocolAfterSpeakerChange(protocolSlug:$protocolSlug){
success
}
}
`;
Parameters for recreateProtocolAfterSpeakerChange
Mutation
1. protocolSlug
- A unique identifier (slug) for the protocol (meeting or document) where you want to rename the speakers.
- Example: protocolSlug: “SNbtVr4Ls7Yzf3jMxX33Yzf3jMxX33”
Example JS code
import axios from "axios";
async function recreateProtocolAfterSpeakerChange(protocolSlug) {
const dataObj = {
query: RECREATE_PROTOCOL_AFTER_SPEAKER_CHANGE,
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.recreateProtocolAfterSpeakerChange;
console.log("Success:", responseData.success);
})
.catch((error) => {
console.log(error);
})
}
- This API call updates the speaker names across all relevant textsegments entries in the specific protocol.
After recreating the protocol, the getResultItemsByProtocol
query can be called to view the agenda items generated by the AI.
If you need to edit the agenda items, proceed to the next steps to update the agenda item and follow the corresponding documentation. Otherwise, you can call the createAnalysis
mutation to create the analysis and complete the upload process.
Have questions?
Still have questions? Talk to support.