{"type":"api","title":"Validate the playbook and device compatibility","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":"Validate the playbook and device compatibility","operationId":"NCA_PostMopDeviceCompatibility","tags":["NCA"],"parameters":[{"name":"mop_id","in":"path","required":true,"schema":{"type":"string"},"description":"MoP Id to uniquely identify whether the playbook and devices are compatible"}],"requestBody":{"description":"Target devices","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Mop Device Compatible Req Devices","properties":{"device_group":{"type":"string","description":"Device group name (DLM tag), one job will be executed for each device in this group."},"devices":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"List of device hostnames."}},"description":"List of devices on which the job will be executed.\nIf multiple devices are provided for a playbook targeting one device at a\ntime, one job will be executed in parallel for each device in list. If\nmultiple devices are provided for a playbook targeting multiple devices, one\njob will be executed. Either device group or devices must be specified.","$$ref":"#/components/schemas/change_automationDevicesIds"}},"$$ref":"#/components/schemas/MopDeviceCompatibleReqDevices"},"example":{"device_group":"devicegroup-NY"}}}},"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"type":"object","description":"Change Automation Mop Device Compatible Response","properties":{"result":{"title":"Result field indicating if the selected playbook can be executed on the\nselected device(s) or device group","type":"string","enum":["NONE","COMPATIBLE","INCOMPATIBLE"],"default":"NONE","description":"Mop Device Compatible Resp Result","$$ref":"#/components/schemas/MopDeviceCompatibleRespResult"},"errors":{"type":"array","description":"List of errors. Each entry will describe a device which is incompatible and\nthe reason for incompatibility","items":{"type":"object","description":"Change Automation Mop Device Compatible Response Error","properties":{"device":{"type":"string","title":"Hostname of the device which is not compatible which the playbook","description":"Hostname of the device which is not compatible which the playbook"},"reason":{"type":"string","title":"Reason for incompatibility","description":"Reason for incompatibility"}},"$$ref":"#/components/schemas/change_automationMopDeviceCompatibleRespError"},"title":"List of errors. Each entry will describe a device which is incompatible and\nthe reason for incompatibility"}},"example":{"result":"COMPATIBLE"},"$$ref":"#/components/schemas/change_automationMopDeviceCompatibleResp"}}}},"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":"/mops/{mop_id}/compatible"}}