'check if a bitbucket pipeline is running from terminal

Is there a programmatic way to check if a bitbucket pipeline is running?

When a pipeline gets kicked off and runs for a few minutes, I would like to run a script that pings bitbucket to see if the/a pipeline is still running? Is there any way to do that? Is there a cli for bitbucket?

I saw this but hoping there's a better (free) alternative



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source