9. Path Service
Access via client.path(). You can retrieve the hierarchical path (Site > Area > Line > Equipment) of an asset or tag with a single call.
9.1 Method List
| Method | Return Type | HTTP | Endpoint |
|---|---|---|---|
getByAsset(asset_id) | PathResponseV5 or null | GET | /api/v5/path/asset/{id} |
getByTag(tag_id) | PathResponseV5 or null | GET | /api/v5/path/tag/{id} |
9.2 PathResponseV5 DTO
| Field | Description |
|---|---|
site_id / site_name | Affiliated Site |
area_id / area_name | Area |
line_id / line_name | Line |
equipment_id / equipment_name | Equipment |
The response starts from the site — since there is only one corporation per installation, it is not included in the path.
Depending on the asset type, some fields may be
null(e.g., for an asset that only has an Area,line_*andequipment_*are bothnull).
9.3 Usage Examples
Full Path of Equipment
import plantpulse.api.v5.dto.response.PathResponseV5;
PathResponseV5 path = client.path().getByAsset("EQUIPMENT_000001");
if (path != null) {
System.out.printf("%s > %s > %s > %s%n",
path.getSite_name(),
path.getArea_name(),
path.getLine_name(),
path.getEquipment_name());
}
Output Example:
대전 1공장 > 조립구역 > 1라인 > CNC #1
Asset Path of a Tag
PathResponseV5 tagPath = client.path().getByTag("TAG_EDGE_00303_90007");
if (tagPath != null) {
System.out.println("태그가 부착된 설비: " + tagPath.getEquipment_name());
System.out.println("라인: " + tagPath.getLine_name());
}
Utility for Creating Path Strings
static String formatPath(PathResponseV5 p) {
if (p == null) return "(경로 없음)";
StringBuilder sb = new StringBuilder();
if (p.getSite_name() != null) sb.append(p.getSite_name());
if (p.getArea_name() != null) sb.append(" > ").append(p.getArea_name());
if (p.getLine_name() != null) sb.append(" > ").append(p.getLine_name());
if (p.getEquipment_name() != null) sb.append(" > ").append(p.getEquipment_name());
return sb.toString();
}
9.4 Application Scenarios
Scenario — Displaying the Path of an Asset Triggering an Alarm
import plantpulse.api.v5.dto.response.AlarmResponseV5;
for (AlarmResponseV5 a : client.alarm().list(20)) {
// AlarmResponseV5 에 tag_location 필드가 이미 있지만
// 더 구조화된 경로가 필요하면 Path 서비스로 재조회
if (a.getTag_id() != null) {
PathResponseV5 path = client.path().getByTag(a.getTag_id());
System.out.printf("[%s] %s @ %s%n",
a.getPriority(),
a.getDescription(),
formatPath(path));
}
}
Next Steps
- Asset Service — Direct manipulation of asset hierarchies
- Alarm Service — Tracking assets triggering alarms