- Flexera Community
- :
- Cloud Management Platform
- :
- Cloud Management Platform Forum
- :
- Re: Rightscale API call to get instance nickname
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a list of systems in GCP that I want to run a rightscipt against. I am using rsc to loop through that list.
The script takes the server name and does a lookup of the instance id to make api calls against it.
If the host is in a Server Array it fails to return a value.
I can get a list of all Server Arrays and the instances that are part of that array but I cannot get the name of the server.
Is there a way to use the API to get the "Nickname" value of the instance?
Thanks!
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The Instances index call should include the name field in all of its views. You can use it with a ServerArray ID like this:
rsc cm15 index /api/server_arrays/<id>/current_instances view=tiny
If you need other details besides just the name and the few other fields available in the tiny view, you can use one of the other views mentioned in the docs.
This thread has been automatically locked due to inactivity.
To continue the discussion, please start a new thread.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @TeddyRick ,
Are you able to share the rsc actions and/or API calls you are making today?
Thanks,
Sean
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The Instances index call should include the name field in all of its views. You can use it with a ServerArray ID like this:
rsc cm15 index /api/server_arrays/<id>/current_instances view=tiny
If you need other details besides just the name and the few other fields available in the tiny view, you can use one of the other views mentioned in the docs.
