Skip to content

Latest commit

 

History

History
149 lines (91 loc) · 6.47 KB

UnitClassApi.md

File metadata and controls

149 lines (91 loc) · 6.47 KB

UnitClassApi

Method HTTP request Description
get_by_path GET /unitclasses Retrieve a unit class by path.
get GET /unitclasses/{webId} Retrieve a unit class.
update PATCH /unitclasses/{webId} Update a unit class.
delete DELETE /unitclasses/{webId} Delete a unit class.
get_canonical_unit GET /unitclasses/{webId}/canonicalunit Get the canonical unit of a unit class.
get_units GET /unitclasses/{webId}/units Get a list of all units belonging to the unit class.
create_unit POST /unitclasses/{webId}/units Create a unit in the specified Unit Class.

get_by_path

get_by_path('path', 'selected_fields', 'web_id_type')

Retrieve a unit class by path.

Parameters

Name Type Description Notes
path str The path to the unit class.. [required]
selected_fields str List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned.. [optional]
web_id_type str Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType".. [optional]

Return type

PIUnitClass

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]

get

get('web_id', 'selected_fields', 'web_id_type')

Retrieve a unit class.

Parameters

Name Type Description Notes
web_id str The ID of the unit class.. [required]
selected_fields str List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned.. [optional]
web_id_type str Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType".. [optional]

Return type

PIUnitClass

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]

update

update('web_id', 'unit_class_d_t_o')

Update a unit class.

Parameters

Name Type Description Notes
web_id str The ID of the unit class.. [required]
unit_class_d_t_o PIUnitClass A partial unit class containing the desired changes.. [required]

Return type

None

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]

delete

delete('web_id')

Delete a unit class.

Parameters

Name Type Description Notes
web_id str The ID of the unit class.. [required]

Return type

None

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]

get_canonical_unit

get_canonical_unit('web_id', 'selected_fields', 'web_id_type')

Get the canonical unit of a unit class.

Parameters

Name Type Description Notes
web_id str The ID of unit class.. [required]
selected_fields str List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned.. [optional]
web_id_type str Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType".. [optional]

Return type

PIUnit

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]

get_units

get_units('web_id', 'selected_fields', 'web_id_type')

Get a list of all units belonging to the unit class.

Parameters

Name Type Description Notes
web_id str The ID of unit class.. [required]
selected_fields str List of fields to be returned in the response, separated by semicolons (;). If this parameter is not specified, all available fields will be returned.. [optional]
web_id_type str Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType".. [optional]

Return type

PIUnit

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]

create_unit

create_unit('web_id', 'unit_d_t_o', 'web_id_type')

Create a unit in the specified Unit Class.

Parameters

Name Type Description Notes
web_id str The ID of the server.. [required]
unit_d_t_o PIUnit The new unit definition.. [required]
web_id_type str Optional parameter. Used to specify the type of WebID. Useful for URL brevity and other special cases. Default is the value of the configuration item "WebIDType".. [optional]

Return type

None

[Back to top] [Back to API list] [Back to Model list] [Back to DOCUMENTATION]