All URIs are relative to https://lilt.com/2
Method | HTTP request | Description |
---|---|---|
getOrganizationSettings | GET /settings/organization | Get organization-level settings |
getProjectSettings | GET /settings/project/{projectId} | Get settings for a project |
getUserSettings | GET /settings/user | Get settings for the authenticated user |
upsertSetting | POST /settings | Update or create a setting |
{String: Setting} getOrganizationSettings()
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>' \ ```
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.SettingsApi();
apiInstance.getOrganizationSettings().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
{String: Setting} getProjectSettings(projectId)
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>' \ ```
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.SettingsApi();
let projectId = 56; // Number | A project id.
apiInstance.getProjectSettings(projectId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
projectId | Number | A project id. |
- Content-Type: Not defined
- Accept: application/json
{String: Setting} getUserSettings()
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>' \ ```
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.SettingsApi();
apiInstance.getUserSettings().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
SettingUpsertResponse upsertSetting(opts)
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" }' ```
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.SettingsApi();
let opts = {
'body': new LiltNode.SettingUpsertBody() // SettingUpsertBody |
};
apiInstance.upsertSetting(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
body | SettingUpsertBody | [optional] |
- Content-Type: application/json
- Accept: application/json