API
- class o2a_registry.api.RegistryApi(hostname: str, ssl: bool = True)
Registry API Wrapper
- async close()
Closes the registry wrapper.
- async create_contact(contact: CreateContact) None
Create a contact in the registry.
- Parameters:
contact – new contact.
- Returns:
None
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async create_event(item_id: int, event: CreateEvent) None
Creates an event for an item from the registry.
- Parameters:
item_id – item ID.
event – event to create.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async create_item(item: CreateItem) None
Creates a new item in the registry.
- Parameters:
item – Item to create in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async create_item_contact(item_id: int, contact_id: int, roles: list[int])
Creates a new item contact for a specified item and contact in the registry.
- Parameters:
item_id – item ID.
contact_id – contact ID.
roles – List of role IDs.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async create_item_version(item_id: int, validity_date: datetime | None = None) None
Creates an item version in the registry.
- Parameters:
item_id – item ID.
validity_date – From which date on the version is valid.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async create_mission(mission: CreateMission)
Creates a new mission in the registry.
- Parameters:
mission – mission to create.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async create_mission_contact(mission_id: int, contact_id: int, roles: list[int])
Create a mission contact for a specified mission and contact in the registry.
- Parameters:
mission_id – mission ID.
contact_id – contact ID.
roles – List of role IDs.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async create_mission_items(mission_id: int, mission_items: Sequence[CreateMissionItem]) None
Associate a list of items to a mission.
- Parameters:
mission_id – mission ID.
mission_items – List of mission items.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async delete_contact(contact_id: int) None
Deletes a contact in the registry.
- Parameters:
contact_id – contact ID.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async delete_event(item_id: int, event_id: int) None
Deletes an event for an item.
- Parameters:
item_id – item ID.
event_id – event ID.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async delete_item(item_id: int) None
Deletes an item from the registry.
- Parameters:
item_id – item ID of the item to be deleted.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async delete_item_contact(item_id: int, contact_id: int) None
Deletes an item contact for the specified item and contact in the registry.
- Parameters:
item_id – item ID.
contact_id – contact ID.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async delete_mission(mission_id: int) None
Deletes a mission from the registry.
- Parameters:
mission_id – mission ID.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async delete_mission_contact(mission_id: int, contact_id: int) None
Deletes a mission contact from the registry. :param mission_id: mission ID. :param contact_id: contact ID. :raises aiohttp.ClientResponseError: If the request fails.
- async delete_mission_items(mission_id: int)
Removes the association between a specified mission and all its associated items.
- Parameters:
mission_id – mission ID.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async edit_contact(contact_id: int, contact: EditContact) None
Edits a contact in the registry. Only the set entries in the EditContact will be edited.
- Parameters:
contact_id – contact ID.
contact – contact containing the fields which are edited.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async edit_event(item_id: int, event_id: int, event: EditEvent) None
Edits an event for an item.
- Parameters:
item_id – item ID.
event_id – event ID.
event – event containing the fields which are edited.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async edit_item(item_id: int, item: EditItem) None
Edits the item with the specified ID for the registry. Only the set entries in the EditItem will be edited.
- Parameters:
item_id – item ID of the item to be edited.
item – EditItem specifying the changes.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async edit_mission(mission_id: int, mission: EditMission)
Edits a mission in the registry. Only set field in the EditMission are changed.
- Parameters:
mission_id – mission ID.
mission – mission containing the fields which are edited.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_contact(contact_id: int) Contact
Gets a contact from the registry.
- Parameters:
contact_id – contact ID.
- Returns:
Contact with the specified contact ID.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_contacts(where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[Contact]
Get contacts from the registry.
- Parameters:
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of contacts.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_event(item_id: int, event_id: int) Event
Gets an event for an item from the registry.
- Parameters:
item_id – item ID.
event_id – event ID.
- Returns:
Event with the specified event ID.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_events(item_id: int, where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[Event]
Gets events from the registry.
- Parameters:
item_id – item ID.
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of events in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_item(item_id: int) Item
Gets the item with the specified ID for the registry.
- Parameters:
item_id – item ID.
- Returns:
item with the specified ID.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_item_contact(item_id: int, contact_id: int) list[ItemContact]
Gets the item contact for the specified item and contact.
- Parameters:
item_id – item ID.
contact_id – contact ID.
- Returns:
Item contact for the specified item and contact.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_item_contacts(item_id: int, where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[ItemContact]
Gets all item contacts associated with the specified item.
- Parameters:
item_id – item ID.
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of item contacts associated with the specified item.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_item_parameter(item_id: int, parameter_id: int) Parameter
Gets a item parameter from the registry.
- Parameters:
item_id – item ID.
parameters_id – parameter ID.
- Returns:
Parameter with the specified ID.
- async get_item_parameter_properties(item_id: int, property_id: int, where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[Property]
Gets item parameter properties from the registry.
- Parameters:
item_id – item ID.
property_id – property ID.
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of properties in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_item_parameter_property(item_id: int, parameter_id: int, property_id: int) Property
Gets a item parameter property from the registry.
- Parameters:
item_id – item ID.
parameter_id – parameter ID.
- Returns:
Property with the specified ID.
- async get_item_parameters(item_id: int, where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[Parameter]
Gets item parameters from the registry.
- Parameters:
item_id – item ID.
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of parameters of the specified item in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_item_properties(item_id: int, where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[Property]
Gets item properties from the registry.
- Parameters:
item_id – item ID.
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of properties in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_item_property(item_id: int, property_id: int) Property
Gets a item property from the registry.
- Parameters:
item_id – item ID.
property_id – property ID.
- Returns:
Property with the specified ID.
- async get_item_version(item_id: int, version: int) dict[str, Any]
Gets an item version from the registry.
- Parameters:
item_id – item ID.
version – version number.
- Returns:
Item version in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_item_version_with_subitems(item_id: int, version: int) dict[str, Any]
Gets an item version from the registry.
- Parameters:
item_id – item ID.
version – version number.
- Returns:
Item version in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_item_versions(item_id: int) list[Version]
Gets item versions from the registry.
- Parameters:
item_id – item ID.
- Returns:
List of versions in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_items(where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[Item]
Returns a list of items in the registry.
- Parameters:
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of items in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_mission(mission_id: int) Mission
Gets the mission with the specified ID.
- Parameters:
mission_id – mission ID.
- Returns:
Mission with the specified ID.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_mission_contact(mission_id: int, contact_id: int) list[MissionContact]
Get a mission contacts for a specified mission and contact.
- Parameters:
mission_id – mission ID.
contact_id – contact ID.
- Returns:
List of mission contacts associated with the specified mission and contact.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_mission_contacts(mission_id: int, where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[MissionContact]
Gets contacts associated with the specified mission.
- Parameters:
mission_id – mission ID.
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of mission contacts associated with the specified mission.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_mission_items(mission_id: int, where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[ItemReference]
Gets all items associated with the specified mission. Does only return references to the items.
- Parameters:
mission_id – mission ID.
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of references of items associated with the specified mission.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_missions(where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[Mission]
Gets missions from the registry.
- Parameters:
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of missions stored in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_state(state_id: int) ItemState
Gets a state from the registry.
- Parameters:
state_id – state ID.
- Returns:
State with the specified ID.
- async get_states(where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[ItemState]
Gets states from the registry.
- Parameters:
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of states in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_unit(unit_id: int) Unit
Gets a unit from the registry.
- Parameters:
unit_id – state ID.
- Returns:
Unit with the specified ID.
- async get_units(where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[Unit]
Gets units from the registry.
- Parameters:
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of units in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_vocable(vocable_id: int) Vocable
Gets a vocable from the registry.
- Parameters:
vocable_id – vocable ID.
- Returns:
Vocable with the specified ID.
- async get_vocable_group(group_id: int) VocableGroup
Gets a vocable group from the registry.
- Parameters:
group_id – vocable group ID.
- Returns:
Vocable group with the specified ID.
- async get_vocable_groups(where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[VocableGroup]
Gets vocable groups from the registry.
- Parameters:
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of vocable groups in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async get_vocables(where: str | None = None, sorts: list[str] | None = None, offset: int | None = None, hits: int | None = None) list[Vocable]
Gets vocables from the registry.
- Parameters:
where – RSQL QUERY (e.g. “id==90”).
sorts – List of field names to sort by.
offset – Number of records to skip before returning data.
hits – Number of records to return.
- Returns:
List of vocables in the registry.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async logged_in() bool
Checks, if you are currently logged in.
- Returns:
If currently logged in.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- async login(username: str, password: str) None
Log in to the registry. This is only required if you want to create, edit or delete information in the registry. Use either your AWI username and password or your email and API token.
- Parameters:
username – AWI username or email.
password – passwort or API token.
- Raises:
aiohttp.ClientResponseError – If the request fails.
- class o2a_registry.models.Contact(*, uuid: UUID, id: int, created: datetime | None = None, lastModified: datetime, firstName: str | None = None, lastName: str | None = None, email: str, orcid: str | None = None, telephone: str | None = None, postalCode: str | None = None, city: str | None = None, administrativeArea: str | None = None, country: str | None = None, ror: str | None = None)
Contact class returned from the registry API
- administrative_area: str | None
Administrative area name.
- city: str | None
City name.
- country: str | None
Country name.
- created: datetime | None
Datetime when the contact was created in the registry.
- email: str
Contact email.
- first_name: str | None
Contacts first name.
- id: int
Contact ID.
- last_modified: datetime
Datetime when the contact was last modified in the registry.
- last_name: str | None
Contacts last name.
- orcid: str | None
Open Researcher and Contributor ID URL (https://orcid.org/).
- postal_code: str | None
Postal code.
- ror: str | None
Research Organization Registry URL (https://ror.org/).
- telephone: str | None
Telephone number.
- uuid: UUID
Contact unique identifier.
- class o2a_registry.models.CreateContact(*, first_name: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=2)], last_name: ~typing.Annotated[str, ~annotated_types.MinLen(min_length=2)], email: ~pydantic.networks.EmailStr, orcid: ~typing.Annotated[~pydantic.networks.HttpUrl, ~pydantic.functional_validators.AfterValidator(func=<o2a_registry.validation.url_host_checker.UrlHostChecker object at 0x755b47ffb770>)] | None = None, telephone: str | None = None, postal_code: str | None = None, city: str | None = None, administrative_area: str | None = None, country: str | None = None, ror: ~typing.Annotated[~pydantic.networks.HttpUrl, ~pydantic.functional_validators.AfterValidator(func=<o2a_registry.validation.url_host_checker.UrlHostChecker object at 0x755b47e00260>)] | None = None)
Contact object to create a new contact in the registry.
- administrative_area: str | None
Administrative area name.
- city: str | None
City name.
- country: str | None
Country name.
- email: EmailStr
Contact email. Needs to be a valid email address.
- first_name: str
Contacts first name. Must be at least two characters long.
- last_name: str
Contacts last name. Must be at least two characters long.
- orcid: UrlHostChecker object at 0x755b47ffb770>)] | None
Open Researcher and Contributor ID URL string (https://orcid.org/).
- postal_code: str | None
Postal code.
- ror: UrlHostChecker object at 0x755b47e00260>)] | None
Research Organization Registry URL string (https://ror.org/).
- telephone: str | None
Telephone number.
- class o2a_registry.models.CreateEvent(*, start_date: datetime, end_date: datetime, longitude: Annotated[float | None, Gt(gt=-180), Lt(lt=180)] = None, latitude: Annotated[float | None, Gt(gt=-90), Lt(lt=90)] = None, elevation: float | None = None, label: Annotated[str, MinLen(min_length=1)], description: Annotated[str | None, MinLen(min_length=1)] = None, type_id: Annotated[int, Gt(gt=0)])
Event class for creating an event in the registry.
- description: str | None
Description
- elevation: float | None
Elevation above/below the see-surface of the events location in meter. For locations below the sea-surface, the elevation should be negative.
- end_date: datetime
Datetime when the event stops.
- label: str
Label for the event. Should be unique for an item.
- latitude: float | None
Latitude of the events location in degrees. Should be between -90° and 90°.
- longitude: float | None
Longitude of the events location in degrees. Should be between -180° and 180°.
- start_date: datetime
Datetime when the event starts.
- type_id: int
Event-Type
- class o2a_registry.models.CreateItem(*, short_name: Annotated[str, MinLen(min_length=1)], long_name: Annotated[str, MinLen(min_length=1)], description: str | None = None, model: str | None = None, manufacturer: str | None = None, serial_number: str | None = None, operation_instructions: str | None = None, inventory_number: str | None = None, citation: str | None = None, parent_id: int = 0, status_id: Annotated[int, Gt(gt=0)], type_id: Annotated[int, Gt(gt=0)], workflow: MountWorkflow | UnMountWorkflow | None = None)
Item class to create a new item in the registry.
- citation: str | None
handle.net handle (not a URL itself).
- description: str | None
Description.
- inventory_number: str | None
Inventory number.
- long_name: str
Long name of the item.
- manufacturer: str | None
Item manufacturer name.
- model: str | None
Item model name.
- operation_instructions: str | None
Instructions how to operate the item.
- parent_id: int
ID of the item on which the item is mounted. Is zero, if the item is not mounted.
- serial_number: str | None
Item serial number.
- short_name: str
Short name of the item. Should be unique.
- status_id: int
ID of the item’s status.
- type_id: int
ID of the item’s type.
- workflow: MountWorkflow | UnMountWorkflow | None
If set, creates a mount/unmount event. Should be specified, if the
parent_idis changed.
- class o2a_registry.models.CreateMission(*, name: Annotated[str, MinLen(min_length=1)], description: Annotated[str | None, MinLen(min_length=1)] = None, start_date: datetime, end_date: datetime)
Mission class to create a new contact in the registry.
- description: str | None
Description.
- end_date: datetime
Datetime when the mission ends.
- name: str
Mission name.
- start_date: datetime
Datetime when the mission starts.
- class o2a_registry.models.CreateMissionItem(*, item_id: Annotated[int, Gt(gt=0)])
Class for assigning an item to a mission.
- item_id: int
Item ID.
- class o2a_registry.models.DecommissionWorkflow(*, decommission_label: Annotated[str, MinLen(min_length=1)], decommission_data: datetime, version: bool)
Class to automatically create a decommissioned event, when setting the status of the item to decomissioned with
o2a_registry.models.EditItemoro2a_registry.models.EditItem.- decommission_data: datetime
Datetime when the item was/is decommissioned.
- decommission_label: str
Label of the decommissioned event.
- version: bool
If a version should be automatically created for the item.
- class o2a_registry.models.EditContact(*, first_name: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=2)] = None, last_name: ~typing.Annotated[str | None, ~annotated_types.MinLen(min_length=2)] = None, email: ~pydantic.networks.EmailStr | None = None, orcid: ~typing.Annotated[~pydantic.networks.HttpUrl, ~pydantic.functional_validators.AfterValidator(func=<o2a_registry.validation.url_host_checker.UrlHostChecker object at 0x755b47ffb770>)] | None = None, telephone: str | None = None, postal_code: str | None = None, city: str | None = None, administrative_area: str | None = None, country: str | None = None, ror: ~typing.Annotated[~pydantic.networks.HttpUrl, ~pydantic.functional_validators.AfterValidator(func=<o2a_registry.validation.url_host_checker.UrlHostChecker object at 0x755b47e00260>)] | None = None)
Contact class for editing a contact in the registry.
- administrative_area: str | None
Administrative area name.
- city: str | None
City name.
- country: str | None
Country name.
- email: EmailStr | None
Contact email.
- first_name: str | None
Contacts first name. Must be at least two characters long.
- last_name: str | None
Contacts last name. Must be at least two characters long.
- orcid: UrlHostChecker object at 0x755b47ffb770>)] | None
Open Researcher and Contributor ID URL string (https://orcid.org/).
- postal_code: str | None
Postal code.
- ror: UrlHostChecker object at 0x755b47e00260>)] | None
Research Organization Registry URL string (https://ror.org/).
- telephone: str | None
Telephone number.
- class o2a_registry.models.EditEvent(*, start_date: datetime | None = None, end_date: datetime | None = None, longitude: Annotated[float | None, Gt(gt=-180), Lt(lt=180)] = None, latitude: Annotated[float | None, Gt(gt=-90), Lt(lt=90)] = None, elevation: float | None = None, label: Annotated[str | None, MinLen(min_length=1)] = None, description: Annotated[str | None, MinLen(min_length=1)] = None, type_id: Annotated[int | None, Gt(gt=0)] = None)
Event class for editing an event in the registry.
- description: str | None
Description
- elevation: float | None
Elevation above the sea-surface of the events location in meter. For locations below the sea-surface, the elevation should be negative.
- end_date: datetime | None
Datetime when the event stops.
- label: str | None
Label for the event. Should be unique for an item.
- latitude: float | None
Latitude of the events location in degrees. Should be between -90° and 90°.
- longitude: float | None
Longitude of the events location in degrees. Should be between -180° and 180°.
- start_date: datetime | None
Datetime when the event starts.
- type_id: int | None
Event-Type
- class o2a_registry.models.EditItem(*, short_name: str | None = None, long_name: str | None = None, description: str | None = None, model: str | None = None, manufacturer: str | None = None, serial_number: str | None = None, operation_instructions: str | None = None, inventory_number: str | None = None, citation: str | None = None, parent_id: int = 0, status_id: Annotated[int | None, Gt(gt=0)] = None, type_id: Annotated[int | None, Gt(gt=0)] = None, workflow: Workflow | None = None)
Item class to edit an item in the registry.
- citation: str | None
handle.net handle (not a URL itself).
- description: str | None
Description.
- inventory_number: str | None
Inventory number.
- long_name: str | None
Long name of the item.
- manufacturer: str | None
Item manufacturer name.
- model: str | None
Item model name.
- operation_instructions: str | None
Instructions how to operate the item.
- parent_id: int
ID of the item on which the item is mounted. Is zero, if the item is not mounted.
- serial_number: str | None
Item serial number.
- short_name: str | None
Short name of the item. Should be unique.
- status_id: int | None
ID of the item’s status.
- type_id: int | None
ID of the item’s type.
- class o2a_registry.models.EditMission(*, name: Annotated[str | None, MinLen(min_length=1)] = None, description: Annotated[str | None, MinLen(min_length=1)] = None, start_date: datetime | None = None, end_date: datetime | None = None)
Mission class to edit an item in the registry.
- description: str | None
Description.
- end_date: datetime | None
Datetime when the mission ends.
- name: str | None
Mission name.
- start_date: datetime | None
Datetime when the mission starts.
- class o2a_registry.models.Event(*, uuid: UUID, id: int, startDate: datetime, endDate: datetime, latitude: float | None = None, longitude: float | None = None, elevation: float | None = None, label: str, description: str | None = None, type: Vocable)
Event class returned from the registry API
- description: str | None
Description
- elevation: float | None
Elevation above/below the sea-surface of the events location in meter.
- end_date: datetime
Datetime when the event stops.
- id: int
Event ID.
- label: str
Label for the event. Should be unique for an item.
- latitude: float | None
Latitude of the events location in degrees. Should be between -90° and 90°.
- longitude: float | None
Longitude of the events location in degrees. Should be between -180° and 180°.
- start_date: datetime
Datetime when the event starts.
- uuid: UUID
Event unique identifier.
- class o2a_registry.models.Item(*, uuid: UUID, id: int, created: datetime | None = None, lastModified: datetime, code: str, shortName: str, longName: str, citation: str | None = None, status: ItemState, type: Vocable, description: str | None = None, model: str | None = None, manufacturer: str | None = None, serialNumber: str | None = None, operationInstructions: str | None = None, inventoryNumber: str | None = None, parentId: int = 0)
Item class returned from the registry API
- citation: str | None
handle.net handle (not a URL itself).
- code: str
Identifier code of the item. Follows the template “type.system_name:short_name”.
- created: datetime | None
Datetime when the item was created in the registry.
- description: str | None
Description.
- id: int
Item ID.
- inventory_number: str | None
Inventory number.
- last_modified: datetime
Datetime when the item was last modified in the registry.
- long_name: str
Long name of the item.
- manufacturer: str | None
Item manufacturer name.
- model: str | None
Item model name.
- operation_instructions: str | None
Instructions how to operate the item.
- parent_id: int
ID of the item on which the item is mounted. Is zero, if the item is not mounted.
- serial_number: str | None
Item serial number.
- short_name: str
Short name of the item. Should be unique.
- uuid: UUID
Item unique identifier.
- class o2a_registry.models.ItemContact(*, uuid: UUID, id: int, contact: Contact, role: Vocable)
Relationship between a contact and an item in the registry.
- id: int
ID of the relationship.
- uuid: UUID
Unique identifier for the relationship.
- class o2a_registry.models.ItemReference(*, uuid: UUID, id: int, itemId: int, created: datetime | None = None, lastModified: datetime)
Reference to an item in the registry.
- created: datetime | None
Datetime when the reference was created.
- id: int
ID of the reference.
- item_id: int
Item ID.
- last_modified: datetime
Datetime when the reference was last modified.
- uuid: UUID
Unique identifier for the reference.
- class o2a_registry.models.ItemState(*, uuid: UUID, id: int, lastModified: datetime, name: str, meta: str)
State of an item returned by the registry API.
- id: int
ID of the state.
- last_modified: datetime
Datetime when the state was last modified.
- meta: str
Description of the state.
- name: str
Name of the state.
- uuid: UUID
Unique identifier of the state.
- class o2a_registry.models.Mission(*, uuid: UUID, id: int, created: datetime, lastModified: datetime, name: str, description: str | None = None, startDate: datetime, endDate: datetime)
Mission class returned from the registry API
- created: datetime
Datetime when the mission was created.
- description: str | None
Description.
- end_date: datetime
Datetime when the mission ends.
- id: int
Mission ID.
- last_modified: datetime
Datetime when the mission was last modified.
- name: str
Mission name.
- start_date: datetime
Datetime when the mission starts.
- uuid: UUID
Mission unique identifier.
- class o2a_registry.models.MissionContact(*, uuid: UUID, id: int, created: datetime, lastModified: datetime, contact: Contact, role: Vocable)
Relationship between a contact and a mission in the registry.
- created: datetime
Datetime when the relationship was created.
- id: int
ID of the relationship.
- last_modified: datetime
Datetime when the relationship was last edited.
- uuid: UUID
Unique identifier for the relationship.
- class o2a_registry.models.MountWorkflow(*, mount_label: Annotated[str, MinLen(min_length=1)], mount_date: datetime, version: bool = False)
Class to automatically create a mount event, when editing or creating an item with
o2a_registry.models.EditItemoro2a_registry.models.EditItem.- mount_date: datetime
Datetime when the item was/is mounted.
- mount_label: str
Label of the mount event.
- version: bool
If a version should be automatically created for the item.
- class o2a_registry.models.Parameter(*, uuid: UUID, created: datetime | None = None, lastModified: datetime | None = None, id: int, name: str, shortName: str, unit: Unit, type: Vocable, comment: str | None = None, pangaeaParameterId: int | None = None, properties: list[Property])
Parameter class returned from the registry API
- comment: str | None
- created: datetime | None
When the parameter was created
- id: int
Parameter id
- last_modified: datetime | None
When the parameter was last modified
- name: str
Parameter name
- pangaea_parameter_id: int | None
- short_name: str
- uuid: UUID
Parameter unique identifier.
- class o2a_registry.models.Property(*, uuid: UUID, created: datetime | None = None, lastModified: datetime | None = None, id: int, name: str, lowerBound: int, upperBound: int, unit: Unit, type: Vocable)
Property class returned from the registry API
- created: datetime | None
When the property was created
- id: int
- last_modified: datetime | None
When the property was last modified
- lower_bound: int
- name: str
- upper_bound: int
- uuid: UUID
Property unique identifier.
- class o2a_registry.models.TemporalCoverage(*, lower: datetime, upper: datetime)
Temporal coverage of a version.
- lower: datetime
Lower bound of the coverage
- upper: datetime
Upper bound of the coverage
- class o2a_registry.models.UnMountWorkflow(*, unmount_label: Annotated[str, MinLen(min_length=1)], unmount_date: datetime, version: bool = False)
Class to automatically create a mount event, when editing or creating an item with
o2a_registry.models.EditItemoro2a_registry.models.EditItem.- unmount_date: datetime
Datetime when the item was/is mounted.
- unmount_label: str
Label of the mount event.
- version: bool
If a version should be automatically created for the item.
- class o2a_registry.models.Unit(*, uuid: UUID, id: int, created: datetime | None = None, lastModified: datetime | None = None, code: str | None = None, name: str | None = None, typicalUse: str | None = None, ucum: str | None = None, mathML: str | None = None, visible: bool)
Unit class returned from the registry API
- code: str | None
Unit code
- created: datetime | None
When the unit was created
- id: int
Unit id
- last_modified: datetime | None
When the unit was last modified
- mathML: str | None
MathML symbol (https://de.wikipedia.org/wiki/Mathematical_Markup_Language)
- name: str | None
Unit name
- typicalUse: str | None
Typical use of the unit
- ucum: str | None
Unified Code for Units of Measure
- uuid: UUID
Unit unique identifier.
- visible: bool
If visible in UI
- class o2a_registry.models.Version(*, version: int, eventTimestamp: datetime | None = None, versionCreationTimestamp: datetime, citation: str, temporalCoverage: TemporalCoverage)
Version class returned from the registry API
- citation: str
Citation referring to the item version
- event_timestamp: datetime | None
Event Timestamp
- temporal_coverage: TemporalCoverage
Temporal coverage of the version. This is either set to the “validity date” given when creating the version, or to the version creation timestamp. If the lower and upper bound of the coverage are the same, the version is valid from the given date until the next version.
- version: int
Version number
- version_creation_timestamp: datetime
Datetime when the version was created
- class o2a_registry.models.Vocable(*, uuid: UUID, id: int, lastModified: datetime, generalName: str, systemName: str, description: str | None = None, vocabulary: str | None = None, vocableValue: str, vocableGroup: VocableGroup, depricated: bool = False)
Vocable returned by the registry API.
- depricated: bool
If the vocable is depricated
- description: str | None
Description of the vocable.
- general_name: str
General name of the vocable.
- id: int
Vocable ID.
- last_modified: datetime
Datetime when the vocable was last modified.
- system_name: str
System name of the vocable.
- uuid: UUID
Unique identifier of the vocable.
- vocable_group: VocableGroup
The vocable group to which the vocable belongs.
- vocable_value: str
Vocable concept definition.
- vocabulary: str | None
Vocabulary/Party which defined the vocable.
- class o2a_registry.models.VocableGroup(*, uuid: UUID, id: int, name: str, systemName: str)
Vocable group returned by the registry API.
- id: int
Vocable group ID.
- name: str
Vocable group name.
- system_name: str
Vocable group system name.
- uuid: UUID
Unique identifier of the vocable.
- class o2a_registry.models.Workflow(*, parent: MountWorkflow | UnMountWorkflow | None = None, decommission: DecommissionWorkflow | None = None)
- decommission: DecommissionWorkflow | None
- parent: MountWorkflow | UnMountWorkflow | None