Provided Methods
- get a list of datatables
Method documentation
All the examples expect that there is already a OneDataApi object initialized and assigned to a variable called "onedata_api".
### Creation of the ONE DATA Api ###
onedata_api = OneDataApi(base_url=base_url, username=user,
password=pw, verify=False, timeout=999)
Paginated
Description:
Lists all datatables matching the specified search parameters (page, limit, sort_by, ordering, projects, project_types, search, include_unassigned_resources, include_invisible, exclude_unnamed, exlcude_no_datatable).
Optional request options (request_transformers, response_transformers, timeout, verify, sleep_after_response_millis, deserializer) can be specified.
Returns: Paginated
Parameters:
Property | Type | Required | Default | Description |
---|---|---|---|---|
page | int | false | None | Result page |
limit | int | false | None | Items per page |
sort_by | ResourceSortProperty | false | None | Sort property |
ordering | SortOrder | false | None | Order direction |
projects | [Union[str, uuid.UUID]] | false | None | List of project IDs |
project_types | [OneDataModule] | false | None | List of OneDataModules (enum) |
search | str | false | None | String to search for desired datatables. Search is case insensitive. Name and tags are considered. |
include_unassigned_resources | bool | false | None | Decides if unassigned data will be selected |
include_invisible | bool | false | None | Decides if invisible datasets will be returned |
exclude_unnamed | bool | false | None | If this flag is set only datasets with a name are returned, i.e. FRTs with a non-explicitly set name are excluded |
exclude_no_datatable | bool | false | None | Excludes legacy datasets which are not a Data Table |
Usage
### Get list of datatables with parameters ###
datatables = onedata_api.datatables.paginated(age=0, limit=5, sort_by=ResourceSortProperty.NAME, ordering=SortOrder.ASC, search="Test")
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article