-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] - Manipulating DNS Records without the RecordsIDs #70
Comments
Hey @axos88 We want to keep all of the available crude actions as their own CLI command. As for removing the recordIDs those are the unique identifiers for the API call. If we were to change to this we would then add more API calls to validate that a domain that was passed in exists to your user or even the |
I mean that's fine, sure, I understand wanting to keep a low-level interface which is basically just a facade in front of the API endpoints. But I don't think there is anything holding you back from adding new, more advanced operations. As a user I don't really care (nor should I) about how the API is laid out. I want a simple, and - best case scenario - efficient way to express and do what I want. And when you - as a user - think about DNS, you most certainly say |
So maybe instead of modifying the current operations the better course of action would be to add an "update++" operation :) |
Definitely the better approach would be to create a new command in the CLI 👍 I may not have time to get to making this enhancement anytime soon. So if you or anyone else wants to make this enhancement please feel free! |
Finding the record IDs is unnecessary complexity. The same arguments for create should be able to be used for update.
Describe the solution you'd like
Two solutions:
Create should have a flag for
--upsert
. If a record with that domain, name, and type alredy exists, overwrite the data and ttl fields. If there are multiple matches it should probably be an error (unless an --allow-multiple flag is set?)Update/delete should not require a recordID. Supplying --name --type should act as filters. If there is only one matching record, it should update/delete the data and ttl. If there are more same case as above
If the record is unique (e.g. zero or only one matching record):
Additional context
The API will feel more natural and easier to script.
The text was updated successfully, but these errors were encountered: