Skip to content

[Bamboo] bamboo.activity() returns 404 #1362

Description

@timakamystery
BAMBOO_URL = 'https://bamboo.example.com'
token = 'xxx'
bamboo = Bamboo(url=BAMBOO_URL, token=token)
...
bamboo.activity()
Traceback (most recent call last):
  File "/Users/tshklyarov/repos/node-api/prune.py", line 37, in <module>
    agent_status = bamboo.activity()
  File "/Users/tshklyarov/repos/node-api/venv/lib/python3.9/site-packages/atlassian/bamboo.py", line 1098, in activity
    return self.get("build/admin/ajax/getDashboardSummary.action")
  File "/Users/tshklyarov/repos/node-api/venv/lib/python3.9/site-packages/atlassian/rest_client.py", line 340, in get
    response = self.request(
  File "/Users/tshklyarov/repos/node-api/venv/lib/python3.9/site-packages/atlassian/rest_client.py", line 312, in request
    self.raise_for_status(response)
  File "/Users/tshklyarov/repos/node-api/venv/lib/python3.9/site-packages/atlassian/rest_client.py", line 547, in raise_for_status
    response.raise_for_status()
  File "/Users/tshklyarov/repos/node-api/venv/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error:  for url: https://bamboo.example.com/build/admin/ajax/getDashboardSummary.action

Compared to bamboo.agent_status(), which provides a response. But I need active agents, while agent_status() provides some list of inactive old agents hence trying to use activity() instead to see not building agents.

Also tried using rest api, but it doesn't show if an agent busy/not..

curl -H "Authorization: Bearer XXX" https://bamboo.example.com/rest/api/latest/agent/123456/status
{"online": "true"}%

atlassian_python_api-3.41.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions