api: suggestions

app.config.definition.services[0].internal_port is of type int
app.config.definition.services[0]ports[0].port is of type string

How about using int all the way?

To create an app, I have to supply a name, ok.
Then I get back an id of type ID and a name of type String, both are the same.
Now that I want to update/configure apps, I have to use the appId again, which is of type ID.

To get the deployment status, it’s app(name: String!) again.
There’s also internal id, but this is always 0.

Maybe you could decide on one single way of doing things to make the API a bit easier to use?
ports always int OR String but not both
app access always by ID OR name but not a mixture

Thanks! =)

1 Like

You’re suggestions are on spot on. Our API, config, even flyctl started as prototypes that evolved into production. Each time we learned something new and changed our minds is another inconsistency. :slight_smile:

At some point I’d like to go back and clean those up along with adding docs for the API/config. The API is getting a lot more use lately, so maybe over the next few months we’ll make some time.