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
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”
#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?