Provided Methods
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)
get
Description
Retrieves a Production Line with the given data id XOR by name and project id.
Optional request options (request_transformers, response_transformers, timeout, verify, sleep_after_response_millis, deserializer) can be specified.
Returns: ProductionLine
Parameters
Property | Type | Required | Default | Description |
---|---|---|---|---|
id | Union[str, uuid.UUID] | false | None | ID of the data table |
version | int | false | None | version number of the production line |
name | str | false | None | name of the data table |
project_id | Union[str, uuid.UUID] | false | None | ID of the project |
force_exact_match | bool | false | True | Search for exact match, False: Data table includes the name |
force_distinct | bool | false | True | Raise exception if name is ambiguous, False: execute on first match |
Usage
### Retrieval of a production line by id ###
pd: ProductionLine = onedata_api.production_lines.get(id=UUID(production_line_id))
### Retrieval of a production line by name ###
pd: ProductionLine = onedata_api.production_lines.get(name=name, project_id=project, force_distinct=True, force_exact_match=True)
paginated
Description
Lists all production lines matching the specified search parameters (page, limit, sort_by, ordering, projects, project_types, search).
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 | [uuid.UUID] | false | None | list of project ids |
project_types | [OneDataModule] | false | None | list of OneDataModules |
search | str | false | None | string to search for desired resources. Search is case insensitive. Name and tags are considered. |
Usage
### Retrieval of production lines in projects ###
paginated: Paginated = onedata_api.production_lines.paginated(page=0,
limit=10,
search=production_line_name,
projects=[project_id])