Questions tagged [atlassian-python-api]

This tag should be used for posts that involve the use of the atlassian-python-api. The API provides a simple python interface for interacting with Atlassian products (Jira, Confluence, BitBucket, etc.). Since it is a wrapper for the general Atlassian REST API with a different syntax and capabilities, posts specific to the atlassian-python-api should be identified using this tag instead of inaccurate tags like `confluence-rest-api` or `jira-rest-api`.

The atlassian-python-api is a Python wrapper for the Atlassian REST API and provides modules for different Atlassian products:

  • Jira
  • Confluence
  • BitBucket
  • Bamboo
  • Jira Service Desk
  • Xray

The documentation for the different modules is available here.

21 questions
3
votes
1 answer

How to download a Confluence page attachment with Python?

With the atlassian-python-api 1.15.1 module and python 3.6 how can I to download a file attached to a Confluence page ? The page actions section of the API documentation mentions an API get_attachments_from_content, with which I can successfully…
Tim
  • 1,853
  • 2
  • 24
  • 36
2
votes
1 answer

Unable to fetch the jira cloud assets through atlassian-python-api

I am working on a Atlassian Jira cloud product. I have a requirement to get the details of Jira cloud assets and update a field with some specific key-value pair. To achieve same, I have chosen python api to interact with Atlassian jira cloud and do…
2
votes
1 answer

Setting a commit message / update comment when editing a page with Atlassian Confluence Python API

I am using the atlassian-python-api to update a page as described in the documentation: from atlassian import Confluence conf = Confluence(url=srvr, username=usr, password=pswd) page_id = '12345' new_page_title = 'This is a new…
2
votes
1 answer

access confluence page via python script

I need to access a Confluence page via python script, but although I found some examples online, I wasn't able to do it. Here are a few attempts: import requests urllogin = 'https://myorg/confluence/display/path/to/page' login =…
2
votes
1 answer

How get context Confluence using atlassian-python-api?

I want to get context page confluence, used python module atlassian-python-api https://github.com/AstroTech/atlassian-python-api found example how to create new page from atlassian import Confluence confluence = Confluence( …
1
vote
0 answers

How do I use a pytest fixture to mock a child class's inherited methods with classes as properties while maintaining the API contract using autospec?

How it started I'm testing a class, ClassToTest, that makes API calls using atlassian-python-api. The tests are going to ensure that ClassToTest performs correctly with the data it gets back from the API. Many of the atlassian-python-api API calls…
1
vote
0 answers

Cannot pip install atlassian-python-api due to subprocess-exited-with-error

I am trying to install the atlassian-python-api using pip but upon trying to do so, I get the following error: Getting requirements to build wheel ... error: subprocess-exited-with-error. I am running Python version 3.10.0a2 installed through…
1
vote
2 answers

python : atlassian.errors.ApiValueError: No space or no content type, or setup a wrong version type set to content, or status param is not draft

I am using confluence API (using python)to update an existing confluence page but I am facing the below error: atlassian.errors.ApiValueError: No space or no content type, or setup a wrong version type set to content, or status param is not draft…
1
vote
2 answers

Get page id of a confluence page from its public url

How to get a Confluence page_id given a page_url. For Eg: If this is the Display URL: https://confluence.som.yale.edu/display/SC/Finding+the+Page+ID+of+a+Confluence+Page I want to get its page_id using Confluence REST API More details here
1
vote
1 answer

converting utc to est time in python

I have two dates, start date and end date, where both needs to used in google tag manager in EST timezone using python. Currently when I fetch the dates from jira using api, I am getting in the UTC format for start date, but for end date, getting…
1
vote
2 answers

getting error on updating assignee and comment field in JIRA using python

I am using python to automate JIRA process, while doing I am unable to update Assignee and Comment fields. While updating Assignee field, not getting any error, but the value is not updated properly, I am trying to assign from one user to other…
1
vote
0 answers

atlassian-python-api - How to trigger pipeline using pattern?

In my project I host at the bitbucket I have such bitbucket-pipelines.yml file: pipelines: default: - step: name: "Test and build" ...do something - step: name: "Deploy to test" ...do something tags: …
1
vote
1 answer

atlassian_python_api checking if blogpost exist

I'm using atlassian-pytho-api version 3.4.1. I need to create a blogpost which I successfully made this way confluence.create_page(space, title, content, type="blogpost") Now, I want to update this blogpost under certain conditions, for that i need…
F. Shahid
  • 101
  • 10
1
vote
1 answer

requests.exceptions.HTTPError: 401 Client Error atlassian-python-api

I am trying to connect to a Confluence page using the python wrapper on the API (as I am not familiar with any of this) but I keep getting the following error: requests.exceptions.HTTPError: 401 Client Error I know that people talk about this being…
1
vote
2 answers

Preserve new lines in Confluence API

I am having the list of dictionaries: {'associations': [{'host1': ['v1','v2']}, {'host2': ['v2,v3']}, {'host3': ['v1', 'v7']}]} This list of dictionaries I am trying to pass to confluence page in YAML format by using atlassian-python-api module:…
1
2