sdk.lusid.api.scenarios_api.ScenariosApi

class ScenariosApi(api_client=None)[source]

NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech

Do not edit the class manually.

Methods

delete_scenario

[EARLY ACCESS] DeleteScenario: Delete a Scenario, assuming that it is present.

delete_scenario_with_http_info

[EARLY ACCESS] DeleteScenario: Delete a Scenario, assuming that it is present.

get_scenario

[EARLY ACCESS] GetScenario: Get Scenario # noqa: E501

get_scenario_with_http_info

[EARLY ACCESS] GetScenario: Get Scenario # noqa: E501

list_scenarios

[EARLY ACCESS] ListScenarios: List the set of Scenario definitions # noqa: E501

list_scenarios_with_http_info

[EARLY ACCESS] ListScenarios: List the set of Scenario definitions # noqa: E501

upsert_scenario

[EARLY ACCESS] UpsertScenario: Upsert a Scenario.

upsert_scenario_with_http_info

[EARLY ACCESS] UpsertScenario: Upsert a Scenario.

delete_scenario(scope, code, async_req=None, **kwargs)[source]

[EARLY ACCESS] DeleteScenario: Delete a Scenario, assuming that it is present. # noqa: E501

Delete the specified Scenario definition from a single scope. The response will return either detail of the deleted item, or an explanation (failure) as to why this did not succeed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_scenario(scope, code, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The scope of the Scenario to delete. (required)

  • code (str) – The Scenario to delete. (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – Timeout setting. Do not use - use the opts parameter instead

  • opts (ConfigurationOptions, optional) – Configuration options for this request

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

AnnulSingleStructuredDataResponse

delete_scenario_with_http_info(scope, code, **kwargs)[source]

[EARLY ACCESS] DeleteScenario: Delete a Scenario, assuming that it is present. # noqa: E501

Delete the specified Scenario definition from a single scope. The response will return either detail of the deleted item, or an explanation (failure) as to why this did not succeed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.delete_scenario_with_http_info(scope, code, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The scope of the Scenario to delete. (required)

  • code (str) – The Scenario to delete. (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – Timeout setting. Do not use - use the opts parameter instead

  • opts (ConfigurationOptions, optional) – Configuration options for this request

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(AnnulSingleStructuredDataResponse, status_code(int), headers(HTTPHeaderDict))

get_scenario(scope, code, as_at=None, async_req=None, **kwargs)[source]

[EARLY ACCESS] GetScenario: Get Scenario # noqa: E501

Get a Scenario definition from a single scope. The response will return either the scenario that has been stored, or a failure explaining why the request was unsuccessful. # 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_scenario(scope, code, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The scope of the Scenario to retrieve. (required)

  • code (str) – The code of the Scenario to retrieve. (required)

  • as_at (datetime) – The asAt datetime at which to retrieve the Scenario. Defaults to return the latest version if not specified.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – Timeout setting. Do not use - use the opts parameter instead

  • opts (ConfigurationOptions, optional) – Configuration options for this request

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GetScenarioResponse

get_scenario_with_http_info(scope, code, as_at=None, **kwargs)[source]

[EARLY ACCESS] GetScenario: Get Scenario # noqa: E501

Get a Scenario definition from a single scope. The response will return either the scenario that has been stored, or a failure explaining why the request was unsuccessful. # 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_scenario_with_http_info(scope, code, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The scope of the Scenario to retrieve. (required)

  • code (str) – The code of the Scenario to retrieve. (required)

  • as_at (datetime) – The asAt datetime at which to retrieve the Scenario. Defaults to return the latest version if not specified.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – Timeout setting. Do not use - use the opts parameter instead

  • opts (ConfigurationOptions, optional) – Configuration options for this request

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(GetScenarioResponse, status_code(int), headers(HTTPHeaderDict))

list_scenarios(scope, as_at=None, filter=None, limit=None, page=None, async_req=None, **kwargs)[source]

[EARLY ACCESS] ListScenarios: List the set of Scenario definitions # noqa: E501

List the set of scenario definitions at the specified date/time and scope. # 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_scenarios(scope, as_at, filter, limit, page, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The scope to list scenarios for. (required)

  • as_at (datetime) – The asAt datetime at which to list the scenarios. Defaults to latest if not specified.

  • filter (str) – Expression to filter the result set.

  • limit (int) – Maximum number of results to return. Defaults to 100.

  • page (str) – Pagination token from a previous result to fetch the next page.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – Timeout setting. Do not use - use the opts parameter instead

  • opts (ConfigurationOptions, optional) – Configuration options for this request

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

PagedResourceListOfGetScenarioResponse

list_scenarios_with_http_info(scope, as_at=None, filter=None, limit=None, page=None, **kwargs)[source]

[EARLY ACCESS] ListScenarios: List the set of Scenario definitions # noqa: E501

List the set of scenario definitions at the specified date/time and scope. # 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_scenarios_with_http_info(scope, as_at, filter, limit, page, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The scope to list scenarios for. (required)

  • as_at (datetime) – The asAt datetime at which to list the scenarios. Defaults to latest if not specified.

  • filter (str) – Expression to filter the result set.

  • limit (int) – Maximum number of results to return. Defaults to 100.

  • page (str) – Pagination token from a previous result to fetch the next page.

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – Timeout setting. Do not use - use the opts parameter instead

  • opts (ConfigurationOptions, optional) – Configuration options for this request

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(PagedResourceListOfGetScenarioResponse, status_code(int), headers(HTTPHeaderDict))

upsert_scenario(upsert_scenario_request, async_req=None, **kwargs)[source]

[EARLY ACCESS] UpsertScenario: Upsert a Scenario. This creates or updates the scenario definition in LUSID. # noqa: E501

Update or insert one Scenario definition. An item will be updated if it already exists and inserted if it does not. The response will return the successfully updated or inserted scenario or failure message if unsuccessful. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.upsert_scenario(upsert_scenario_request, async_req=True)
>>> result = thread.get()
Parameters:
  • upsert_scenario_request (UpsertScenarioRequest) – The Scenario to update or insert (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _request_timeout – Timeout setting. Do not use - use the opts parameter instead

  • opts (ConfigurationOptions, optional) – Configuration options for this request

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

UpsertSingleStructuredDataResponse

upsert_scenario_with_http_info(upsert_scenario_request, **kwargs)[source]

[EARLY ACCESS] UpsertScenario: Upsert a Scenario. This creates or updates the scenario definition in LUSID. # noqa: E501

Update or insert one Scenario definition. An item will be updated if it already exists and inserted if it does not. The response will return the successfully updated or inserted scenario or failure message if unsuccessful. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.upsert_scenario_with_http_info(upsert_scenario_request, async_req=True)
>>> result = thread.get()
Parameters:
  • upsert_scenario_request (UpsertScenarioRequest) – The Scenario to update or insert (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the ApiResponse.data will be set to none and raw_data will store the HTTP response body without reading/decoding. Default is True.

  • _return_http_data_only (bool, optional) – response data instead of ApiResponse object with status code, headers, etc

  • _request_timeout – Timeout setting. Do not use - use the opts parameter instead

  • opts (ConfigurationOptions, optional) – Configuration options for this request

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

tuple(UpsertSingleStructuredDataResponse, status_code(int), headers(HTTPHeaderDict))