Announcements

Help us improve the Equinix Community by completing a quick survey

Discussions

API Questions/Clarifications

API Questions/Clarifications

API_User
Level 9

Hello everyone,
I'm working with Yahoo on a project that involves monitoring power data for a large number of PDUs—more than 1000—every hour. We've hit a snag, though. The API we're using has a daily limit of 1000 calls.
Here's the current API we're using:

curl -s -X GET "https://api.equinix.com/power/v1/current?accountNo=${EQUINIX_ACCOUNT_NUMBER}&ibx=${EQUINIX_IBX}&leve...}" 

I've tried adding multiple values to "levelValue," but it's not working as expected.
The challenge is that we have to check so many PDUs every hour that making a single call per PDU isn't practical. If we go that route, we'll hit the API limit in just one hour.
I found an alternative approach on the forum:

 

curl -s -X POST "https://api.equinix.com/power/v1/current" -H "content-type: application/json" -H "Authorization: Bearer ${1}" -d '{ "accountNo": "'${2}'", "ibx": "'${3}'", "levelType": "circuit" }' 

This method provides data for all PDUs in a single response. However, the "levelValue" returned varies:

  • In the original API call: "levelValue": "DB3:280355"
  • In the alternative API call: "levelValue": "DB3:DT-340276"

While "DB3:280355" aligns with our PDU naming scheme and is visible in reports, "DB3:DT-340276" doesn't show up in any reports, including SmartViews generated reports.

I'd appreciate your insights and suggestions. If you've faced similar challenges or have recommendations, please share.

Replies 2 2

API_User
Level 9
Hi,
It looks like DB3:DT-340276 and DB3:280355 are 2 different circuits.
DB3:DT-340276 is serving the cabinet DB3:02:Z6S750:0722 inside cage DB3:02:Z6S750.
DB3:280355 is a circuit which is serving the cabinet DB3:01:Z3S190:1901 inside cage DB3:01:Z3S190.
Please let us know if you have any questions.

API_User
Level 9
Both circuits belong to Yahoo so both of them should be included in the response to your second API call. That is a correct APIs behavior.
DB3:DT-340276 should show up on the Smartview report if you run it for cage DB3:02:Z6S750
You can also take a look at the hierarchy endpoint that will provide you with the list of available power assets.
https://developer.equinix.com/catalog/hierarchyv1#operation/getPowerHierarchy