-
Given a device ID, I want to find the PDU and power outlet its power port is connected to. It seems like REST API would require several calls to get this, so I'm trying to do it using a single GraphQL call. Is this possible? Below is the closest thing I found: {
device_list(id: "69") {
name
description
powerports {
cable {
id
terminations {
id
cable_end
}
a_terminations {
__typename
}
}
cable_end
}
}
} And the result: {
"data": {
"device_list": [
{
"name": "DSP002",
"description": "CP850 (proj)",
"powerports": [
{
"cable": {
"id": "36",
"terminations": [
{
"id": "72",
"cable_end": "A"
},
{
"id": "73",
"cable_end": "B"
}
],
"a_terminations": [
{
"__typename": "PowerOutletType"
}
]
},
"cable_end": "B"
}
]
}
]
}
} I'm not sure how to get more detail from the |
Beta Was this translation helpful? Give feedback.
Answered by
llamafilm
Sep 7, 2025
Replies: 1 comment
-
This can be done using inline fragment for {
device_list(filters:{id: "69"}) {
powerports {
connected_endpoints{
... on PowerOutletType{
display
device{description}
name
}
}
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
llamafilm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can be done using inline fragment for
connected_endpoints