menu button

Chapter 4: Update

Get Result Items by Protocol

This API involves getting the result items created by AI


Example GraphQL Query

export const GET_RESULT_ITEMS_BY_PROTOCOL = `
  fragment agendaDetails on ApiAgendaItemType {
    id
    classType
    title
    textList
    resolutionList {
      resolution
      decision
    }
    createdAt
  }

  fragment taskDetails on ApiTaskType {
    id
    text
    date
    assignedTo
    done
    createdAt
  }

  query GetResultItemsByProtocol($protocolSlug: String!){
    getResultItemsByProtocol(protocolSlug:$protocolSlug){
      agendaItemList{
        ...agendaDetails
      }

      taskList{
        ...taskDetails
      }
    }
  }
`;

Parameters for getResultItemsByProtocol Query


1. protocolSlug

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

Example JS code

import axios from "axios";

async function getResultItemByProtocol(protocolSlug) {

  const dataObj = {
    query: GET_RESULT_ITEMS_BY_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.getResultItemByProtocol;

      const agendaItemList = responseData.agendaItemList;
      const taskItemList = responseData.taskItemList; 

      return agendaItemList, taskItemList
    })
    .catch((error) => {
      console.log(error);
    })
}

Have questions?

Still have questions? Talk to support.