sdk.lusid.api.allocations_api.AllocationsApi
- class AllocationsApi(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
[EARLY ACCESS] DeleteAllocation: Delete allocation # noqa: E501
[EARLY ACCESS] DeleteAllocation: Delete allocation # noqa: E501
[EARLY ACCESS] GetAllocation: Get Allocation # noqa: E501
[EARLY ACCESS] GetAllocation: Get Allocation # noqa: E501
ListAllocations: List Allocations # noqa: E501
ListAllocations: List Allocations # noqa: E501
UpsertAllocations: Upsert Allocations # noqa: E501
UpsertAllocations: Upsert Allocations # noqa: E501
- delete_allocation(scope, code, async_req=None, **kwargs)[source]
[EARLY ACCESS] DeleteAllocation: Delete allocation # noqa: E501
Delete an allocation. Deletion will be valid from the allocation’s creation datetime. This means that the allocation will no longer exist at any effective datetime from the asAt datetime of deletion. # 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_allocation(scope, code, async_req=True) >>> result = thread.get()
- Parameters:
scope (str) – The allocation scope. (required)
code (str) – The allocation’s code. This, together with the scope uniquely identifies the allocation 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:
- delete_allocation_with_http_info(scope, code, **kwargs)[source]
[EARLY ACCESS] DeleteAllocation: Delete allocation # noqa: E501
Delete an allocation. Deletion will be valid from the allocation’s creation datetime. This means that the allocation will no longer exist at any effective datetime from the asAt datetime of deletion. # 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_allocation_with_http_info(scope, code, async_req=True) >>> result = thread.get()
- Parameters:
scope (str) – The allocation scope. (required)
code (str) – The allocation’s code. This, together with the scope uniquely identifies the allocation 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(DeletedEntityResponse, status_code(int), headers(HTTPHeaderDict))
- get_allocation(scope, code, as_at=None, property_keys=None, async_req=None, **kwargs)[source]
[EARLY ACCESS] GetAllocation: Get Allocation # noqa: E501
Fetch an Allocation matching the provided identifier # 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_allocation(scope, code, as_at, property_keys, async_req=True) >>> result = thread.get()
- Parameters:
scope (str) – The scope to which the allocation belongs. (required)
code (str) – The allocation’s unique identifier. (required)
as_at (datetime) – The asAt datetime at which to retrieve the allocation. Defaults to return the latest version of the allocation if not specified.
property_keys (List[str]) – A list of property keys from the “Allocations” domain to decorate onto the allocation. These take the format {domain}/{scope}/{code} e.g. “Allocations/system/Name”.
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:
- get_allocation_with_http_info(scope, code, as_at=None, property_keys=None, **kwargs)[source]
[EARLY ACCESS] GetAllocation: Get Allocation # noqa: E501
Fetch an Allocation matching the provided identifier # 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_allocation_with_http_info(scope, code, as_at, property_keys, async_req=True) >>> result = thread.get()
- Parameters:
scope (str) – The scope to which the allocation belongs. (required)
code (str) – The allocation’s unique identifier. (required)
as_at (datetime) – The asAt datetime at which to retrieve the allocation. Defaults to return the latest version of the allocation if not specified.
property_keys (List[str]) – A list of property keys from the “Allocations” domain to decorate onto the allocation. These take the format {domain}/{scope}/{code} e.g. “Allocations/system/Name”.
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(Allocation, status_code(int), headers(HTTPHeaderDict))
- list_allocations(as_at=None, page=None, sort_by=None, limit=None, filter=None, property_keys=None, async_req=None, **kwargs)[source]
ListAllocations: List Allocations # noqa: E501
Fetch the last pre-AsAt date version of each allocation in scope (does not fetch the entire history). # 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_allocations(as_at, page, sort_by, limit, filter, property_keys, async_req=True) >>> result = thread.get()
- Parameters:
as_at (datetime) – The asAt datetime at which to retrieve the allocation. Defaults to return the latest version of the allocation if not specified.
page (str) – The pagination token to use to continue listing allocations from a previous call to list allocations. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request.
sort_by (List[str]) – A list of field names or properties to sort by, each suffixed by “ ASC” or “ DESC”.
limit (int) – When paginating, limit the number of returned results to this many.
filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid.
property_keys (List[str]) – A list of property keys from the “Allocations” domain to decorate onto each allocation. These take the format {domain}/{scope}/{code} e.g. “Allocations/system/Name”. All properties, except derived properties, are returned by default, without specifying here.
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:
- list_allocations_with_http_info(as_at=None, page=None, sort_by=None, limit=None, filter=None, property_keys=None, **kwargs)[source]
ListAllocations: List Allocations # noqa: E501
Fetch the last pre-AsAt date version of each allocation in scope (does not fetch the entire history). # 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_allocations_with_http_info(as_at, page, sort_by, limit, filter, property_keys, async_req=True) >>> result = thread.get()
- Parameters:
as_at (datetime) – The asAt datetime at which to retrieve the allocation. Defaults to return the latest version of the allocation if not specified.
page (str) – The pagination token to use to continue listing allocations from a previous call to list allocations. This value is returned from the previous call. If a pagination token is provided the sortBy, filter, effectiveAt, and asAt fields must not have changed since the original request.
sort_by (List[str]) – A list of field names or properties to sort by, each suffixed by “ ASC” or “ DESC”.
limit (int) – When paginating, limit the number of returned results to this many.
filter (str) – Expression to filter the result set. Read more about filtering results from LUSID here: https://support.lusid.com/filtering-results-from-lusid.
property_keys (List[str]) – A list of property keys from the “Allocations” domain to decorate onto each allocation. These take the format {domain}/{scope}/{code} e.g. “Allocations/system/Name”. All properties, except derived properties, are returned by default, without specifying here.
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(PagedResourceListOfAllocation, status_code(int), headers(HTTPHeaderDict))
- upsert_allocations(allocation_set_request, verification_as_at=None, retry_without_changed_entities=None, async_req=None, **kwargs)[source]
UpsertAllocations: Upsert Allocations # noqa: E501
Upsert; update existing allocations with given ids, or create new allocations otherwise. # 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_allocations(allocation_set_request, verification_as_at, retry_without_changed_entities, async_req=True) >>> result = thread.get()
- Parameters:
allocation_set_request (AllocationSetRequest) – The collection of allocation requests. (required)
verification_as_at (datetime) – An optional verification asAt; individual upserts will fail if an existing entity has been updated between the verification asAt and time of upsert.
retry_without_changed_entities (bool) – Optionally choose to keep retrying upsert for remaining entities if some are being updated concurrently. If set to true, any entities that have changed since the verificationAsAt will be dropped from the set of allocations to upsert and the upsert will be retried. The response will only contain the allocations in the original request that have been successfully upserted.
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:
- upsert_allocations_with_http_info(allocation_set_request, verification_as_at=None, retry_without_changed_entities=None, **kwargs)[source]
UpsertAllocations: Upsert Allocations # noqa: E501
Upsert; update existing allocations with given ids, or create new allocations otherwise. # 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_allocations_with_http_info(allocation_set_request, verification_as_at, retry_without_changed_entities, async_req=True) >>> result = thread.get()
- Parameters:
allocation_set_request (AllocationSetRequest) – The collection of allocation requests. (required)
verification_as_at (datetime) – An optional verification asAt; individual upserts will fail if an existing entity has been updated between the verification asAt and time of upsert.
retry_without_changed_entities (bool) – Optionally choose to keep retrying upsert for remaining entities if some are being updated concurrently. If set to true, any entities that have changed since the verificationAsAt will be dropped from the set of allocations to upsert and the upsert will be retried. The response will only contain the allocations in the original request that have been successfully upserted.
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(ResourceListOfAllocation, status_code(int), headers(HTTPHeaderDict))