{"type":"api","title":"Get Playbooks with filter","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 Playbooks with filter","operationId":"NCA_GetMops","tags":["NCA"],"requestBody":{"description":"Arguments passed to get MoPs based on filter","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Change Automation Mops Read Request","properties":{"limit":{"type":"integer","format":"int64","description":"Denotes the number of mops per page requested by user."},"page":{"type":"integer","format":"int64","title":"The page number of the result. Page number subtracted by 1 and multiplied\nby 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"},"mop_name":{"type":"string","title":"Filter results mop name. The value is applied in a partial string search on\nthe filter.name field. Wildcard based search is not supported. For example,\nvalue could be 'interface' if the user wishes to retrieve all mop which\ncontain interface in it's name","description":"Filter results mop name. The value is applied in a partial string search on\nthe filter.name field. Wildcard based search is not supported. For example,\nvalue could be 'interface' if the user wishes to retrieve all mop which\ncontain interface in it's name"},"description":{"type":"string","title":"Filter results by mop description. The value is applied in a partial string\nsearch on the filter.name field. Wildcard based search is not supported.\nFor example, value could be 'interface' if the user wishes to retrieve all\nmop which contain interface in it's description","description":"Filter results by mop description. The value is applied in a partial string\nsearch on the filter.name field. Wildcard based search is not supported.\nFor example, value could be 'interface' if the user wishes to retrieve all\nmop which contain interface in it's description"},"sw_platform":{"type":"string","description":"Filter by software platform. The value is applied is case insensitve and\nperform complete string match."},"created_by":{"type":"string","title":"Filter results by owner name of the mop. Only the playbook belonging to a\nuser value will be returned","description":"Filter results by owner name of the mop. Only the playbook belonging to a\nuser value will be returned"},"version":{"type":"string","title":"Filter by mop version. The version filter will be applied as a case\nsensitive string","description":"Filter by mop version. The version filter will be applied as a case\nsensitive string"},"predefined_only":{"type":"boolean","title":"Only return prefined playbooks","description":"Only return prefined playbooks"},"sort_by":{"title":"Sort by one of the available fields","description":"Sort by one of the available fields","type":"string","enum":["mop_name","description","platform","created_by","version","modified_time"],"default":"mop_name","$$ref":"#/components/schemas/change_automationMopsReadReqSortBy"},"order":{"title":"Ordering for the sort. Used when a sort_by is specified","description":"Ordering for the sort. Used when a sort_by is specified","type":"string","enum":["asc","desc"],"default":"asc","$$ref":"#/components/schemas/change_automationOrder"},"labels":{"type":"array","items":{"type":"string"},"title":"Filter results by labels","description":"Filter results by labels"},"auth_role":{"type":"array","items":{"type":"string"},"title":"Filter results by roles","description":"Filter results by roles"}},"$$ref":"#/components/schemas/change_automationMopsReadReq"},"example":{"limit":25,"page":1,"mop_name":"interface","description":"network update","sw_platform":"iOS","created_by":"alice_admin","version":"1.0.3","predefined_only":false,"sort_by":"mop_name","order":"asc","labels":["critical"],"auth_role":["admin"]}}}},"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"type":"object","description":"Change Automation Mops Read Response","properties":{"count":{"type":"integer","format":"int64","title":"Count of total number of mops returned","description":"Count of total number of mops returned"},"mops":{"type":"array","items":{"type":"object","description":"Change Automation MoP","properties":{"mop_id":{"type":"string","description":"A unique identifier for a playbook which is the name of the playbook file\nwithout the extension."},"mop_version":{"type":"string","description":"A version for the playbook specified by the creator."},"name":{"type":"string","description":"A name for the playbook, with which it is identified on UI."},"description":{"type":"string","description":"An optional description for the playbook."},"sw_platform":{"type":"string","title":"Software platform on which the playbook can be run. e.g. \"IOS-XR\"","description":"Software platform on which the playbook can be run."},"sw_version":{"type":"string","description":"Software version(s) for which the playbook is supported, e.g. \"6.2.1\". This\nfield could be a comma separated list. A singular value would denote that\nthis is the minimum supported version."},"hw_platform":{"type":"string","description":"Hardware platform on which the playbook is supported."},"pb_file_name":{"type":"string","description":"Playbook file name. Each MoP corresponds to one Ansible playbook file."},"pb_exec_policy_file_name":{"type":"string","description":"Playbook execution policy spec file name."},"pb_params_sample_file_name":{"type":"string","description":"Parameters sample file name. Sample of how the UI params look like."},"pb_params_spec_file_name":{"type":"string","description":"Parameters specifications file name. Specifications of all the parameters\nneeded for the playbook."},"min_nodes":{"type":"integer","format":"int64","title":"Minimum number of nodes that need to be specifed for this playbook. If 0,\nUI will not enforce node selection","description":"Minimum number of nodes that need to be specifed for this playbook."},"max_nodes":{"type":"integer","format":"int64","title":"Maximum number of nodes that can be be specified for this playbook. If 0,\nUI will not enforce any upper bound","description":"Maximum number of nodes that can be be specified for this playbook."},"parsed_pb":{"title":"A detailed task level breakdown of the playbook. This field is populated if\nthe parse boolean flag is set to TRUE in the incoming request","type":"object","description":"Change Automation Playbook Phases","properties":{"continuous":{"type":"array","items":{"type":"object","description":"Change Automation Playbook Task","properties":{"idx":{"type":"integer","format":"int64","title":"ID of the task","description":"ID of the task"},"name":{"type":"string","title":"Name of the task","description":"Name of the task"},"verb":{"type":"string","description":"ID of the verb the task invokes."}},"$$ref":"#/components/schemas/change_automationPlaybookTask"},"title":"List of all continuous tasks in the playbook","description":"List of all continuous tasks in the playbook"},"pre_maintenance":{"type":"array","items":{"type":"object","description":"Change Automation Playbook Task","properties":{"idx":{"type":"integer","format":"int64","title":"ID of the task","description":"ID of the task"},"name":{"type":"string","title":"Name of the task","description":"Name of the task"},"verb":{"type":"string","description":"ID of the verb the task invokes."}},"$$ref":"#/components/schemas/change_automationPlaybookTask"},"title":"List of all pre-maintenance tasks in the playbook","description":"List of all pre-maintenance tasks in the playbook"},"maintenance":{"type":"array","items":{"type":"object","description":"Change Automation Playbook Task","properties":{"idx":{"type":"integer","format":"int64","title":"ID of the task","description":"ID of the task"},"name":{"type":"string","title":"Name of the task","description":"Name of the task"},"verb":{"type":"string","description":"ID of the verb the task invokes."}},"$$ref":"#/components/schemas/change_automationPlaybookTask"},"title":"List of all maintenance tasks in the playbook","description":"List of all maintenance tasks in the playbook"},"post_maintenance":{"type":"array","items":{"type":"object","description":"Change Automation Playbook Task","properties":{"idx":{"type":"integer","format":"int64","title":"ID of the task","description":"ID of the task"},"name":{"type":"string","title":"Name of the task","description":"Name of the task"},"verb":{"type":"string","description":"ID of the verb the task invokes."}},"$$ref":"#/components/schemas/change_automationPlaybookTask"},"title":"List of all post-maintenance tasks in the playbook","description":"List of all post-maintenance tasks in the playbook"}},"$$ref":"#/components/schemas/change_automationPlaybookPhases"},"is_custom":{"type":"boolean","description":"Flag indicating if this is a custom/user-defined MoP or not."},"created_by":{"type":"string","description":"User who created this MoP."},"created_at":{"type":"integer","format":"uint64","description":"Time at which this custom MoP was created."},"labels":{"type":"array","items":{"type":"string"},"description":"User applied labels."},"auth_role":{"type":"array","items":{"type":"string"},"description":"List of Roles allowed to run the playbook."}},"$$ref":"#/components/schemas/change_automationMop"},"title":"Array containing all the mops that were returned based on the input\nparameters","description":"Array containing all the mops that were returned based on the input\nparameters"},"current_count":{"type":"integer","format":"int64","title":"Count of current number of mops returned","description":"Count of current number of mops returned"}},"example":{"count":1,"current_count":1,"mops":[{"mop_id":"custom_playbook","mop_version":"1.0.0","name":"custom_playbook","description":"custom_playbook","sw_platform":"IOS XR","pb_file_name":"custom_playbook.yaml","pb_exec_policy_file_name":"pb_execution_policy_specs.json","pb_params_sample_file_name":".","pb_params_spec_file_name":"custom_playbook_specs.json","min_nodes":1,"max_nodes":1,"parsed_pb":{"pre_maintenance":[{"idx":1,"name":"check_play"}],"maintenance":[{"idx":2,"name":"Check CPU usage"}]},"is_custom":true,"created_by":"admin","created_at":1687188333,"labels":["test_label"]}]},"$$ref":"#/components/schemas/change_automationMopsReadResp"}}}},"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/query"}}