Hi, I’ve use the openapi-generator to turn the openapi spec into a rust fly.io sdk. For the most part it’s working. However I’m running into an issue where the secrets create endpoint is giving me an error due to the value that i’m passing for secret_type path parameter. Specifically I’m trying to utilize the Secret Create API Endpoint.
Hi @kennetpostigo, not a current employee, but I think perhaps the secrets endpoint in the Machines API hasn’t been intentionally launched yet. Maybe @Tim_Newsham can confirm or deny.
The docs you’re looking at are generated from source code. There are hand-built docs for the Machines API, which will necessarily lag but are more human oriented and task targeted.
These currently give flyctl (fly secrets set) as the way to set secrets — there’s also the GraphQL API, which AFAIK will eventually be phased out, and isn’t officially supported for external use. Folks are aware that many customers do use it, so I’d expect the phase-out to be gentle-ish.
If you want to trace how flyctl uses Fly.io APIs in “production”, you can dig around in the flyctl source and the Go API client that was separated out from it a while back. Here’s the CreateSecret function in the flaps (Machines API) client if you’re interested. I didn’t root around far enough to see if flyctl is using flaps now or is still using GraphQL.