system.kanoa.lot.getRoutes
Description
Returns route records filtered by the provided parameters.Syntax
getRoutes(paramsDict)Parameters:
– paramsDict (dictionary): Dictionary of filters for the query.
Returns:
– routeData (pyDataset): Result set of routes matching the filters.
Dictionary
Parameter | Type | Required | Notes |
---|---|---|---|
routeId | int | No | Filter by route ID |
routeName | string | No | Filter by route name (supports LIKE search) |
itemId | int | No | Filter by item ID associated with the route |
itemPath | string | No | Filter by item path (supports LIKE search) |
itemClassId | int | No | Filter by item class ID |
itemClassPath | string | No | Filter by item class path (supports LIKE search) |
enabled | bool | No | Filter by enabled state |
Code Examples
# Get all enabled routes
paramsDict = {"enabled": True}
routeData = system.kanoa.lot.getRoutes(paramsDict=paramsDict)
# Get routes by item ID
paramsDict = {"itemId": 1205}
routeData = system.kanoa.lot.getRoutes(paramsDict=paramsDict)
# Get routes by route name (LIKE search)
paramsDict = {"routeName": "%Assembly%"}
routeData = system.kanoa.lot.getRoutes(paramsDict=paramsDict)
# Get routes by item class path
paramsDict = {"itemClassPath": "%/Products/Widgets/%"}
routeData = system.kanoa.lot.getRoutes(paramsDict=paramsDict)
# Get a specific route by ID
paramsDict = {"routeId": 9}
routeData = system.kanoa.lot.getRoutes(paramsDict=paramsDict)