title: How do I get the status of a long running operation when calling the Dialogflow gRPC API?
body: <p>Many Dialogflow RPC methods return a <a href="https://dialogflow.com/docs/reference/api-v2/rpc/google.longrunning#google.longrunning.Operation" rel="nofollow noreferrer"><code>Operation</code></a> message/object which represents a long running operation.  How do I check on the status of the operation and retrieve the result if the operation is completed?</p>
  
  <p>Dialogflow gRPC methods that return an operation:</p>
  
  <ul>
  <li><a href="https://dialogflow.com/docs/reference/api-v2/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.Agents.ExportAgent-table" rel="nofollow noreferrer">export agent</a></li>
  <li><a href="https://dialogflow.com/docs/reference/api-v2/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.Agents.ImportAgent-table" rel="nofollow noreferrer">import agent</a></li>
  <li><a href="https://dialogflow.com/docs/reference/api-v2/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.Agents.RestoreAgent-table" rel="nofollow noreferrer">restore agent</a></li>
  <li><a href="https://dialogflow.com/docs/reference/api-v2/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.Agents.TrainAgent-table" rel="nofollow noreferrer">train agent</a></li>
  <li>Batch operations for <a href="https://dialogflow.com/docs/reference/api-v2/rpc/google.cloud.dialogflow.v2#intents" rel="nofollow noreferrer">intents</a> and <a href="https://dialogflow.com/docs/reference/api-v2/rpc/google.cloud.dialogflow.v2#entitytypes" rel="nofollow noreferrer">entity types</a></li>
  </ul>