{"action":"opened","issue":{"url":"https://api.github.com/repos/surveil/surveil-meta/issues/128","labels_url":"https://api.github.com/repos/surveil/surveil-meta/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/surveil/surveil-meta/issues/128/comments","events_url":"https://api.github.com/repos/surveil/surveil-meta/issues/128/events","html_url":"https://github.com/surveil/surveil-meta/issues/128","id":102380173,"number":128,"title":"Retreive datamodels from Surveil API","user":{"login":"aviau","id":2706882,"avatar_url":"https://avatars.githubusercontent.com/u/2706882?v=3","gravatar_id":"","url":"https://api.github.com/users/aviau","html_url":"https://github.com/aviau","followers_url":"https://api.github.com/users/aviau/followers","following_url":"https://api.github.com/users/aviau/following{/other_user}","gists_url":"https://api.github.com/users/aviau/gists{/gist_id}","starred_url":"https://api.github.com/users/aviau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aviau/subscriptions","organizations_url":"https://api.github.com/users/aviau/orgs","repos_url":"https://api.github.com/users/aviau/repos","events_url":"https://api.github.com/users/aviau/events{/privacy}","received_events_url":"https://api.github.com/users/aviau/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/surveil/surveil-meta/labels/category/surveil-api","name":"category/surveil-api","color":"333366"},{"url":"https://api.github.com/repos/surveil/surveil-meta/labels/category/webui","name":"category/webui","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-21T13:31:45Z","updated_at":"2015-08-21T13:31:45Z","closed_at":null,"body":"In the Surveil API code. There is the concept of datamodel. The datamodel represents the language used by the API to describes various objects such as hosts and services. We would like to avoid hardcoding the datamodel for every objects in the Surveil WebUI. In order to do that, we should create API endpoints to retreive object datamodels in useful formats like [JSON Schema](http://json-schema.org). This should allows for easy creation of forms in the Surveil WebUI.\r\n\r\n - Create new enpoints that return JSON Schemas for all surveil objects. The Schemas should be generated from the datamodel classes.\r\n - Make use of the JSON Schemas in the Web UI to automatically generate forms."}}