# Workflow status in batch Describe

**URL:** <https://community.temporal.io/t/workflow-status-in-batch-describe/1807>\
**Category:** Community Support\
**Created:** [March 24, 2021, 5:08pm UTC](https://community.temporal.io/t/workflow-status-in-batch-describe/1807 "2021-03-24T17:08:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramprasad\_Indarapu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/ramprasad_indarapu/32/718_2.png) [@Ramprasad\_Indarapu](https://community.temporal.io/u/Ramprasad_Indarapu)\
**Post date:** [March 24, 2021, 5:08pm UTC](https://community.temporal.io/t/workflow-status-in-batch-describe/1807/1 "2021-03-24T17:08:54Z")

</div>

Hi  
We have a requirement, to get the status of a set of wokflowIds.  
We are using the following code for querying for one work flow ID

```java
   WorkflowServiceStubs service = CreateWorkFlowInstance();
      WorkflowExecution execution = WorkflowExecution.newBuilder().setWorkflowId(workFlowId).build();
      DescribeWorkflowExecutionRequest describeWorkflowExecutionRequest =
          DescribeWorkflowExecutionRequest.newBuilder()
              .setNamespace(DEFAULT_NAME_SPACE)
              .setExecution(execution)
              .build();

      DescribeWorkflowExecutionResponse resp =
          service.blockingStub().describeWorkflowExecution(describeWorkflowExecutionRequest);

      WorkflowExecutionInfo workflowExecutionInfo = resp.getWorkflowExecutionInfo();
      String status = workflowExecutionInfo.getStatus().toString();

```

Do we have any API(batch), to get the status of a given set of workflowIds as we might use this for polling and want to know the impact of performance  
Thanks

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [March 24, 2021, 5:16pm UTC](https://community.temporal.io/t/workflow-status-in-batch-describe/1807/2 "2021-03-24T17:16:53Z")

</div>

Polling on any of the APIs which don’t support long poll is usually an anti-pattern. What is the use case you are trying to support?

---

<div class="post-metadata">

**Author:** ![Ramprasad\_Indarapu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/ramprasad_indarapu/32/718_2.png) [@Ramprasad\_Indarapu](https://community.temporal.io/u/Ramprasad_Indarapu)\
**Post date:** [March 24, 2021, 5:46pm UTC](https://community.temporal.io/t/workflow-status-in-batch-describe/1807/3 "2021-03-24T17:46:55Z")

</div>

We are creating a batch of workflows and firing asyn. And trying to check display the running status of those workflows

---

<div class="post-metadata">

**Author:** ![Ramprasad\_Indarapu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/ramprasad_indarapu/32/718_2.png) [@Ramprasad\_Indarapu](https://community.temporal.io/u/Ramprasad_Indarapu)\
**Post date:** [March 26, 2021, 3:05pm UTC](https://community.temporal.io/t/workflow-status-in-batch-describe/1807/4 "2021-03-26T15:05:14Z")

</div>

```
We have an application that generates and submits workflows on Temporal. The application keeps the identity of the workflows. We have a listing page to show the last N workflows along with its last status

We need to write a rest api accepting an array of workflow ids and returning its the status list
```

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [March 26, 2021, 3:56pm UTC](https://community.temporal.io/t/workflow-status-in-batch-describe/1807/5 "2021-03-26T15:56:43Z")

</div>

If you run with Elastic Search you could add _batchId_ custom search attribute and list workflows based on that id.

The `describeWorkflowExecution` is a relatively cheap call. So you can call it periodically without a problem.

---

<div class="post-metadata">

**Author:** ![Ramprasad\_Indarapu](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/ramprasad_indarapu/32/718_2.png) [@Ramprasad\_Indarapu](https://community.temporal.io/u/Ramprasad_Indarapu)\
**Post date:** [March 26, 2021, 4:12pm UTC](https://community.temporal.io/t/workflow-status-in-batch-describe/1807/6 "2021-03-26T16:12:28Z")

</div>

Thanks @maxim  
This takes only one workflowd, curious to know if any api which takes list of workflowids and return the status of those

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [March 26, 2021, 5:17pm UTC](https://community.temporal.io/t/workflow-status-in-batch-describe/1807/7 "2021-03-26T17:17:10Z")

</div>

There is no any API that takes a list of workflow Ids. You can use the [listWorkflowExecutions](https://github.com/temporalio/api/blob/4c2f6a281fa3fde8b0a24447de3e0d0f47d230b4/temporal/api/workflowservice/v1/service.proto#L233) API to achieve what you want using custom search attributes.
