Skip to content

Latest commit

 

History

History
149 lines (84 loc) · 6.38 KB

File metadata and controls

149 lines (84 loc) · 6.38 KB

UnitClassApi

Method HTTP request Description
getByPath 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.
getCanonicalUnit GET /unitclasses/{webId}/canonicalunit Get the canonical unit of a unit class.
getUnits GET /unitclasses/{webId}/units Get a list of all units belonging to the unit class.
createUnit POST /unitclasses/{webId}/units Create a unit in the specified Unit Class.

getByPath

getByPath(String path, String selectedFields, String webIdType)

Retrieve a unit class by path.

Parameters

Name Type Description Notes
path String The path to the unit class.. [required]
selectedFields String 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]
webIdType String 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

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

get

get(String webId, String selectedFields, String webIdType)

Retrieve a unit class.

Parameters

Name Type Description Notes
webId String The ID of the unit class.. [required]
selectedFields String 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]
webIdType String 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

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

update

update(String webId, PIUnitClass unitClassDTO)

Update a unit class.

Parameters

Name Type Description Notes
webId String The ID of the unit class.. [required]
unitClassDTO PIUnitClass A partial unit class containing the desired changes.. [required]

Return type

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

delete

delete(String webId)

Delete a unit class.

Parameters

Name Type Description Notes
webId String The ID of the unit class.. [required]

Return type

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

getCanonicalUnit

getCanonicalUnit(String webId, String selectedFields, String webIdType)

Get the canonical unit of a unit class.

Parameters

Name Type Description Notes
webId String The ID of unit class.. [required]
selectedFields String 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]
webIdType String 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

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

getUnits

getUnits(String webId, String selectedFields, String webIdType)

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

Parameters

Name Type Description Notes
webId String The ID of unit class.. [required]
selectedFields String 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]
webIdType String 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

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

createUnit

createUnit(String webId, PIUnit unitDTO, String webIdType)

Create a unit in the specified Unit Class.

Parameters

Name Type Description Notes
webId String The ID of the server.. [required]
unitDTO PIUnit The new unit definition.. [required]
webIdType String 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

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