menu button

Chapter 4: Update

Check Analysis Result

This API guides you to check created analysis if its completed


After renaming the speakers or updating the agenda items, the analysis may take some time to complete on the backend.
To check whether the analysis has finished processing, you can call this query:

  • checkAnalysisResults can be used to periodically check the analysis status and updates the agenda items accordingly.

Example GraphQL Query

export const CHECK_ANALYSIS_RESULTS = `
    query CheckAnalysisResults($protocolSlug: String!){
        checkAnalysisResults(protocolSlug:$protocolSlug){
            currentDepth
            classType
        }
    }
`;

Parameters for checkAnalysisResults Query


1. protocolSlug

  • A unique identifier (slug) for the protocol (meeting or document) where you want to check the analysis for.
    • Example: protocolSlug: “SNbtVr4Ls7Yzf3jMxX33Yzf3jMxX33”

Example JS code

import axios from "axios";

async function checkAnalysisResults(protocolSlug) {

  const dataObj = {
    query: CHECK_ANALYSIS_RESULTS,
    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.checkAnalysisResults;
  
      if ((responseData.currentDepth === 3 && responseData.classType === "politics") 
        ||(responseData.currentDepth === 2 && responseData.classType === "summary")) {
            // this.getResultItemByProtocolAndSlug(protocolSlug);
      } else {
        //call the same function earch 30 sec
        setTimeout(() => {
            this.checkAnalysisResult(protocolSlug);
        }, 3000);
      }
    })
    .catch((error) => {
      console.log(error);
    })
}
  • If the response is None, the analysis is still in progress.
  • If the classType parameter is not None, the analysis is considered successfully completed.
    if ((responseData.currentDepth === 3 && responseData.classType === "politics") ||
        (responseData.currentDepth === 2 && responseData.classType === "summary")) 
    {
      this.getResultItemByProtocolAndSlug(protocolSlug);
    } else {
      setTimeout(() => {
          this.checkAnalysisResult(protocolSlug);
      }, 3000);
    }

Have questions?

Still have questions? Talk to support.