ODataPath
from skipcheck_tm1 import ODataPathA resource path relative to the service root, built from segments and encoded as it's built:
element = ODataPath.of("Dimensions").key("Region").nav("Hierarchies").key("Region").nav("Elements").key("O'Neil")
# Dimensions('Region')/Hierarchies('Region')/Elements('O''Neil')
reserve = ODataPath.of("Cubes").key("Sales").action("tm1.Reserve")
# Cubes('Sales')/tm1.Reserve
Names (entity sets, navigation properties, operations, type casts) must be OData identifiers, optionally qualified; they're checked, never encoded. Key values can be any text: they're written as string literals and percent-encoded. Paths are immutable.
Members
segments | |
of static | A path starting at an entity set, singleton or operation import, such as Cubes. |
metadata static | The service's metadata document, $metadata. |
batch static | The service's batch endpoint, $batch. |
link static | A path TM1 sent (an @odata.id or a Location), re-encoded segment by segment. |
function_import static | A function import called from the service root, such as ModelCubes() or TailMessageLog(Top=10). |
key | Cubes → Cubes('Sales'); a mapping makes a compound key (A='x',B='y'). |
nav | Adds a navigation property or structural property segment, such as Views. |
cast | Adds a type-cast segment, such as tm1.NativeView. |
action | Adds a bound action segment, such as tm1.Reserve. |
function | Adds a bound function call with literal parameters, such as tm1.GetPartition(Begin=0,End=99). |
value | Adds $value. |
count | Adds $count. |
ref | Adds $ref. |
segments
segments: tuple[str, ...]of
staticof(name: str) -> ODataPathA path starting at an entity set, singleton or operation import, such as Cubes. name must be an OData identifier.
metadata
staticmetadata() -> ODataPathThe service's metadata document, $metadata: its CSDL XML. A path of its own, since $metadata isn't an identifier of accepts.
batch
staticbatch() -> ODataPathThe service's batch endpoint, $batch: a path of its own, as for metadata.
link
staticlink(link: str) -> ODataPathA path TM1 sent (an @odata.id or a Location), re-encoded segment by segment.
function_import
staticfunction_import(name: str, parameters: Mapping[str, Any] | None = None) -> ODataPathA function import called from the service root, such as ModelCubes() or TailMessageLog(Top=10). name is unqualified; the parameters are written in order, as for function.
key
key(value: Any) -> ODataPathCubes → Cubes('Sales'); a mapping makes a compound key (A='x',B='y').
cast
cast(qualified_type: str) -> ODataPathAdds a type-cast segment, such as tm1.NativeView: the namespace-qualified type name. Returns a new path.
action
action(qualified_name: str) -> ODataPathAdds a bound action segment, such as tm1.Reserve. Actions are invoked with POST. Returns a new path.
function
function(qualified_name: str, parameters: Mapping[str, Any] | None = None) -> ODataPathAdds a bound function call with literal parameters, such as tm1.GetPartition(Begin=0,End=99). Use parameter aliases (ODataQuery.alias) for complex or collection parameters. Returns a new path.
value
value() -> ODataPathAdds $value: a property's or media entity's raw value. Returns a new path.
count
count() -> ODataPathAdds $count: the number of items in a collection, as plain text. Returns a new path.
ref
ref() -> ODataPathAdds $ref: references to entities rather than the entities themselves. Returns a new path.