Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Inventory Resource configuration + validation
ResourceType
curl -ivX GET 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data?dataType=configurationSchema'
curl -ivX GET 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data?dataType=connectionConfigurationSchema'
curl -ivX POST -H 'Content-Type:application/json' -d '{"id": "fooType" }' http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes
curl -ivX POST -H "Content-Type:application/json" -d '{"role": "configurationSchema", "value": {"title": "Foo resource configuration schema", "type": "object"}}' 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data'
curl -ivX PUT -H "Content-Type:application/json" -d '{"value": {"title": "Foo resource configuration schema", "type": "object", "required": ["man"],"properties": {"man": {"type": "integer"}}}}' 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data?dataType=configurationSchema'
curl -ivX PUT -H "Content-Type:application/json" -d '{"value": {"title": "Foo resource configuration schema", "type": "object", "properties": {"man": {"type": "integer"}}}}' 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data?dataType=configurationSchema'
curl -ivX PUT -H "Content-Type:application/json" -d '{"value": {"title": "Foo resource configuration schema", "type": "object", "properties": {"man":{"type": "object"}}}}' 'http://jdoe:password@localhost:8080/hawkular/inventory/resourceTypes/fooType/data?dataType=configurationSchema'
Resource
curl -ivX GET 'http://jdoe:password@localhost:8080/hawkular/inventory/test/resources/foo/data?dataType=configuration'
curl -ivX GET 'http://jdoe:password@localhost:8080/hawkular/inventory/test/resources/foo/data?dataType=connectionConfiguration'
curl -ivX POST -H 'Content-Type:application/json' -d '{"id":"foo", "resourceTypePath": "/rt;fooType"}' http://jdoe:password@localhost:8080/hawkular/inventory/test/resources
curl -ivX POST -H "Content-Type:application/json" -d '{"role": "configuration", "value": {"any" : "2"}}' 'http://jdoe:password@localhost:8080/hawkular/inventory/test/resources/foo/data'
curl -ivX PUT -H "Content-Type:application/json" -d '{"value": {"other" : "str"}}' 'http://jdoe:password@localhost:8080/hawkular/inventory/test/resources/foo/data?dataType=configuration'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.