-
Notifications
You must be signed in to change notification settings - Fork 3
/
openapi.json
1 lines (1 loc) · 15.8 KB
/
openapi.json
1
{"definitions":{"RequestAgent":{"description":"An agent as a response body.","properties":{"description":{"type":"string"},"name":{"description":"The name of this agent.","type":"string"},"snmp_data_url":{"description":"The URL to the SNMP data f.e. \"file://./os/linux.dat\"","type":"string"}},"required":["name","snmp_data_url"],"type":"object"},"RequestDevice":{"description":"An agent as a response body.","properties":{"agent":{"description":"An agent as a response body.","properties":{"id":{"description":"The name of this agent.","format":"uuid","type":"string"}},"required":["id"],"type":"object"},"description":{"type":"string"},"name":{"description":"The name of this agent.","type":"string"},"snmp_host":{"type":"string"},"snmp_port":{"format":"int32","type":"integer"},"snmp_protocol_attributes":{"properties":{"snmp_v1":{"properties":{"community":{"type":"string"}},"type":"object"},"snmp_v2c":{"properties":{"community":{"type":"string"}},"type":"object"},"snmp_v3":{"properties":{"authentication":{"enum":["MD5","SHA"],"type":"string"},"authentication_password":{"type":"string"},"encryption":{"enum":["DES","AES"],"type":"string"},"encryption_key":{"type":"string"},"user":{"type":"string"}},"required":["authentication_password","encryption_key"],"type":"object"}},"type":"object"}},"required":["agent","name","snmp_host","snmp_port","snmp_protocol_attributes"],"type":"object"},"ResponseAgent":{"description":"An agent as a response body.","properties":{"description":{"description":"Agent's optional description.","type":"string"},"id":{"description":"The unique identifier of this agent.","format":"uuid","type":"string"},"name":{"description":"Agent's name.","type":"string"},"snmp_data_url":{"description":"The URL to the SNMP data f.e. \"file://./os/linux.dat\"","type":"string"}},"required":["id","name","snmp_data_url"],"type":"object"},"ResponseAgents":{"description":"List of agents and the number of all items as a response body.","properties":{"count":{"description":"The number of all items","format":"int64","type":"integer"},"items":{"description":"List of agents","items":{"description":"An agent as a response body.","properties":{"description":{"description":"Agent's optional description.","type":"string"},"id":{"description":"The unique identifier of this agent.","format":"uuid","type":"string"},"name":{"description":"Agent's name.","type":"string"},"snmp_data_url":{"description":"The URL to the SNMP data f.e. \"file://./os/linux.dat\"","type":"string"}},"required":["id","name","snmp_data_url"],"type":"object"},"type":"array"}},"required":["count","items"],"type":"object"},"ResponseDevice":{"description":"An managed device as a response body.","properties":{"agent":{"description":"An agent as a response body.","properties":{"description":{"description":"Agent's optional description.","type":"string"},"id":{"description":"The unique identifier of this agent.","format":"uuid","type":"string"},"name":{"description":"Agent's name.","type":"string"},"snmp_data_url":{"description":"The URL to the SNMP data f.e. \"file://./os/linux.dat\"","type":"string"}},"required":["id","name","snmp_data_url"],"type":"object"},"description":{"description":"Device's optional description.","type":"string"},"id":{"description":"The unique identifier of this managed device.","format":"uuid","type":"string"},"name":{"description":"Device's name.","type":"string"},"snmp_host":{"type":"string"},"snmp_port":{"format":"int32","type":"integer"},"snmp_protocol_attributes":{"properties":{"snmp_v1":{"properties":{"community":{"type":"string"}},"type":"object"},"snmp_v2c":{"properties":{"community":{"type":"string"}},"type":"object"},"snmp_v3":{"properties":{"authentication":{"enum":["MD5","SHA"],"type":"string"},"authentication_password":{"type":"string"},"encryption":{"enum":["DES","AES"],"type":"string"},"encryption_key":{"type":"string"},"user":{"type":"string"}},"required":["authentication_password","encryption_key"],"type":"object"}},"type":"object"}},"required":["agent","id","name","snmp_host","snmp_port","snmp_protocol_attributes"],"type":"object"},"ResponseDevices":{"description":"An managed device and the number of all items as a response body.","properties":{"count":{"description":"The number of all items","format":"int64","type":"integer"},"items":{"description":"The list of devices","items":{"description":"An managed device as a response body.","properties":{"agent":{"description":"An agent as a response body.","properties":{"description":{"description":"Agent's optional description.","type":"string"},"id":{"description":"The unique identifier of this agent.","format":"uuid","type":"string"},"name":{"description":"Agent's name.","type":"string"},"snmp_data_url":{"description":"The URL to the SNMP data f.e. \"file://./os/linux.dat\"","type":"string"}},"required":["id","name","snmp_data_url"],"type":"object"},"description":{"description":"Device's optional description.","type":"string"},"id":{"description":"The unique identifier of this managed device.","format":"uuid","type":"string"},"name":{"description":"Device's name.","type":"string"},"snmp_host":{"type":"string"},"snmp_port":{"format":"int32","type":"integer"},"snmp_protocol_attributes":{"properties":{"snmp_v1":{"properties":{"community":{"type":"string"}},"type":"object"},"snmp_v2c":{"properties":{"community":{"type":"string"}},"type":"object"},"snmp_v3":{"properties":{"authentication":{"enum":["MD5","SHA"],"type":"string"},"authentication_password":{"type":"string"},"encryption":{"enum":["DES","AES"],"type":"string"},"encryption_key":{"type":"string"},"user":{"type":"string"}},"required":["authentication_password","encryption_key"],"type":"object"}},"type":"object"}},"required":["agent","id","name","snmp_host","snmp_port","snmp_protocol_attributes"],"type":"object"},"type":"array"}},"required":["count","items"],"type":"object"}},"info":{"title":"","version":""},"paths":{"/agents":{"get":{"parameters":[{"description":"Page index starts from zero, default value is 1.","format":"int64","in":"query","name":"page","type":"integer"},{"description":"Number of results on a page, default value is 20.","format":"int64","in":"query","name":"page_size","type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseAgents"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"List agents","tags":["Agents"]},"post":{"consumes":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/RequestAgent"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseAgent"}},"201":{"description":"Created","schema":{"$ref":"#/definitions/ResponseAgent"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Create a new agent","tags":["Agents"]}},"/agents/{id}":{"delete":{"parameters":[{"format":"uuid","in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseAgent"}},"204":{"description":"No Content"},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Delete agent by ID","tags":["Agents"]},"get":{"parameters":[{"format":"uuid","in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseAgent"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Get agent by ID","tags":["Agents"]},"put":{"parameters":[{"format":"uuid","in":"path","name":"id","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/RequestAgent"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseAgent"}},"201":{"description":"Created","schema":{"$ref":"#/definitions/ResponseAgent"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Update agent","tags":["Agents"]}},"/devices":{"get":{"parameters":[{"description":"Page index starts from zero, default value is 1.","format":"int64","in":"query","name":"page","type":"integer"},{"description":"Number of results on a page, default value is 20.","format":"int64","in":"query","name":"page_size","type":"integer"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseDevices"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"List managed devices","tags":["Devices"]},"post":{"consumes":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/RequestDevice"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseDevice"}},"201":{"description":"Created","schema":{"$ref":"#/definitions/ResponseDevice"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Create a new managed device","tags":["Devices"]}},"/devices/{id}":{"delete":{"parameters":[{"format":"uuid","in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseDevice"}},"204":{"description":"No Content"},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Delete managed device by ID","tags":["Devices"]},"get":{"parameters":[{"format":"uuid","in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseDevice"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Get managed device by ID","tags":["Devices"]},"put":{"parameters":[{"format":"uuid","in":"path","name":"id","required":true,"type":"string"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/RequestDevice"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ResponseDevice"}},"201":{"description":"Created","schema":{"$ref":"#/definitions/ResponseDevice"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Update managed device","tags":["Devices"]}},"/devices/{id}/start":{"put":{"parameters":[{"format":"uuid","in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"boolean"}},"201":{"description":"Created","schema":{"type":"boolean"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Start an existing managed device","tags":["Devices"]}},"/devices/{id}/stop":{"put":{"parameters":[{"format":"uuid","in":"path","name":"id","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"boolean"}},"201":{"description":"Created","schema":{"type":"boolean"}},"400":{"description":"Bad request format","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"404":{"description":"Not Found","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"409":{"description":"Conflict","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}},"500":{"description":"Internal server error","schema":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"}}},"summary":"Stop an existing managed device","tags":["Devices"]}}},"swagger":"2.0"}