Comments (9)
@kierun Well, you can do in different ways i.e.
old_content = confluence.get_page_by_id(123).expand='storage.view' body = (((result.get('body') or {}).get('view') or {}).get('value') or {}) body.replace("oldvalue", "new_value") confluence.updade_page(old_content.get('id'), body=body)
https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/confluence.py#L505
https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/confluence.py#L541
from atlassian-python-api.
Hi!
I hope that commit will cover your request
1b875e8
Cheers,
Gonchik Tsymzhitov
from atlassian-python-api.
1b875e8 seems to be about appending to a page. As far as I understand @argysamo request, this is about getting the whole content of a page.
As simple use case would be:
- Get the page's data.
- Find some field within said data -- for example a page property.
- Update said field to a new value.
- Upload the new page content.
Or is that already possible and I somehow missed it?
from atlassian-python-api.
@gonchik When trying previous i am getting:
AttributeError: 'dict' object has no attribute 'expand'
from atlassian-python-api.
SHould be I think:
confluence.get_page_by_id(page_id, expand='storage.view')
But : 'bool' object has no attribute 'get'
from atlassian-python-api.
@freeyland on which did you try it?
from atlassian-python-api.
It is working, made a mistake in my code. Thnx for quick reply
from atlassian-python-api.
@gonchik When Updating Im getting:
{'statusCode': 400, 'message': 'org.codehaus.jackson.map.JsonMappingException: Instantiation of [simple type, class com.atlassian.confluence.api.model.content.id.ContentId] value failed: Can't parse as a ContentId:
Hallo
(through reference chain: com.atlassian.confluence.api.model.content.Content["ancestors"]->com.atlassian.confluence.api.model.content.Content["id"])'}body.replace("Hallo", "Hallo2") result = confluence.update_page( parentID, pageID, 'Versions & Changelogs', body, 'page', 'wiki')
from atlassian-python-api.
Please, check the order of variables
https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/confluence.py#L687
from atlassian-python-api.
Related Issues (20)
- [confluence] SSLerror and 401 HOT 2
- BUG: Documentation https://atlassian-python-api.readthedocs.io HOT 1
- API method to check if a user has permission on a specific page/space HOT 2
- get_page_as_word is giving data in bytes for .doc format and not .docx. Do we have any method to get .docx format HOT 1
- Is there any async implenetaton?
- confluence.get_space_permissions(space_key) gives 404 HOT 1
- Parsing date-time string for pipeline.completed_on failing due to strftime issue.
- Question: is python 2.7 still supported? HOT 1
- Question: Get all commits on a specific branch HOT 1
- Max of only 500 pages are returned HOT 3
- markdown app HOT 1
- Getting and setting default reviewers in Bitbucket Server
- Assets REST API HOT 1
- Path Variables instead of Query Params in URLs
- Comma in expand query param causes issue if URL encoded HOT 2
- need a function to set the test status in in test execution HOT 1
- Confluence Cloud Python API connection Timeouts
- Jira Software - rank API available? HOT 1
- [Jira] get_issue_changelog broken? HOT 2
- unexpected keyword argument 'paging_workaround' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atlassian-python-api.