sdk.lusid.api.scripted_translation_api.ScriptedTranslationApi

class ScriptedTranslationApi(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

get_translation_dialect

[EARLY ACCESS] GetTranslationDialect: Get a dialect.

get_translation_dialect_with_http_info

[EARLY ACCESS] GetTranslationDialect: Get a dialect.

get_translation_script

[EARLY ACCESS] GetTranslationScript: Retrieve a translation script by its identifier.

get_translation_script_with_http_info

[EARLY ACCESS] GetTranslationScript: Retrieve a translation script by its identifier.

list_dialect_ids

[EARLY ACCESS] ListDialectIds: List dialect identifiers matching an optional filter.

list_dialect_ids_with_http_info

[EARLY ACCESS] ListDialectIds: List dialect identifiers matching an optional filter.

list_translation_script_ids

[EARLY ACCESS] ListTranslationScriptIds: List translation script identifiers.

list_translation_script_ids_with_http_info

[EARLY ACCESS] ListTranslationScriptIds: List translation script identifiers.

translate_entities

[EARLY ACCESS] TranslateEntities: Translate a collection of entities with a specified translation script.

translate_entities_inlined

[EARLY ACCESS] TranslateEntitiesInlined: Translate a collection of entities, inlining the body of the translation script.

translate_entities_inlined_with_http_info

[EARLY ACCESS] TranslateEntitiesInlined: Translate a collection of entities, inlining the body of the translation script.

translate_entities_with_http_info

[EARLY ACCESS] TranslateEntities: Translate a collection of entities with a specified translation script.

upsert_translation_dialect

[EARLY ACCESS] UpsertTranslationDialect: Upsert a Dialect.

upsert_translation_dialect_with_http_info

[EARLY ACCESS] UpsertTranslationDialect: Upsert a Dialect.

upsert_translation_script

[EARLY ACCESS] UpsertTranslationScript: Upsert a translation script.

upsert_translation_script_with_http_info

[EARLY ACCESS] UpsertTranslationScript: Upsert a translation script.

get_translation_dialect(scope, vendor, source_system, entity_type, serialisation_format, version, as_at=None, async_req=None, **kwargs)[source]

[EARLY ACCESS] GetTranslationDialect: Get a dialect. # noqa: E501

Get the dialect with the given identifier at the specific asAt time. # 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_translation_dialect(scope, vendor, source_system, entity_type, serialisation_format, version, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The scope of the dialect. (required)

  • vendor (str) – The vendor of the dialect, the entity that created it. e.g. ISDA, FINBOURNE. (required)

  • source_system (str) – The source system of the dialect, the system that understands it. e.g. LUSID, QuantLib. (required)

  • entity_type (str) – The type of entity this dialect describes e.g. Instrument. (required)

  • serialisation_format (str) – The serialisation format of a document in this dialect. e.g. JSON, XML. (required)

  • version (str) – The semantic version of the dialect: MAJOR.MINOR.PATCH. (required)

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

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

  • _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.

Returns:

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

Return type:

Dialect

get_translation_dialect_with_http_info(scope, vendor, source_system, entity_type, serialisation_format, version, as_at=None, **kwargs)[source]

[EARLY ACCESS] GetTranslationDialect: Get a dialect. # noqa: E501

Get the dialect with the given identifier at the specific asAt time. # 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_translation_dialect_with_http_info(scope, vendor, source_system, entity_type, serialisation_format, version, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – The scope of the dialect. (required)

  • vendor (str) – The vendor of the dialect, the entity that created it. e.g. ISDA, FINBOURNE. (required)

  • source_system (str) – The source system of the dialect, the system that understands it. e.g. LUSID, QuantLib. (required)

  • entity_type (str) – The type of entity this dialect describes e.g. Instrument. (required)

  • serialisation_format (str) – The serialisation format of a document in this dialect. e.g. JSON, XML. (required)

  • version (str) – The semantic version of the dialect: MAJOR.MINOR.PATCH. (required)

  • as_at (datetime) – The asAt datetime at which to retrieve the dialect. Defaults to return the latest version of the dialect 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 for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _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(Dialect, status_code(int), headers(HTTPHeaderDict))

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

[EARLY ACCESS] GetTranslationScript: Retrieve a translation script by its identifier. # noqa: E501

Retrieves a translation script to be used for translating financial entities. # 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_translation_script(scope, code, version, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the translation script. (required)

  • code (str) – Code of the translation script. (required)

  • version (str) – Semantic version of the translation script. (required)

  • as_at (datetime) – The asAt datetime at which to retrieve the translation script. Defaults to latest.

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

  • _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.

Returns:

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

Return type:

TranslationScript

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

[EARLY ACCESS] GetTranslationScript: Retrieve a translation script by its identifier. # noqa: E501

Retrieves a translation script to be used for translating financial entities. # 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_translation_script_with_http_info(scope, code, version, as_at, async_req=True)
>>> result = thread.get()
Parameters:
  • scope (str) – Scope of the translation script. (required)

  • code (str) – Code of the translation script. (required)

  • version (str) – Semantic version of the translation script. (required)

  • as_at (datetime) – The asAt datetime at which to retrieve the translation script. Defaults to latest.

  • 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 for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _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(TranslationScript, status_code(int), headers(HTTPHeaderDict))

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

[EARLY ACCESS] ListDialectIds: List dialect identifiers matching an optional filter. # noqa: E501

List the stored dialects’ identifiers with pagination and filtering at the specified asAt time. # 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_dialect_ids(as_at, page, limit, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • as_at (datetime) – The asAt datetime at which to retrieve the dialects. Defaults to return the latest version of the dialect if not specified.

  • page (str) – The pagination token to use to continue listing dialect IDs from a previous call to list dialect IDs. This value is returned from the previous call. If a pagination token is provided the filter and asAt fields must not have changed since the original request.

  • 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.

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

  • _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.

Returns:

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

Return type:

PagedResourceListOfDialectId

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

[EARLY ACCESS] ListDialectIds: List dialect identifiers matching an optional filter. # noqa: E501

List the stored dialects’ identifiers with pagination and filtering at the specified asAt time. # 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_dialect_ids_with_http_info(as_at, page, limit, filter, async_req=True)
>>> result = thread.get()
Parameters:
  • as_at (datetime) – The asAt datetime at which to retrieve the dialects. Defaults to return the latest version of the dialect if not specified.

  • page (str) – The pagination token to use to continue listing dialect IDs from a previous call to list dialect IDs. This value is returned from the previous call. If a pagination token is provided the filter and asAt fields must not have changed since the original request.

  • 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.

  • 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 for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _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(PagedResourceListOfDialectId, status_code(int), headers(HTTPHeaderDict))

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

[EARLY ACCESS] ListTranslationScriptIds: List translation script identifiers. # noqa: E501

List translation script ids. # 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_translation_script_ids(as_at, limit, filter, page, async_req=True)
>>> result = thread.get()
Parameters:
  • as_at (datetime) – The asAt datetime at which to retrieve the script identifiers. Defaults to latest.

  • limit (int) – When paginating, limit the results to this number. Defaults to 100 if not specified.

  • filter (str) – Expression to filter the results. For example, Id.Version.Major eq 1 to list IDs with major version 1 or Id.Scope eq ‘my-scripts’ to list result only for a particular scope.

  • page (str) – The pagination token to use to continue listing translation script IDs; this value is returned from the previous call. If a pagination token is provided, the filter field must not have changed since the original request.

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

  • _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.

Returns:

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

Return type:

PagedResourceListOfTranslationScriptId

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

[EARLY ACCESS] ListTranslationScriptIds: List translation script identifiers. # noqa: E501

List translation script ids. # 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_translation_script_ids_with_http_info(as_at, limit, filter, page, async_req=True)
>>> result = thread.get()
Parameters:
  • as_at (datetime) – The asAt datetime at which to retrieve the script identifiers. Defaults to latest.

  • limit (int) – When paginating, limit the results to this number. Defaults to 100 if not specified.

  • filter (str) – Expression to filter the results. For example, Id.Version.Major eq 1 to list IDs with major version 1 or Id.Scope eq ‘my-scripts’ to list result only for a particular scope.

  • page (str) – The pagination token to use to continue listing translation script IDs; this value is returned from the previous call. If a pagination token is provided, the filter field must not have changed since the original request.

  • 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 for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _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(PagedResourceListOfTranslationScriptId, status_code(int), headers(HTTPHeaderDict))

translate_entities(translate_entities_request, async_req=None, **kwargs)[source]

[EARLY ACCESS] TranslateEntities: Translate a collection of entities with a specified translation script. # noqa: E501

Run the provided translation request. The entities to translate are specified in the request body as a dictionary with (ephemeral) unique correlation IDs. The script to use and optional dialect to validate results against are sourced from the database. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.translate_entities(translate_entities_request, async_req=True)
>>> result = thread.get()
Parameters:
  • translate_entities_request (TranslateEntitiesRequest) – The entities to translate, along with identifiers for the script and (optional) dialect to use. (required)

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

  • _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.

Returns:

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

Return type:

TranslateEntitiesResponse

translate_entities_inlined(translate_entities_inlined_request, async_req=None, **kwargs)[source]

[EARLY ACCESS] TranslateEntitiesInlined: Translate a collection of entities, inlining the body of the translation script. # noqa: E501

Run the provided translation request. The entities to translate, script to use and dialect to validate results against are all specified in the request body. The entities are given as a dictionary with (ephemeral) unique correlation IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.translate_entities_inlined(translate_entities_inlined_request, async_req=True)
>>> result = thread.get()
Parameters:
  • translate_entities_inlined_request (TranslateEntitiesInlinedRequest) – The entities to translate, along with the script to use and an optional schema for validation. (required)

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

  • _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.

Returns:

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

Return type:

TranslateEntitiesResponse

translate_entities_inlined_with_http_info(translate_entities_inlined_request, **kwargs)[source]

[EARLY ACCESS] TranslateEntitiesInlined: Translate a collection of entities, inlining the body of the translation script. # noqa: E501

Run the provided translation request. The entities to translate, script to use and dialect to validate results against are all specified in the request body. The entities are given as a dictionary with (ephemeral) unique correlation IDs. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.translate_entities_inlined_with_http_info(translate_entities_inlined_request, async_req=True)
>>> result = thread.get()
Parameters:
  • translate_entities_inlined_request (TranslateEntitiesInlinedRequest) – The entities to translate, along with the script to use and an optional schema for validation. (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 for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _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(TranslateEntitiesResponse, status_code(int), headers(HTTPHeaderDict))

translate_entities_with_http_info(translate_entities_request, **kwargs)[source]

[EARLY ACCESS] TranslateEntities: Translate a collection of entities with a specified translation script. # noqa: E501

Run the provided translation request. The entities to translate are specified in the request body as a dictionary with (ephemeral) unique correlation IDs. The script to use and optional dialect to validate results against are sourced from the database. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.translate_entities_with_http_info(translate_entities_request, async_req=True)
>>> result = thread.get()
Parameters:
  • translate_entities_request (TranslateEntitiesRequest) – The entities to translate, along with identifiers for the script and (optional) dialect to use. (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 for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _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(TranslateEntitiesResponse, status_code(int), headers(HTTPHeaderDict))

upsert_translation_dialect(upsert_dialect_request, async_req=None, **kwargs)[source]

[EARLY ACCESS] UpsertTranslationDialect: Upsert a Dialect. # noqa: E501

Upsert the given dialect. # 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_translation_dialect(upsert_dialect_request, async_req=True)
>>> result = thread.get()
Parameters:
  • upsert_dialect_request (UpsertDialectRequest) – The dialect to upsert. (required)

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

  • _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.

Returns:

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

Return type:

Dialect

upsert_translation_dialect_with_http_info(upsert_dialect_request, **kwargs)[source]

[EARLY ACCESS] UpsertTranslationDialect: Upsert a Dialect. # noqa: E501

Upsert the given dialect. # 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_translation_dialect_with_http_info(upsert_dialect_request, async_req=True)
>>> result = thread.get()
Parameters:
  • upsert_dialect_request (UpsertDialectRequest) – The dialect to upsert. (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 for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _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(Dialect, status_code(int), headers(HTTPHeaderDict))

upsert_translation_script(upsert_translation_script_request, async_req=None, **kwargs)[source]

[EARLY ACCESS] UpsertTranslationScript: Upsert a translation script. # noqa: E501

Upserts a translation script to be used for translating financial entities. # 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_translation_script(upsert_translation_script_request, async_req=True)
>>> result = thread.get()
Parameters:
  • upsert_translation_script_request (UpsertTranslationScriptRequest) – The translation script to be upserted. (required)

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

  • _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.

Returns:

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

Return type:

TranslationScript

upsert_translation_script_with_http_info(upsert_translation_script_request, **kwargs)[source]

[EARLY ACCESS] UpsertTranslationScript: Upsert a translation script. # noqa: E501

Upserts a translation script to be used for translating financial entities. # 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_translation_script_with_http_info(upsert_translation_script_request, async_req=True)
>>> result = thread.get()
Parameters:
  • upsert_translation_script_request (UpsertTranslationScriptRequest) – The translation script to be upserted. (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 for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _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(TranslationScript, status_code(int), headers(HTTPHeaderDict))