Get UILM File
Used to fetch translation key-value pairs for a specific language and module. This API returns a JSON object containing all translation keys and their corresponding values for the specified language, module, and project.
API Endpoint
| Property | Value |
|---|---|
| Request Method | GET |
| Request URL | https://api.seliseblocks.com/uilm/v1/Key/GetUilmFile |
Request
Request Example
curl -X GET 'https://api.seliseblocks.com/uilm/v1/Key/GetUilmFile?Language=en-US&ModuleName=common&ProjectKey=YOUR_PROJECT_KEY' \
-H 'accept: text/plain' \
-H "x-blocks-key": YOUR_PROJECT_KEY
Request Headers
| Field | Type | Description |
|---|---|---|
| accept | / | Accepted response format. |
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| Language | string | Yes | Language code (e.g., en-US, de-DE, bn-BD). Special case: Use key to display translation keys as values (e.g., APP_TODO: "APP_TODO"). This is useful when using the SELISE browser extension for development. Note: Before using key as a parameter, you must publish changes from SELISE Blocks Cloud. |
| ModuleName | string | Yes | Name of the module to fetch translations for (e.g. common). |
| ProjectKey | string | Yes | A unique identifier for the project. Maximum length: 64 characters. |
Response
Success Response
Returns a JSON object containing key-value pairs for translations with HTTP status 200 OK.
{
"PASSWORD_TEST99": "Password Test is going on",
"FORGOT_PASSWORD": "Forgot password?",
"SIGN_UP": "\nSign up",
"LOG_IN": "Log in ",
"ENTER_YOUR_EMAIL": "Enter your email",
"SUCCESS": "Success",
"RESET_PASSWORD": "Reset password",
"CHOOSE_PASSWORD_SECURE_ACCOUNT": "Choose password to secure your account",
"ENTER_YOUR_PASSWORD": "Enter your password",
"CONFIRM_PASSWORD": "Confirm password",
"CONFIRM_YOUR_PASSWORD": "Confirm your password",
"CONFIRM": "Confirm",
"MY_PROFILE": "My Profile",
"DEVICES": "Devices",
"MOBILE_NO": "Mobile No.",
"CHANGE_PASSWORD": "Change password",
"UPDATE_PASSWORD": "Update Password",
"DEVICE": "Device",
"EDIT": "Edit",
"ERROR": "Error",
"FULL_NAME": "Full Name",
"SAVE": "Save",
"EMAIL": "Email",
"PASSWORD": "Password"
}
Response Structure
The response is a flat JSON object where:
- Keys are translation identifiers (in UPPER_SNAKE_CASE format)
- Values are the translated text strings in the requested language
Failure Response
{
"code": 400,
"message": {
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"ModuleName": [
"The ModuleName field is required."
]
},
"traceId": TRACE_ID
}
}
note
If the x-blocks-key header is not included, the API will return a 200 OK response, but the data returned will not be specific to your project.
Error Response Fields
| Field | Type | Description |
|---|---|---|
| code | int | Error code. |
| message | string | Error message details. |
Error Codes
| Status Code | Description | Response Type |
|---|---|---|
| 400 | Language or module name is not defined | Bad Request |
| 401 | Project key is missing or invalid | Unauthorized |
| 404 | Endpoint URL is incorrect or resource not found | Not Found |
Usage Notes
- The response contains all translation keys for the specified module and language
- Translation keys are returned in a flat structure for easy lookup
- Empty or whitespace values may be present in some keys
- The number of keys returned depends on the module configuration
- Make sure to specify the correct language code format (e.g., en-US, not just en)
Development Mode with SELISE Browser Extension
For development and debugging purposes, you can use Language=key to retrieve translation keys as their own values:
# Development mode request
curl -X GET 'https://api.seliseblocks.com/uilm/v1/Key/GetUilmFile?Language=key&ModuleName=common&ProjectKey=YOUR_PROJECT_KEY' \
-H 'accept: */*'
-H "x-blocks-key": YOUR_PROJECT_KEY
This returns responses like:
{
"APP_TODO": "APP_TODO",
"DASHBOARD": "DASHBOARD",
"LOGIN": "LOGIN"
}
Setup steps:
- Add
keyas a language code in your project - Publish the changes in the cloud
- Use the SELISE browser extension to view translation keys in your application
- This helps identify which keys are being used where during development