Clone api for actions/workflows- adding openapi.yaml file
@@ -425,6 +425,55 @@ paths:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
+ /api/v1/actions/{source_pack}/{source_action}/{dest_pack}/{dest_action}:
+ post:
+ operationId: st2api.controllers.v1.actions:actions_controller.clone
+ description: |
+ Clone one action.
+ parameters:
+ - name: source_pack
+ in: path
+ description: Source pack name
+ type: string
+ required: true
+ - name: source_action
+ in: path
+ description: Source action name
+ type: string
+ required: true
+ - name: dest_pack
+ in: path
+ description: Destination pack name
+ type: string
+ required: true
+ - name: dest_action
+ in: path
+ description: Destination action name
+ type: string
+ required: true
+ - name: overwrite
+ in: query
+ description: Force clone action if destination already exists
+ type: boolean
+ default: false
+ x-parameters:
+ - name: user
+ in: context
+ x-as: requester_user
+ description: User performing the operation.
+ responses:
+ '201':
+ description: Single action being cloned
+ schema:
+ $ref: '#/definitions/Action'
+ examples:
+ application/json:
+ ref: 'core.local'
+ # and stuff
+ default:
+ description: Unexpected error
+ schema:
+ $ref: '#/definitions/Error'
/api/v1/actions/views/parameters/{action_id}:
get:
operationId: st2api.controllers.v1.action_views:parameters_view_controller.get_one
