{"type":"api","title":"Import","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-2/76fd4bb9d069fd2530d7a02f0b3a4ca00eccfd35/86ecd438-8734-3f16-a735-542a35795cd3","info":{"title":"Crosswork Workflow Manager Solutions - MOP","description":"The MOP (Method of Procedure) service provides a flexible framework for orchestrating network maintenance activities through reusable workflow components.\n\nApplication type represents a specific use case with mop execution startegy and are associated with products.\n\nMOP Actions are reusable CWM workflows that perform specific tasks during maintenance operations at different stages.\n\nMOPs (MOP Profiles) are complete maintenance procedures assembled from multiple actions. MOPs provide:\n- Ordered execution of actions across maintenance stages\n- Reusability across similar maintenance scenarios\n- Consistent operational procedures\n- Integration with Crosswork maintenance activities\n\nThis service enables network operators to build, manage, and execute standardized maintenance procedures while maintaining flexibility for custom workflows and device-specific requirements.","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"https://www.cisco.com/public/sw-license-agreement.html"},"version":"7.2.0"},"x-parser-conf":{"overview":{"markdownPath":"reference/CWM-SOLUTIONS/mop-api.overview.md"}},"openapi":"3.0.1","servers":[{"url":"https://crosswork-ip:30603/crosswork/cwms/mop/v1"}],"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and JWT token.","name":"Authorization","in":"header"}}},"spec":{"tags":["MOP"],"summary":"Import","description":"Import a MOP with/out workflow definition.","operationId":"importMop","parameters":[{"name":"X-Correlation-ID","in":"header","description":"Unique correlation id","schema":{"type":"string"}}],"requestBody":{"description":"MOP with workflows","content":{"application/json":{"schema":{"required":["actions","name","productSeries","tags"],"type":"object","properties":{"actions":{"minItems":1,"type":"array","description":"List of actions for the MOP.","items":{"required":["name","position","stage","wfName","wfVersion"],"type":"object","properties":{"data":{"type":"object","additionalProperties":{"type":"string"},"description":"Input to be passed to the selected action (workflow).","example":{"cmd":"show install activate summary"}},"ignoreFailure":{"type":"boolean","description":"Flag to indicate if the selected action should be ignored on failure and continue with other action execution during MOP execution.","example":false},"name":{"maxLength":64,"type":"string","description":"Name of the selected action.","format":"^[a-zA-Z][a-zA-Z0-9\\s_-]*$","example":"package summary"},"phase":{"type":"string","description":"Phase of the selected action.","example":"rollback"},"position":{"maximum":255,"minimum":1,"type":"integer","description":"Position (order of execution within a stage) of the selected action in the MOP.","example":1},"stage":{"type":"string","description":"Stage of the selected action.","example":"post"},"uses":{"type":"array","description":"List of selected actions output on which this selected action is dependent on.","items":{"required":["depActionName"],"type":"object","properties":{"depActionName":{"type":"string","description":"Name of the selected action on which other selected actions are dependent on.","example":"package summary"},"depActionStage":{"type":"string","description":"Stage of the selected action on which other selected actions are dependent on.","example":"pre"}},"description":"Dependent action model.","$$ref":"#/components/schemas/mop.DependentAction"}},"wfName":{"type":"string","description":"Workflow name associated with the selected action.","example":"package summary check"},"wfVersion":{"type":"string","description":"Workflow version associated with the selected action.","example":"1.0.0"}},"description":"Selected action create model.","$$ref":"#/components/schemas/mop.SelectedActionCreate"}},"app":{"type":"string","description":"Application group name.","example":"Fleet Upgrade"},"forms":{"type":"array","description":"List of forms for the workflows to be imported.","items":{"type":"object","properties":{"description":{"type":"string","description":"Form description.","example":"Form for package summary mop activity"},"formId":{"type":"string","description":"Form ID.","example":"cwm.form.pkgSummary"},"formSchema":{"type":"object","additionalProperties":{"type":"string"},"description":"Form schema.","example":{"submitButtonLabel":"Submit"}},"name":{"type":"string","description":"Form name.","example":"pkgSummary"}},"description":"CWM form model.","$$ref":"#/components/schemas/mop.CwmForm"}},"name":{"maxLength":64,"type":"string","description":"Name of the MOP.","format":"^[a-zA-Z][a-zA-Z0-9\\s_-]*$","example":"IOSXR Upgrade"},"productSeries":{"type":"array","description":"Product series.","example":["Cisco 8000 Series Routers","Cisco Network Convergence System 5500 Series"],"items":{"type":"string"}},"tags":{"minItems":1,"type":"array","description":"Tags associated with the MOP.","example":["cisco","iosxr"],"items":{"type":"string","format":"^[a-zA-Z][a-zA-Z0-9_-]*$"}},"vendor":{"type":"string","description":"Vendor name.","example":"Cisco Systems"},"workflows":{"type":"array","description":"List of workflows for the MOP actions to be imported.","items":{"type":"object","properties":{"definition":{"type":"object","additionalProperties":{"type":"string"},"description":"Workflow definition.","example":{"description":"Check package summary","name":"package summary check","version":"1.0.0"}},"formId":{"type":"string","description":"Form used in the workflow.","example":"cwm.form.pkgSummary"},"wfTags":{"type":"array","description":"Tags associated with the workflow.","example":["mopActivity"],"items":{"type":"string"}}},"description":"Mop action workflow model.","$$ref":"#/components/schemas/mop.ActionWF"}}},"description":"MOP import model.","$$ref":"#/components/schemas/mop.MopImport"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code.","example":200},"key":{"type":"integer","description":"Object key."},"message":{"type":"string","description":"Message of the response.","example":"Success message"},"status":{"type":"string","description":"Status of the response.","example":"Success"}},"description":"SuccessResponse model.","$$ref":"#/components/schemas/mop.SuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code.","example":400},"message":{"type":"string","description":"Message of the response.","example":"Bad request error message"},"status":{"type":"string","description":"Status of the response.","example":"Failed"}},"description":"BadRequestResponse model.","$$ref":"#/components/schemas/mop.BadRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message.","example":"Key not authorized: token has expired"}},"description":"FailureInfraResponse model.","$$ref":"#/components/schemas/mop.FailureInfraResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message.","example":"Key not authorized: token has expired"}},"description":"FailureInfraResponse model.","$$ref":"#/components/schemas/mop.FailureInfraResponse"}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code.","example":406},"message":{"type":"string","description":"Message of the response.","example":"Not acceptable error message"},"status":{"type":"string","description":"Status of the response.","example":"Failed"}},"description":"NotAcceptableResponse model.","$$ref":"#/components/schemas/mop.NotAcceptableResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code.","example":500},"message":{"type":"string","description":"Message of the response.","example":"Internal server error message"},"status":{"type":"string","description":"Status of the response.","example":"Failed"}},"description":"InternalErrorResponse model.","$$ref":"#/components/schemas/mop.InternalErrorResponse"}}}}},"security":[{"Bearer":[]}],"x-codegen-request-body-name":"request","__originalOperationId":"importMop","method":"post","path":"/import"}}