def create_workflow_with_http_info(self, **kwargs): # noqa: E501 """Create a workflow # noqa: E501 Creates a new workflow and version (if provided). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_workflow_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param CreateWorkflowRequest body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Workflow, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['body'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method create_workflow" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in local_var_params: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['Bearer'] # noqa: E501 return self.api_client.call_api( '/v1/workflows', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Workflow', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_workflows_with_http_info(self, **kwargs): # noqa: E501 """Get a list of workflows # noqa: E501 Gets a list of workflows. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_workflows_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str tenant_id: ID of the tenant :param str name: :param list[str] categories: :param list[str] include: Comma-separated list of properties to include in the response :param int page_size: Number of items to include in a page. Value must be an integer between 1 and 1000. Only one of pageSize or pageToken can be specified. :param str page_token: Page offset descriptor. Valid page tokens are included in the response. Only one of pageSize or pageToken can be specified. :param str sort: Specifies the order to include list items as \"_{fieldName}_ [asc|desc]\". The second field is optional and specifies the sort direction (\"asc\" for ascending or \"desc\" for descending). :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(WorkflowList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = [ 'tenant_id', 'name', 'categories', 'include', 'page_size', 'page_token', 'sort' ] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_workflows" % key) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if 'tenant_id' in local_var_params and local_var_params[ 'tenant_id'] is not None: # noqa: E501 query_params.append( ('tenantId', local_var_params['tenant_id'])) # noqa: E501 if 'name' in local_var_params and local_var_params[ 'name'] is not None: # noqa: E501 query_params.append( ('name', local_var_params['name'])) # noqa: E501 if 'categories' in local_var_params and local_var_params[ 'categories'] is not None: # noqa: E501 query_params.append( ('categories', local_var_params['categories'])) # noqa: E501 collection_formats['categories'] = 'csv' # noqa: E501 if 'include' in local_var_params and local_var_params[ 'include'] is not None: # noqa: E501 query_params.append( ('include', local_var_params['include'])) # noqa: E501 collection_formats['include'] = 'csv' # noqa: E501 if 'page_size' in local_var_params and local_var_params[ 'page_size'] is not None: # noqa: E501 query_params.append( ('pageSize', local_var_params['page_size'])) # noqa: E501 if 'page_token' in local_var_params and local_var_params[ 'page_token'] is not None: # noqa: E501 query_params.append( ('pageToken', local_var_params['page_token'])) # noqa: E501 if 'sort' in local_var_params and local_var_params[ 'sort'] is not None: # noqa: E501 query_params.append( ('sort', local_var_params['sort'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['Bearer'] # noqa: E501 return self.api_client.call_api( '/v1/workflows', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WorkflowList', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_workflow_with_http_info(self, workflow_id, **kwargs): # noqa: E501 """Get the details of a workflow # noqa: E501 Gets the details of a workflow with a given ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_workflow_with_http_info(workflow_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str workflow_id: ID of the workflow (required) :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(Workflow, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['workflow_id'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method get_workflow" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'workflow_id' is set if self.api_client.client_side_validation and ( 'workflow_id' not in local_var_params or # noqa: E501 local_var_params['workflow_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `workflow_id` when calling `get_workflow`" ) # noqa: E501 collection_formats = {} path_params = {} if 'workflow_id' in local_var_params: path_params['workflowId'] = local_var_params[ 'workflow_id'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['Bearer'] # noqa: E501 return self.api_client.call_api( '/v1/workflows/{workflowId}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='Workflow', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def update_workflow_version_with_http_info(self, workflow_id, version_name, **kwargs): # noqa: E501 """Update an existing workflow version # noqa: E501 Updates an existing workflow version. Note: The Version, Definition, and Status cannot be changed simultaneously. Only one of these can be changed per API call. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.update_workflow_version_with_http_info(workflow_id, version_name, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str workflow_id: ID of the workflow (required) :param str version_name: Name of the workflow version (required) :param UpdateWorkflowVersionRequest body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(WorkflowVersion, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['workflow_id', 'version_name', 'body'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method update_workflow_version" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'workflow_id' is set if self.api_client.client_side_validation and ( 'workflow_id' not in local_var_params or # noqa: E501 local_var_params['workflow_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `workflow_id` when calling `update_workflow_version`" ) # noqa: E501 # verify the required parameter 'version_name' is set if self.api_client.client_side_validation and ( 'version_name' not in local_var_params or # noqa: E501 local_var_params['version_name'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `version_name` when calling `update_workflow_version`" ) # noqa: E501 collection_formats = {} path_params = {} if 'workflow_id' in local_var_params: path_params['workflowId'] = local_var_params[ 'workflow_id'] # noqa: E501 if 'version_name' in local_var_params: path_params['versionName'] = local_var_params[ 'version_name'] # noqa: E501 query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in local_var_params: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 [ 'application/json-patch+json', 'application/json', 'text/json', 'application/*+json' ]) # noqa: E501 # Authentication setting auth_settings = ['Bearer'] # noqa: E501 return self.api_client.call_api( '/v1/workflows/{workflowId}/versions/{versionName}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WorkflowVersion', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def abort_workflow_run_with_http_info(self, run_id, **kwargs): # noqa: E501 """Abort a workflow run # noqa: E501 Aborts the workflow run with a given ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.abort_workflow_run_with_http_info(run_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str run_id: ID of the workflow run (required) :param list[str] include: Comma-separated list of properties to include in the response :param AbortWorkflowRunRequest body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(WorkflowRun, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['run_id', 'include', 'body'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method abort_workflow_run" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'run_id' is set if self.api_client.client_side_validation and ( 'run_id' not in local_var_params or # noqa: E501 local_var_params['run_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `run_id` when calling `abort_workflow_run`" ) # noqa: E501 collection_formats = {} path_params = {} if 'run_id' in local_var_params: path_params['runId'] = local_var_params['run_id'] # noqa: E501 query_params = [] if 'include' in local_var_params and local_var_params[ 'include'] is not None: # noqa: E501 query_params.append( ('include', local_var_params['include'])) # noqa: E501 collection_formats['include'] = 'csv' # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None if 'body' in local_var_params: body_params = local_var_params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params[ 'Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 [ 'application/json-patch+json', 'application/json', 'text/json', 'application/*+json' ]) # noqa: E501 # Authentication setting auth_settings = ['Bearer'] # noqa: E501 return self.api_client.call_api( '/v1/workflows/runs/{runId}:abort', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WorkflowRun', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_workflow_run_history_with_http_info(self, run_id, **kwargs): # noqa: E501 """Get a list of workflow run history events # noqa: E501 Gets a list of history events for a workflow run with a given ID. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_workflow_run_history_with_http_info(run_id, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str run_id: ID of the workflow run (required) :param str sort: :param list[str] include: Comma-separated list of properties to include in the response :param int page_size: Number of items to include in a page. Value must be an integer between 1 and 1000. Only one of pageSize or pageToken can be specified. :param str page_token: Page offset descriptor. Valid page tokens are included in the response. Only one of pageSize or pageToken can be specified. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(WorkflowRunHistoryEventList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread. """ local_var_params = locals() all_params = ['run_id', 'sort', 'include', 'page_size', 'page_token'] all_params.extend([ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ]) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError("Got an unexpected keyword argument '%s'" " to method list_workflow_run_history" % key) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'run_id' is set if self.api_client.client_side_validation and ( 'run_id' not in local_var_params or # noqa: E501 local_var_params['run_id'] is None): # noqa: E501 raise ApiValueError( "Missing the required parameter `run_id` when calling `list_workflow_run_history`" ) # noqa: E501 collection_formats = {} path_params = {} if 'run_id' in local_var_params: path_params['runId'] = local_var_params['run_id'] # noqa: E501 query_params = [] if 'sort' in local_var_params and local_var_params[ 'sort'] is not None: # noqa: E501 query_params.append( ('sort', local_var_params['sort'])) # noqa: E501 if 'include' in local_var_params and local_var_params[ 'include'] is not None: # noqa: E501 query_params.append( ('include', local_var_params['include'])) # noqa: E501 collection_formats['include'] = 'csv' # noqa: E501 if 'page_size' in local_var_params and local_var_params[ 'page_size'] is not None: # noqa: E501 query_params.append( ('pageSize', local_var_params['page_size'])) # noqa: E501 if 'page_token' in local_var_params and local_var_params[ 'page_token'] is not None: # noqa: E501 query_params.append( ('pageToken', local_var_params['page_token'])) # noqa: E501 header_params = {} form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['Bearer'] # noqa: E501 return self.api_client.call_api( '/v1/workflows/runs/{runId}/history', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='WorkflowRunHistoryEventList', # noqa: E501 auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get( '_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)