Last active
August 29, 2015 14:18
-
-
Save jkremser/119ac1ad8181abbd4ec1 to your computer and use it in GitHub Desktop.
inventory REST api
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
# this is no longer valid because of the AuthN | |
create tenant | |
curl -ivX POST -H "Content-Type: application/json" -d '{"id": "acme"}' http://127.0.0.1:8080/hawkular/inventory/tenants | |
create environment | |
curl -ivX POST -H "Content-Type: application/json" -d '{"id": "prod"}' http://127.0.0.1:8080/hawkular/inventory/acme/environments | |
create resource type | |
curl -ivX POST -H "Content-Type: application/json" -d '{"id": "URL", "version": "1.0"}' http://127.0.0.1:8080/hawkular/inventory/acme/resourceTypes | |
create resource | |
curl -ivX POST -H "Content-Type: application/json" -d '{"id": "res-URL", "resourceTypeId": "URL"}' http://127.0.0.1:8080/hawkular/inventory/acme/prod/resources | |
create metric type | |
curl -ivX POST -H "Content-Type: application/json" -d '{"id":"MetricType", "unit":"BYTE"}' http://127.0.0.1:8080/hawkular/inventory/acme/metricTypes | |
create metric | |
curl -ivX POST -H "Content-Type: application/json" -d '{"id": "fooMetric", "metricTypeId": "MetricType"}' http://127.0.0.1:8080/hawkular/inventory/acme/prod/metrics | |
assign metric to a resource | |
curl -iX POST -H "Content-Type: application/json" -d '["fooMetric"]' http://127.0.0.1:8080/hawkular/inventory/acme/prod/resources/res-URL/metrics |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment