{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://api.quinyx.com/v2/forecast-events","description":""}],"paths":{"/groups/{groupId}/events/{eventId}":{"put":{"tags":["Public API rest endpoints for managing forecast events"],"summary":"Update forecast event","operationId":"updateEvent","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventIntegrationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationEvent"}}}}}},"delete":{"tags":["Public API rest endpoints for managing forecast events"],"summary":"Delete forecast event","operationId":"deleteEvent","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/groups/{groupId}/event-categories/{eventCategoryId}":{"get":{"tags":["Public API rest endpoints for managing forecast event categories"],"summary":"Read forecast event category","operationId":"getEventCategory","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"eventCategoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EventCategory"}}}}}},"put":{"tags":["Public API rest endpoints for managing forecast event categories"],"summary":"Update forecast event category","operationId":"updateEventCategory","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"eventCategoryId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCategory"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCategory"}}}}}},"delete":{"tags":["Public API rest endpoints for managing forecast event categories"],"summary":"Delete forecast event category","operationId":"deleteEventCategory","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"eventCategoryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/groups/{groupId}/events":{"get":{"tags":["Public API rest endpoints for managing forecast events"],"summary":"Read forecast events for the group","operationId":"getIntegrationEvents","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startTime","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endTime","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEvent"}}}}}}},"post":{"tags":["Public API rest endpoints for managing forecast events"],"summary":"Read forecast events for the group and all groups higher in the hierarchy","operationId":"getGroupHierarchyIntegrationEvents","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupHierarchyEventsExternalRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEvent"}}}}}}}},"/groups/{groupId}/event":{"post":{"tags":["Public API rest endpoints for managing forecast events"],"summary":"Create forecast events for forecast configurations and groups","operationId":"createIntegrationEvent","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventIntegrationRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEvent"}}}}}}}},"/groups/{groupId}/event-categories":{"get":{"tags":["Public API rest endpoints for managing forecast event categories"],"summary":"Read forecast event categories for the group","operationId":"getEventCategories","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventCategory"}}}}}}},"post":{"tags":["Public API rest endpoints for managing forecast event categories"],"summary":"Create forecast event category for the domain.","operationId":"createEventCategory","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCategory"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCategory"}}}}}}},"/groups/{groupId}/events/{eventId}/overrides":{"get":{"tags":["Public API rest endpoints for managing forecast events"],"summary":"Retrieve the forecast event and all its override events for the group based on the event ID","operationId":"getIntegrationEventsByEventId","parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"eventId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/IntegrationEvent"}}}}}}}}},"components":{"schemas":{"EventEffect":{"required":["forecastConfigurationId","type","value"],"type":"object","properties":{"forecastConfigurationId":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["RELATIVE","CLOSED","ABSOLUTE","AUTOMATIC"]},"value":{"type":"number","format":"double"}}},"UpdateEventIntegrationRequest":{"required":["endTime","eventCategoryId","eventEffects","startTime"],"type":"object","properties":{"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"eventCategoryId":{"type":"string"},"comment":{"maxLength":255,"minLength":0,"type":"string"},"active":{"type":"boolean"},"id":{"type":"string"},"eventEffects":{"type":"array","items":{"$ref":"#/components/schemas/EventEffect"}}}},"Event":{"required":["endTime","eventCategoryId","eventEffects","startTime"],"type":"object","properties":{"id":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"eventCategoryId":{"type":"string"},"parentEvent":{"$ref":"#/components/schemas/Event"},"groupId":{"type":"integer","format":"int32"},"eventEffects":{"type":"array","items":{"$ref":"#/components/schemas/EventEffect"}},"eventEffectValue":{"type":"number","format":"double"},"comment":{"maxLength":255,"minLength":0,"type":"string"},"active":{"type":"boolean"},"hierarchyEnabled":{"type":"boolean"}}},"IntegrationEvent":{"required":["endTime","eventCategoryId","eventEffects","startTime"],"type":"object","properties":{"id":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"eventCategoryId":{"type":"string"},"parentEvent":{"$ref":"#/components/schemas/Event"},"groupId":{"type":"integer","format":"int32"},"eventEffects":{"type":"array","items":{"$ref":"#/components/schemas/EventEffect"}},"eventEffectValue":{"type":"number","format":"double"},"comment":{"maxLength":255,"minLength":0,"type":"string"},"active":{"type":"boolean"},"hierarchyEnabled":{"type":"boolean"}}},"EventCategory":{"required":["active","name","type"],"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["CUSTOM","BANK_HOLIDAY"]},"active":{"type":"boolean"},"hasEvents":{"type":"boolean"},"hasAutomaticEffect":{"type":"boolean"},"name":{"maxLength":50,"minLength":0,"type":"string"},"defaultEventEffectType":{"type":"string","enum":["RELATIVE","CLOSED","ABSOLUTE","AUTOMATIC"]},"defaultEventEffectValue":{"type":"number","format":"double"}}},"GroupHierarchyEventsExternalRequest":{"required":["endTime","externalConfigurationId","externalVariableId","startTime"],"type":"object","properties":{"externalVariableId":{"type":"string"},"externalConfigurationId":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"}}},"CreateEventIntegrationRequest":{"required":["endTime","eventCategoryId","eventEffectType","forecastConfigurationIds","groupIds","startTime"],"type":"object","properties":{"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"eventCategoryId":{"type":"string"},"comment":{"maxLength":255,"minLength":0,"type":"string"},"active":{"type":"boolean"},"hierarchyEnabled":{"type":"boolean"},"groupIds":{"type":"array","items":{"type":"integer","format":"int32"}},"forecastConfigurationIds":{"type":"array","items":{"type":"integer","format":"int32"}},"eventEffectType":{"type":"string","enum":["RELATIVE","CLOSED","ABSOLUTE","AUTOMATIC"]},"eventEffectValue":{"type":"number","format":"double"}}}}}}