How are outline groups and their levels for a spreadsheet accessible via the API?

I cannot find any representation of the information needed to work with existing outline groups for rows or columns in a spreadsheet.

There is the interface XSheetOutline offering relevant methods, but there’s no hint in what way the information (RangeAddress, Columns or Rows, …) is passed to the sheet / controller / … and stored for future access.
The link to the related developer’s guide is pointing to an empty page.

Oh that shitty OO wiki, they still didn’t manage to repair it after years despite being nudged into the solution at least twice… however, at least the source code of such empty pages can be viewed by appending a ?action=edit query, so for example like this (though that doesn’t have much more information in this case than the API page).

Fo example, with Python:

from com.sun.star.table.TableOrientation import ROWS

def main():
    doc = XSCRIPTCONTEXT.getDocument()
    sheet = doc.Sheets[0]
    address = sheet['A1:A10'].RangeAddress
    sheet.group(address, ROWS)
    sheet.hideDetail(address)
    return

Thanks @mauricio !
However, I already knew the methods provided by the XSheetOutline interface (See LibreOffice: XSheetOutline Interface Reference).
I wanted to access information about the currently defined groups of columns and rows which must be remembered somewhere after all. How else could the view show the groups and the related small icons available to manage the hide/show actions and the levels by mouse clicks - and how else colud the information be written to the file?
(Unfortunately it is possible that there is no access provided to get this info by user code without writing the file and reading the content.xml. Funny idea.)

This function is by sheet, so, you always can remove all (clearOutline) and set what you want and save this configuration.

Yes. I want to know what currently is set.