Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Generate playground API client

Tomas Valenta0d734e4eb0ee
diff --git a/api-service/playground_client/api/default_api.py b/api-service/playground_client/api/default_api.py
index 30e4d9219..ff52502bf 100644
--- a/api-service/playground_client/api/default_api.py
+++ b/api-service/playground_client/api/default_api.py
@@ -1230,19 +1230,21 @@ class DefaultApi(object):
_request_auth=_params.get('_request_auth'))
@validate_arguments
- def stop_process(self, id : StrictStr, process_id : StrictStr, **kwargs) -> None: # noqa: E501
+ def stop_process(self, id : StrictStr, process_id : StrictStr, results : Optional[StrictBool] = None, **kwargs) -> ProcessResponse: # noqa: E501
"""stop_process # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.stop_process(id, process_id, async_req=True)
+ >>> thread = api.stop_process(id, process_id, results, async_req=True)
>>> result = thread.get()
:param id: (required)
:type id: str
:param process_id: (required)
:type process_id: str
+ :param results:
+ :type results: bool
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -1256,25 +1258,27 @@ class DefaultApi(object):
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: None
+ :rtype: ProcessResponse
"""
kwargs['_return_http_data_only'] = True
- return self.stop_process_with_http_info(id, process_id, **kwargs) # noqa: E501
+ return self.stop_process_with_http_info(id, process_id, results, **kwargs) # noqa: E501
@validate_arguments
- def stop_process_with_http_info(self, id : StrictStr, process_id : StrictStr, **kwargs): # noqa: E501
+ def stop_process_with_http_info(self, id : StrictStr, process_id : StrictStr, results : Optional[StrictBool] = None, **kwargs): # noqa: E501
"""stop_process # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
- >>> thread = api.stop_process_with_http_info(id, process_id, async_req=True)
+ >>> thread = api.stop_process_with_http_info(id, process_id, results, async_req=True)
>>> result = thread.get()
:param id: (required)
:type id: str
:param process_id: (required)
:type process_id: str
+ :param results:
+ :type results: bool
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
@@ -1296,14 +1300,15 @@ class DefaultApi(object):
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
- :rtype: None
+ :rtype: tuple(ProcessResponse, status_code(int), headers(HTTPHeaderDict))
"""
_params = locals()
_all_params = [
'id',
- 'process_id'
+ 'process_id',
+ 'results'
]
_all_params.extend(
[
@@ -1338,6 +1343,8 @@ class DefaultApi(object):
# process the query parameters
_query_params = []
+ if _params.get('results') is not None: # noqa: E501
+ _query_params.append(('results', _params['results']))
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
@@ -1349,10 +1356,16 @@ class DefaultApi(object):
# process the body parameter
_body_params = None
+ # set the HTTP header `Accept`
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
# authentication setting
_auth_settings = [] # noqa: E501
- _response_types_map = {}
+ _response_types_map = {
+ '200': "ProcessResponse",
+ }
return self.api_client.call_api(
'/sessions/{id}/process/{processID}', 'DELETE',
diff --git a/api-service/playground_client/docs/DefaultApi.md b/api-service/playground_client/docs/DefaultApi.md
index 0f5a583ec..12c3d3a62 100644
--- a/api-service/playground_client/docs/DefaultApi.md
+++ b/api-service/playground_client/docs/DefaultApi.md
@@ -516,7 +516,7 @@ No authorization required
[[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)
# **stop_process**
-> stop_process(id, process_id)
+> ProcessResponse stop_process(id, process_id, results=results)
@@ -542,9 +542,12 @@ with playground_client.ApiClient(configuration) as api_client:
api_instance = playground_client.DefaultApi(api_client)
id = 'id_example' # str |
process_id = 'process_id_example' # str |
+ results = True # bool | (optional)
try:
- api_instance.stop_process(id, process_id)
+ api_response = api_instance.stop_process(id, process_id, results=results)
+ print("The response of DefaultApi->stop_process:\n")
+ pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->stop_process: %s\n" % e)
```
@@ -555,10 +558,11 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**process_id** | **str**| |
+ **results** | **bool**| | [optional]
### Return type
-void (empty response body)
+[**ProcessResponse**](ProcessResponse.md)
### Authorization
@@ -567,12 +571,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- - **Accept**: Not defined
+ - **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | No content | - |
+**200** | Ok | - |
[[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)