Skip to content

Commit

Permalink
fixed integration_upload
Browse files Browse the repository at this point in the history
added entry_execute_sync
  • Loading branch information
dantavori committed Dec 27, 2019
1 parent eba40d9 commit e5effe2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[1]: https://pypi.org/project/demisto-py/#history

## 2.0.7
* Added `investigation_add_entries_sync_handler` method creating a new entry in existing investigation.
* Added `investigation_add_entries_sync` method creating a new entry in existing investigation.
* Added `download_file` method for downloading files by entry id.
* Added `integration_upload` method for uploading integrations to Demisto.

Expand Down
14 changes: 7 additions & 7 deletions demisto_client/demisto_api/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4600,13 +4600,13 @@ def integration_upload_with_http_info(self, file, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def investigation_add_entries_sync_handler(self, **kwargs): # noqa: E501
def investigation_add_entries_sync(self, **kwargs): # noqa: E501
"""Create new entry in existing investigation # noqa: E501
API to create an entry (markdown format) in existing investigation Body example: {\"investigationId\":\"1234\",\"data\":\"entry content…\"} # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.investigation_add_entries_sync_handler(async_req=True)
>>> thread = api.investigation_add_entries_sync(async_req=True)
>>> result = thread.get()
:param async_req bool
Expand All @@ -4617,18 +4617,18 @@ def investigation_add_entries_sync_handler(self, **kwargs): # noqa: E501
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.investigation_add_entries_sync_handler_with_http_info(**kwargs) # noqa: E501
return self.investigation_add_entries_sync_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.investigation_add_entries_sync_handler_with_http_info(**kwargs) # noqa: E501
(data) = self.investigation_add_entries_sync_with_http_info(**kwargs) # noqa: E501
return data

def investigation_add_entries_sync_handler_with_http_info(self, **kwargs): # noqa: E501
def investigation_add_entries_sync_with_http_info(self, **kwargs): # noqa: E501
"""Create new entry in existing investigation # noqa: E501
API to create an entry (markdown format) in existing investigation Body example: {\"investigationId\":\"1234\",\"data\":\"entry content…\"} # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.investigation_add_entries_sync_handler_with_http_info(async_req=True)
>>> thread = api.investigation_add_entries_sync_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
Expand All @@ -4649,7 +4649,7 @@ def investigation_add_entries_sync_handler_with_http_info(self, **kwargs): # no
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method investigation_add_entries_sync_handler" % key
" to method investigation_add_entries_sync" % key
)
params[key] = val
del params['kwargs']
Expand Down
10 changes: 5 additions & 5 deletions docs/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Method | HTTP request | Description
[**indicators_edit**](DefaultApi.md#indicators_edit) | **POST** /indicator/edit | Edit Indicator
[**indicators_search**](DefaultApi.md#indicators_search) | **POST** /indicators/search | Search indicators
[**integration_upload**](DefaultApi.md#integration_upload) | **POST** /settings/integration-conf/upload | Upload an integration
[**investigation_add_entries_sync_handler**](DefaultApi.md#investigation_add_entries_sync_handler) | **POST** /entry/execute/sync | Create new entry in existing investigation
[**investigation_add_entries_sync**](DefaultApi.md#investigation_add_entries_sync) | **POST** /entry/execute/sync | Create new entry in existing investigation
[**investigation_add_entry_handler**](DefaultApi.md#investigation_add_entry_handler) | **POST** /entry | Create new entry in existing investigation
[**investigation_add_formatted_entry_handler**](DefaultApi.md#investigation_add_formatted_entry_handler) | **POST** /entry/formatted | Create new formatted entry in existing investigation
[**revoke_user_api_key**](DefaultApi.md#revoke_user_api_key) | **POST** /apikeys/revoke/user/{username} |
Expand Down Expand Up @@ -2296,8 +2296,8 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)

# **investigation_add_entries_sync_handler**
> list[Entry] investigation_add_entries_sync_handler(update_entry=update_entry)
# **investigation_add_entries_sync**
> list[Entry] investigation_add_entries_sync(update_entry=update_entry)
Create new entry in existing investigation

Expand All @@ -2317,10 +2317,10 @@ update_entry = demisto_client.demisto_api.UpdateEntry() # UpdateEntry | (option

try:
# Create new entry in existing investigation
api_response = api_instance.investigation_add_entries_sync_handler(update_entry=update_entry)
api_response = api_instance.investigation_add_entries_sync(update_entry=update_entry)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->investigation_add_entries_sync_handler: %s\n" % e)
print("Exception when calling DefaultApi->investigation_add_entries_sync: %s\n" % e)
```

### Parameters
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Method | HTTP request | Description
[**indicators_edit**](DefaultApi.md#indicators_edit) | **POST** /indicator/edit | Edit Indicator
[**indicators_search**](DefaultApi.md#indicators_search) | **POST** /indicators/search | Search indicators
[**integration_upload**](DefaultApi.md#integration_upload) | **POST** /settings/integration-conf/upload | Upload an integration
[**investigation_add_entries_sync_handler**](DefaultApi.md#investigation_add_entries_sync_handler) | **POST** /entry/execute/sync | Create new entry in existing investigation
[**investigation_add_entries_sync**](DefaultApi.md#investigation_add_entries_sync) | **POST** /entry/execute/sync | Create new entry in existing investigation
[**investigation_add_entry_handler**](DefaultApi.md#investigation_add_entry_handler) | **POST** /entry | Create new entry in existing investigation
[**investigation_add_formatted_entry_handler**](DefaultApi.md#investigation_add_formatted_entry_handler) | **POST** /entry/formatted | Create new formatted entry in existing investigation
[**revoke_user_api_key**](DefaultApi.md#revoke_user_api_key) | **POST** /apikeys/revoke/user/{username} |
Expand Down
2 changes: 1 addition & 1 deletion server_api_swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
"post": {
"description": "API to create an entry (markdown format) in existing investigation\nBody example: {\"investigationId\":\"1234\",\"data\":\"entry content…\"}",
"summary": "Create new entry in existing investigation",
"operationId": "investigationAddEntriesSyncHandler",
"operationId": "investigationAddEntriesSync",
"parameters": [
{
"name": "updateEntry",
Expand Down

0 comments on commit e5effe2

Please sign in to comment.