|
| 1 | +Confluence module |
| 2 | +================= |
| 3 | + |
| 4 | +Get page info |
| 5 | +------------- |
| 6 | + |
| 7 | +.. code-block:: python |
| 8 | +
|
| 9 | + # Check page exists |
| 10 | + confluence.page_exists(space, title) |
| 11 | +
|
| 12 | + # Provide content by type (page, blog, comment) |
| 13 | + confluence.get_page_child_by_type(page_id, type='page', start=None, limit=None) |
| 14 | +
|
| 15 | + # Provide content id from search result by title and space |
| 16 | + confluence.get_page_id(space, title) |
| 17 | +
|
| 18 | + # Provide space key from content id |
| 19 | + confluence.get_page_space(page_id) |
| 20 | +
|
| 21 | + # Returns the list of labels on a piece of Content |
| 22 | + confluence.get_page_by_title(space, title, start=None, limit=None) |
| 23 | +
|
| 24 | + # Get page by ID |
| 25 | + confluence.get_page_by_id(page_id, expand=None) |
| 26 | +
|
| 27 | + # The list of labels on a piece of Content |
| 28 | + confluence.get_page_labels(page_id, prefix=None, start=None, limit=None) |
| 29 | +
|
| 30 | + # Get draft page by ID |
| 31 | + confluence.get_draft_page_by_id(page_id, status='draft') |
| 32 | +
|
| 33 | + # Get all page by label |
| 34 | + confluence.get_all_pages_by_label(label, start=0, limit=50) |
| 35 | +
|
| 36 | + # Get all pages from Space |
| 37 | + confluence.get_all_pages_from_space(space, start=0, limit=500) |
| 38 | +
|
| 39 | + # Get list of pages from trash |
| 40 | + confluence.get_all_pages_from_space_trash(space, start=0, limit=500, status='trashed') |
| 41 | +
|
| 42 | + # Get list of draft pages from space |
| 43 | + # Use case is cleanup old drafts from Confluence |
| 44 | + confluence.get_all_draft_pages_from_space(space, start=0, limit=500, status='draft') |
| 45 | +
|
| 46 | + # Search list of draft pages by space key |
| 47 | + # Use case is cleanup old drafts from Confluence |
| 48 | + confluence.get_all_draft_pages_from_space_through_cql(space, start=0, limit=500, status='draft') |
| 49 | +
|
| 50 | + # Info about all restrictions by operation |
| 51 | + confluence.get_all_restictions_for_content(content_id) |
| 52 | +
|
| 53 | +Page actions |
| 54 | +------------ |
| 55 | + |
| 56 | +.. code-block:: python |
| 57 | +
|
| 58 | + # Create page from scratch |
| 59 | + confluence.create_page(space, title, body, parent_id=None, type='page') |
| 60 | +
|
| 61 | + # Remove page |
| 62 | + confluence.remove_page(page_id, status=None) |
| 63 | +
|
| 64 | + # Remove page from trash |
| 65 | + confluence.remove_page_from_trash(page_id) |
| 66 | +
|
| 67 | + # Remove page as draft |
| 68 | + confluence.remove_page_as_draft(page_id) |
| 69 | +
|
| 70 | + # Update page if already exist |
| 71 | + confluence.update_page(parent_id, page_id, title, body, type='page') |
| 72 | +
|
| 73 | + # Update page or create page if it is not exists |
| 74 | + confluence.update_or_create(parent_id, title, body) |
| 75 | +
|
| 76 | + # Set the page (content) property e.g. add hash parameters |
| 77 | + confluence.set_page_property(page_id, data) |
| 78 | +
|
| 79 | + # Delete the page (content) property e.g. delete key of hash |
| 80 | + confluence.delete_page_property(page_id, page_property) |
| 81 | +
|
| 82 | + # Get the page (content) property e.g. get key of hash |
| 83 | + confluence.get_page_property(page_id, page_property_key) |
| 84 | +
|
| 85 | + # Get the page (content) properties |
| 86 | + confluence.get_page_properties(page_id) |
| 87 | +
|
| 88 | + # Get page ancestors |
| 89 | + confluence.get_page_ancestors(page_id) |
| 90 | +
|
| 91 | + # Attach (upload) a file to a page, if it exists it will update the |
| 92 | + # automatically version the new file and keep the old one |
| 93 | + confluence.attach_file(filename, page_id=None, title=None, space=None, comment=None) |
| 94 | +
|
| 95 | +Get spaces info |
| 96 | +--------------- |
| 97 | + |
| 98 | +.. code-block:: python |
| 99 | +
|
| 100 | + # Get all spaces with provided limit |
| 101 | + confluence.get_all_spaces(start=0, limit=500) |
| 102 | +
|
| 103 | + # Get information about a space through space key |
| 104 | + confluence.get_space(space_key, expand='description.plain,homepage') |
| 105 | +
|
| 106 | +Users and Groups |
| 107 | +---------------- |
| 108 | + |
| 109 | +.. code-block:: python |
| 110 | +
|
| 111 | + # Get all groups from Confluence User management |
| 112 | + confluence.get_all_groups(start=0, limit=1000) |
| 113 | +
|
| 114 | + # Get a paginated collection of users in the given group |
| 115 | + confluence.get_group_members(group_name='confluence-users', start=0, limit=1000) |
| 116 | +
|
| 117 | + # Get information about a user through username |
| 118 | + confluence.get_user_details_by_username(username, expand=None) |
| 119 | +
|
| 120 | + # Get information about a user through user key |
| 121 | + confluence.get_user_details_by_userkey(userkey, expand=None) |
| 122 | +
|
| 123 | +CQL |
| 124 | +--- |
| 125 | + |
| 126 | +.. code-block:: python |
| 127 | +
|
| 128 | + # Get results from cql search result with all related fields |
| 129 | + confluence.cql(cql, start=0, limit=None) |
| 130 | +
|
| 131 | +Other actions |
| 132 | +------------- |
| 133 | + |
| 134 | +.. code-block:: python |
| 135 | +
|
| 136 | + # Clean all caches from cache management |
| 137 | + confluence.clean_all_caches() |
| 138 | +
|
| 139 | + # Clean caches from cache management |
| 140 | + # e.g. |
| 141 | + # com.gliffy.cache.gon |
| 142 | + # org.hibernate.cache.internal.StandardQueryCache_v5 |
| 143 | + confluence.clean_package_cache(cache_name='com.gliffy.cache.gon') |
| 144 | +
|
| 145 | + # Convert to Confluence XHTML format from wiki style |
| 146 | + confluence.convert_wiki_to_storage(wiki) |
| 147 | +
|
| 148 | + # Get page history |
| 149 | + confluence.history(page_id) |
| 150 | +
|
| 151 | + # Compare content and check is already updated or not |
| 152 | + confluence.is_page_content_is_already_updated(page_id, body) |
| 153 | +
|
0 commit comments