This message was deleted.
# help
b
This message was deleted.
1
w
@adorable-zoo-31914 that API is available, I wonder if you have one of the legacy API keys - does your API key start with
ico-
? if not, it’s a legacy API key and you should get a new one from dashboard.infracost.io
a
@white-airport-8778 Thanks for the answer. My api key starts with an ICO. I'm in the same environment as the example, and my biggest question is that the CLI works, but the API doesn't. Is there anything else I need to consider when using the API?
w
@adorable-zoo-31914 nope, that’s all that’s needed, I’ll DM you to screenshare when you can as that’s probably the fastest way to debug 🙂 We have other people using that API. Also, just checking you’re replacing “my-api-key” with your own API key in that curl command, right? so you’re running
Copy code
curl -X POST -H "x-api-key: ico-...." \
     -F "path=@plan.json" \
     <https://pricing.api.infracost.io/breakdown>
a
@white-airport-8778 I ran it using your message and it worked, thank you very much. I analyzed the cause and it seems that there was a problem with the single quotes in the command shared via notion. I'm using infracost for the first time today and I think I can use it well thanks to you. Thanks:)
w
Awesome - good luck 🚀
a
@white-airport-8778 Is it possible to use the .tf file as an API, or is it only the planned results that can be used as an API?
w
The API currently only supports TF Plan JSON file
1