Forum Discussion

API_User's avatar
API_User
Level 9
2 years ago

API Questions/Clarifications

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}&levelType=CIRCUIT&levelValue=${LEVELVALUE}" 

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.

2 Replies

  • 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.