{"swagger":"2.0","info":{"version":"1.0.0","title":"Alerts Service","description":"API service for managing Alerts."},"consumes":["application/json"],"produces":["application/json"],"tags":[{"name":"Alert","description":"Alert endpoints"}],"paths":{"/admin/v1/alerts":{"post":{"tags":["Alert"],"description":"Create an Alert","parameters":[{"$ref":"#/parameters/AlertCreateRequest"}],"responses":{"201":{"description":"Alert created","schema":{"$ref":"#/definitions/AlertResponse"}}}},"get":{"tags":["Alert"],"description":"Retrieve Alerts","parameters":[{"$ref":"#/parameters/AlertListRequest"}],"responses":{"200":{"description":"Alerts retrieved","schema":{"$ref":"#/definitions/AlertListResponse"}}}}}},"parameters":{"AlertCreateRequest":{"name":"Create alert","in":"body","required":true,"schema":{"$ref":"#/definitions/AlertCreateRequest"}},"AlertListRequest":{"in":"query","name":"Role","schema":{"$ref":"#/definitions/AlertListRequestRole"}}},"definitions":{"AlertCreateRequest":{"required":["type","userRole","src","srcID","resolutionUrl","srcData"],"properties":{"type":{"$ref":"#/definitions/type"},"userRol":{"$ref":"#/definitions/userRole"},"src":{"$ref":"#/definitions/src"},"srcID":{"$ref":"#/definitions/srcID"},"resolutionUrl":{"$ref":"#/definitions/resolutionUrl"},"srcData":{"$ref":"#/definitions/srcData"}}},"AlertResponse":{"type":"object","properties":{"alertType":{"$ref":"#/definitions/alertType"},"alertUUID":{"$ref":"#/definitions/alertUUID"}}},"AlertListRequestType":{"type":"string","description":"the type of alert, can be NOTIFICATION or ALERT"},"AlertListRequestRole":{"type":"string","description":"the role of alert user, can be ContentEditor or ContentOperator"},"AlertListResponse":{"type":"array","items":{"type":"object","properties":{"alertType":{"$ref":"#/definitions/alertType"},"alertUUID":{"$ref":"#/definitions/alertUUID"},"src":{"$ref":"#/definitions/src"},"srcID":{"$ref":"#/definitions/srcID"},"resolutionUrl":{"$ref":"#/definitions/resolutionUrl"},"srcData":{"$ref":"#/definitions/srcData"},"type":{"$ref":"#/definitions/type"},"role":{"$ref":"#/definitions/userRole"}}}},"Error":{"type":"object","properties":{"errorType":{"type":"string"},"errorMessage":{"type":"string"}}},"ValidationError":{"allOf":[{"$ref":"#/definitions/Error"}],"properties":{"invalidParams":{"type":"object","properties":{"paramName":{"type":"string"}}}}},"alertType":{"type":"string","description":"Alert type"},"alertUUID":{"type":"string","format":"uuid","description":"Alert UUID"},"type":{"type":"string","description":"Type of the alert"},"userRole":{"type":"string","description":"User Role for the alert"},"src":{"type":"string","description":"Tool which generated the alert"},"srcID":{"type":"string","description":"Tool internal item id,  to hadle duplicates"},"resolutionUrl":{"type":"string","format":"url","description":"Resolution URL for the alert"},"srcData":{"type":"object","description":"All the data related to a particular alert"}}}