Last active
August 29, 2015 14:20
-
-
Save alikhajeh1/7ce977f6dfb7b482e6cc to your computer and use it in GitHub Desktop.
CA API example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See the API docs at http://reference.rightscale.com/cloud_analytics/analytics_api/index.html for login details | |
# Getting a list of available Filters. These filters can be used to create Scheduled Reports, Budget Alerts etc. | |
curl -G https://analytics.rightscale.com/api/instances/actions/filter_options \ | |
-H X-Api-Version:1.0 \ | |
-H Content-Type:application/json \ | |
-b rightscalecookies \ | |
-d start_time=2015-04-01 \ | |
-d end_time=2015-05-06 \ | |
-d filter_types[]=instance:account_id \ | |
-d filter_types[]=instance:provisioned_by_user_id | |
# See http://reference.rightscale.com/cloud_analytics/analytics_api/index.html#/1.0/controller/V1-Controllers-Instances/filter_options for more details about the filter_options API call. | |
# The above API call will return the available account_id and provisioned_by_user_id filters, which can then be used to create Scheduled Reports: | |
curl https://analytics.rightscale.com/api/scheduled_reports \ | |
-H X-Api-Version:1.0 \ | |
-H Content-Type:application/json \ | |
-b rightscalecookies \ | |
-d '{"frequency":"monthly","additional_emails":["[email protected]"],"filters":[{"type":"instance:account_id","value":"123","label":"My Account 123"}],"name":"Report Title","attach_csv":true}' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment