Abstract class for REST webservices
Import selected translations for language specified in fileName from uploadFile - language is taken from fileName prefix getFirst, if it's not matched it's taken from hidden "Language" sheet in file
name | type | description | constraints |
---|---|---|---|
activities | query | boolean | |
activitymessages | query | boolean | |
dictionaries | query | if true, dictionaries translations are imported | boolean |
errorcodes | query | if true, errorCodes translations are imported | boolean |
fields | query | if true, fields translations are imported | boolean |
legendtexts | query | if true, legendTexts translations are imported | boolean |
objectclasses | query | if true, objectClasses translations are imported | boolean |
units | query | if true, units units are imported | boolean |
media type | data type | description |
---|---|---|
multipart/form-data | (custom) | request with upload file and selected translations in queryString, if all translation flags are false, all translations are imported |
media type | data type | description |
---|---|---|
application/json | object (JSON) | JSON response with detailed import report
Example of response:
{"list":[{"errorMessage":"No Translations found for this type in import file","errorCodeNumber":10919,"errorCode":"NoTranslationsError","errorContext":"errorcodes Translations Import","errorLevel":"Critical"},{"errorMessage":"Successfully updated ReferenceValue Contract translation with Kontrakt2 for contract","errorCodeNumber":10916,"errorCode":"TranslationUpdateSuccessful","errorContext":"objectclasses Translations Import","errorLevel":"Info"},{"errorMessage":"Successfully updated ReferenceValue inch translation with cal for 1","errorCodeNumber":10916,"errorCode":"TranslationUpdateSuccessful","errorContext":"units Translations Import","errorLevel":"Info"},{"errorMessage":"Successfully updated ReferenceValue foot translation with stopa for 2","errorCodeNumber":10916,"errorCode":"TranslationUpdateSuccessful","errorContext":"units Translations Import","errorLevel":"Info"},{"errorMessage":"Successfully updated ReferenceValue yard translation with jarddd for 3","errorCodeNumber":10916,"errorCode":"TranslationUpdateSuccessful","errorContext":"units Translations Import","errorLevel":"Info"},{"errorMessage":"Successfully updated ReferenceValue mile translation with mila for 4","errorCodeNumber":10916,"errorCode":"TranslationUpdateSuccessful","errorContext":"units Translations Import","errorLevel":"Info"},{"errorMessage":"Successfully updated ReferenceValue centimeter translation with centymetr for 6","errorCodeNumber":10916,"errorCode":"TranslationUpdateSuccessful","errorContext":"units Translations Import","errorLevel":"Info"},{"errorMessage":"Successfully updated ReferenceValue meter translation with metr for 7","errorCodeNumber":10916,"errorCode":"TranslationUpdateSuccessful","errorContext":"units Translations Import","errorLevel":"Info"},{"errorMessage":"Successfully updated ReferenceValue kilometer translation with kilometr for 8","errorCodeNumber":10916,"errorCode":"TranslationUpdateSuccessful","errorContext":"units Translations Import","errorLevel":"Info"},{"errorMessage":"No Translations found for this type in import file","errorCodeNumber":10919,"errorCode":"NoTranslationsError","errorContext":"fields Translations Import","errorLevel":"Critical"},{"errorMessage":"No Translations found for this type in import file","errorCodeNumber":10919,"errorCode":"NoTranslationsError","errorContext":"dictionaries Translations Import","errorLevel":"Critical"}],"success":true}
|
POST /api/admin/translation/import
Content-Type: multipart/form-data
Accept: application/json
HTTP/1.1 201 Created
Content-Type: application/json
...
name | type | description |
---|---|---|
labelType | path |
media type | data type | description |
---|---|---|
application/json | object (JSON) |
GET /api/admin/translation/json/{labelType}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Get xls file with selected translations for language. If all translation flags are false, all translations are exported
name | type | description | constraints |
---|---|---|---|
langId | path | Language Id | int |
activities | query | boolean | |
activitymessages | query | boolean | |
dictionaries | query | if true, dictionaries translations are exported | boolean |
errorcodes | query | if true, errorCodes translations are exported | boolean |
fields | query | if true, fields translations are exported | boolean |
legendtexts | query | if true, legendTexts translations are exported | boolean |
objectclasses | query | if true, objectClasses translations are exported | boolean |
units | query | if true, units units are exported | boolean |
media type | data type | description |
---|---|---|
application/vnd.ms-excel | object | xls file with selected translations for given language |
GET /api/admin/translation/export/xls/{langId}
Content-Type: */*
Accept: application/vnd.ms-excel
...
HTTP/1.1 200 OK
Content-Type: application/vnd.ms-excel
...
name | type | description |
---|---|---|
langId | path |
media type | data type | description |
---|---|---|
application/json | object (JSON) |
POST /api/admin/translation/export/xls/{langId}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 201 Created
Content-Type: application/json
...
name | type | description | constraints |
---|---|---|---|
labelType | path | ||
langId | path | int |
media type | data type |
---|---|
application/json | HdcLabelTranslationsTO (JSON) |
media type | data type | description |
---|---|---|
application/json | HdcLabelTranslationsTO (JSON) |
PUT /api/admin/translation/json/{labelType}/{langId}
Content-Type: application/json
Accept: application/json
{ }
HTTP/1.1 204 No Content
Content-Type: application/json
{ }