lilt-python

API bindings for the Lilt REST API.

View the Project on GitHub lilt/lilt-python

lilt.SettingsApi

All URIs are relative to https://lilt.com/2

Method HTTP request Description
get_organization_settings GET /settings/organization Get organization-level settings
get_project_settings GET /settings/project/{projectId} Get settings for a project
get_user_settings GET /settings/user Get settings for the authenticated user
upsert_setting POST /settings Update or create a setting

get_organization_settings

dict(str, Setting) get_organization_settings()

Get organization-level settings

Get the organization-level settings for the active users organization Example CURL: curl --location --request GET 'https://lilt.com/2/settings/organization?key=<API_KEY>' \\

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure API key authorization: ApiKeyAuth

configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix[‘key’] = ‘Bearer’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.SettingsApi(api_client)

try:
    # Get organization-level settings
    api_response = api_instance.get_organization_settings()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SettingsApi->get_organization_settings: %s\n" % e) ```

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure API key authorization: ApiKeyAuth

configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix[‘key’] = ‘Bearer’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.SettingsApi(api_client)

try:
    # Get organization-level settings
    api_response = api_instance.get_organization_settings()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SettingsApi->get_organization_settings: %s\n" % e) ```

Parameters

This endpoint does not need any parameter.

Return type

dict(str, Setting)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Organization settings dictionary. | - | 0 | Unexpected error | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_project_settings

dict(str, Setting) get_project_settings(project_id)

Get settings for a project

Get the settings as applied to a specific project. Active settings will combine project-level settings, organization-level settings and fallback to setting default values. Example CURL: curl --location --request GET 'https://lilt.com/2/settings/project/123?key=<API_KEY>' \\

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure API key authorization: ApiKeyAuth

configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix[‘key’] = ‘Bearer’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.SettingsApi(api_client) project_id = 56 # int | A project id.

try:
    # Get settings for a project
    api_response = api_instance.get_project_settings(project_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SettingsApi->get_project_settings: %s\n" % e) ```

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure API key authorization: ApiKeyAuth

configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix[‘key’] = ‘Bearer’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.SettingsApi(api_client) project_id = 56 # int | A project id.

try:
    # Get settings for a project
    api_response = api_instance.get_project_settings(project_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SettingsApi->get_project_settings: %s\n" % e) ```

Parameters

Name Type Description Notes
project_id int A project id.  

Return type

dict(str, Setting)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Project settings dictionary. | - | 0 | Unexpected error | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_user_settings

dict(str, Setting) get_user_settings()

Get settings for the authenticated user

Get the active settings applied to the authenticated user. Example CURL: curl --location --request GET 'https://lilt.com/2/settings/user?key=<API_KEY>' \\

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure API key authorization: ApiKeyAuth

configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix[‘key’] = ‘Bearer’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.SettingsApi(api_client)

try:
    # Get settings for the authenticated  user
    api_response = api_instance.get_user_settings()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SettingsApi->get_user_settings: %s\n" % e) ```

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure API key authorization: ApiKeyAuth

configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix[‘key’] = ‘Bearer’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.SettingsApi(api_client)

try:
    # Get settings for the authenticated  user
    api_response = api_instance.get_user_settings()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SettingsApi->get_user_settings: %s\n" % e) ```

Parameters

This endpoint does not need any parameter.

Return type

dict(str, Setting)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Settings dictionary. | - | 0 | Unexpected error | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]

upsert_setting

SettingUpsertResponse upsert_setting(body=body)

Update or create a setting

Create or update the value for the given setting and setting scope. Example CURL to set an organization-level setting: curl --location --request POST 'https://lilt.com/2/settings?key=<API_KEY>' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"settingName\": \"requireBatchQaTranslator\", \"value\": false, \"organizationId\": 285, \"scope\": \"Organization\" }'

Example

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure API key authorization: ApiKeyAuth

configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix[‘key’] = ‘Bearer’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.SettingsApi(api_client) body = lilt.SettingUpsertBody() # SettingUpsertBody | (optional)

try:
    # Update or create a setting
    api_response = api_instance.upsert_setting(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SettingsApi->upsert_setting: %s\n" % e) ```

The client must configure the authentication and authorization parameters

in accordance with the API server security policy.

Examples for each auth method are provided below, use the example that

satisfies your auth use case.

Configure API key authorization: ApiKeyAuth

configuration = lilt.Configuration( host = “https://lilt.com/2”, api_key = { ‘key’: ‘YOUR_API_KEY’ } )

Uncomment below to setup prefix (e.g. Bearer) for API key, if needed

configuration.api_key_prefix[‘key’] = ‘Bearer’

Configure HTTP basic authorization: BasicAuth

configuration = lilt.Configuration( username = ‘YOUR_USERNAME’, password = ‘YOUR_PASSWORD’ )

Enter a context with an instance of the API client

with lilt.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = lilt.SettingsApi(api_client) body = lilt.SettingUpsertBody() # SettingUpsertBody | (optional)

try:
    # Update or create a setting
    api_response = api_instance.upsert_setting(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SettingsApi->upsert_setting: %s\n" % e) ```

Parameters

Name Type Description Notes
body SettingUpsertBody   [optional]

Return type

SettingUpsertResponse

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | Updated settings object and updated active settings. | - | 0 | Unexpected error | - |

[Back to top] [Back to API list] [Back to Model list] [Back to README]