# Workflow status from API

**URL:** <https://discuss.circleci.com/t/workflow-status-from-api/31262>\
**Category:** Integrations and Accounts\
**Created:** [July 9, 2019, 8:45am UTC](https://discuss.circleci.com/t/workflow-status-from-api/31262 "2019-07-09T08:45:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjerkw](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/tjerkw/32/22710_2.png) [@tjerkw](https://discuss.circleci.com/u/tjerkw)\
**Post date:** [July 9, 2019, 8:45am UTC](https://discuss.circleci.com/t/workflow-status-from-api/31262/1 "2019-07-09T08:45:08Z")

</div>

There is no way to get the workflow status via the api.

There was an existing issue but it was closed, without actually providing an api:  
[https://discuss.circleci.com/t/get-workflow-status-from-api/14336/3](https://discuss.circleci.com/t/get-workflow-status-from-api/14336/3)

Currently we use this to get the last build status:

API\_URL=“[https://circleci.com/api/v1.1/project/bitbucket/$CIRCLECI\_USERNAME/tiqetsweb/tree/$BRANCH?circle-token=$CIRCLECI\_TOKEN](https://circleci.com/api/v1.1/project/bitbucket/%24CIRCLECI_USERNAME/tiqetsweb/tree/%24BRANCH?circle-token=%24CIRCLECI_TOKEN)”  
#curl --silent API\_URL #exit 0 circleci\_data=( (curl --silent $API\_URL | jq -r .[0].outcome,.[0].vcs\_revision) )

But since we use workflows, we want the status of the whole workflow.

How do we do this?

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [July 9, 2019, 11:13pm UTC](https://discuss.circleci.com/t/workflow-status-from-api/31262/2 "2019-07-09T23:13:56Z")

</div>

I think there is an API call to get the status of the last number of jobs. I wonder if you could programmatically read what jobs were run as part of a workflow, and then derive a workflow status by checking to see if all jobs in a workflow were successful.

(It’s not completely elegant, but sticky-tape solutions now are often better than an ideal one promised for the future!).
