{"type":"api","title":"Get Mop events associated with MoP job","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/c0404d8d-ff8e-36e9-bb59-ee336d247534","info":{"title":"Crosswork Change Automation API","version":"7.1.0","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"},"description":"A web server dedicated to RESTful queries into the Crosswork Change Automation application."},"x-parser-conf":{"overview":{"markdownPath":"reference/CAHI/change_automation.overview.md"}},"openapi":"3.1.0","servers":[{"url":"https://{server_ip}:30603/crosswork/nca/v1","description":"Generated server url"}]},"spec":{"summary":"Get Mop events associated with MoP job.","operationId":"NCA_GetMopJobEvents","tags":["NCA"],"requestBody":{"description":"Get Mop Events for the Mop job","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Change Automation Mop Job Events Read Request","properties":{"limit":{"type":"integer","format":"int64","description":"Denotes the number of mopjob events per page requested by user."},"page":{"type":"integer","format":"int64","title":"// The page number of the result. Page number subtracted by 1 and multiplied\n/ by the limit determines the offset from which records are returned","description":"The page number of the result. Page number subtracted by 1 and multiplied\nby the limit determines the offset from which records are returned"},"types":{"type":"array","items":{"type":"string","description":"Change Automation NCA Event Type","enum":["UNKNOWN","CONSOLE","GENERIC","MOP_TASK","NODE_STATUS_UPDATE","WAE_RESULT","MOP_STATUS","MOP_PAUSED","MOP_CONFIG","CONT_CHECK_RESULT","SYSLOG_STATUS"],"default":"UNKNOWN","$$ref":"#/components/schemas/change_automationNCAEventType"},"description":"Types of the event. If not set, query execution will yield all event types."},"after":{"type":"string","format":"uint64","title":"Time after field determines the timestamp at which to start returning\nevents. Only events with time greater than or equal to after will be\nreturned","description":"Time after field determines the timestamp at which to start returning\nevents. Only events with time greater than or equal to after will be\nreturned"},"before":{"type":"string","format":"uint64","title":"Time after field determines the timestamp at which to start returning\nevents. Only events with time less than or equal to before will be returned","description":"Time after field determines the timestamp at which to start returning\nevents. Only events with time less than or equal to before will be returned"},"device":{"type":"string","description":"Name of the device for which events are requested."},"execution_id":{"type":"string","title":"ExecutionId of the mop for which the user wants events","description":"ExecutionId of the mop for which the user wants events"},"reverse":{"type":"boolean","title":"If set the events will be returned in reverse chronological order, i.e.,\nnewest first. By default, the flag is false so events will be returned in\nchronological order","description":"If set the events will be returned in reverse chronological order, i.e.,\nnewest first. By default, the flag is false so events will be returned in\nchronological order"}},"$$ref":"#/components/schemas/change_automationMopJobEventsReadReq"},"example":{"limit":50,"page":2,"types":["GENERIC"],"after":"1633024800","before":"1635703200","device":"Router-1","execution_id":"exec12345","reverse":true}}}},"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"type":"object","description":"Change Automation Mop Job Events Read Response","properties":{"events":{"type":"array","description":"Array of JSON formatted events which match all the input criteria","items":{"type":"string"},"title":"Array of JSON formatted events which match all the input criteria"}},"example":{"events":["{\"node_names\":\"[\\\"xrv9k-1\\\"]\",\"message_type\":\"GENERIC EVENT\",\"execution_id\":\"1687426280907-75acbf9b-044b-44fe-bc5f-7b9cf107b825\",\"mop_id\":\"router_check_accessibility\",\"event_data\":{\"event_value\":\"{\\\"description\\\":\\\"MoP job completed\\\",\\\"status\\\":\\\"COMPLETED\\\"}\",\"event_time\":1687426293140356238}}"]},"$$ref":"#/components/schemas/change_automationMopJobEventsReadResp"}}}},"400":{"description":"Bad Request. The request is malformed in some way and the server cannot process it.","content":{"application/json":{"schema":{"type":"object","description":"Change Automation Error 400","required":["code","severity","message"],"properties":{"code":{"type":"string","description":"HTTP return code","example":"400"},"severity":{"type":"string","description":"Error severity level","enum":["Critical","Warning","Fatal"]},"message":{"type":"string","description":"Error message","example":"top level error string"},"data":{"type":"string","description":"Details of the error","example":"detailed description of the error"}},"example":{"code":"400","severity":"Critical","message":"error message","data":"detailed description of the error"},"$$ref":"#/components/schemas/change_automationError400"}}}},"500":{"description":"Internal Server Error. The server could not fulfill the request.","content":{"application/json":{"schema":{"type":"object","description":"Change Automation Error 500","required":["code","severity","message"],"properties":{"code":{"type":"string","description":"HTTP return code","example":"500"},"severity":{"type":"string","description":"Error severity level","enum":["Critical","Warning","Fatal"]},"message":{"type":"string","description":"Error message","example":"top level error string"},"data":{"type":"string","description":"Error detailed description"}},"example":{"code":"500","severity":"Critical","message":"error message","data":"Server Error. detailed description of the error"},"$$ref":"#/components/schemas/change_automationError500"}}}}},"method":"post","path":"/mopjobs/events/query"}}