Skip to content
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

Get created server id #52

Closed
Teunwrmzijnallenamenalingebruik opened this issue Jul 12, 2022 · 1 comment
Closed

Get created server id #52

Teunwrmzijnallenamenalingebruik opened this issue Jul 12, 2022 · 1 comment

Comments

@Teunwrmzijnallenamenalingebruik

Describe the bug
I would like to a function where if the code is: result = api.servers.create_server(info) that the id of the just created server would be set.

@iamkubi
Copy link
Owner

iamkubi commented Sep 12, 2022

You can already do this.

>>> resp = app_api.servers.create_server(name='My test Paper Server', user_id=1, 
                                         nest_id=1,egg_id=3,memory_limit=1000,
                                         swap_limit=0,backup_limit=0,
                                         disk_limit=0,location_ids=[1])
>>> resp.json()['attributes']['identifier']
'9d074573'

@iamkubi iamkubi closed this as completed Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants