3.8 Localsettings

Getting current settings

Get the current Local settings values. 

URL:

https://{{ip_addr}}/api/v1/localsettings

HTTP method:

GET

Response code:

Standard HTTP response code, treating syntactic errors.

Response data:

{
    "data": {
        "language": {
            "id": "en-US",
            "name": "English (United States)"
        },
        "time": {
            "dateTime": "10/11/19 8:46 AM",
            "is24hourFormatUsed": false,
            "isNetworkTimeUsed": true,
            "isoDateTime": "2019-10-11T08:46:27+0000",
            "timeZone": {
                "id": 27,
                "name": "GMT +00:00 Coordinated universal time (GMT)"
            }
        },
        "weather": {
            "location": "Prague,CZ",
            "source": "www.openweathermap.org",
            "unit": 0,
            "updatePeriod": 0
        }
    }
}

Section setting

URL:

https://{{ip_addr}}/api/v1/localsettings

HTTP method:

PUT

Response code:

Standard HTTP response code, treating syntactic errors.

Request body:
 {
    "language": {
        "id": "<string>",
        "name": "<string>"
    },
    "time": {
        "timeZone": {
            "id": "<integer>",
            "name": "<string>"
        },
        "isNetworkTimeUsed": "<boolean>",
        "dateTime": "<string>",
        "isoDateTime": "<string>",
        "is24hourFormatUsed": "<boolean>"
    },
    "weather": {
        "location": "<string>",
        "source": "<string>",
        "unit": "<integer>",
        "updatePeriod": "<integer>"
    }
}

Response data:

 {{
    "data": {
        "language": {
            "id": "en-US",
            "name": "English (United States)"
        },
        "time": {
            "dateTime": "10/15/19 11:54 AM",
            "is24hourFormatUsed": false,
            "isNetworkTimeUsed": true,
            "isoDateTime": "2019-10-15T11:54:54+0000",
            "timeZone": {
                "id": 27,
                "name": "GMT +00:00 Coordinated universal time (GMT)"
            }
        },
        "weather": {
            "location": "Prague,CZ",
            "source": "www.openweathermap.org",
            "unit": 0,
            "updatePeriod": 0
        }
    }
}

Getting list of available languages

URL:

https://{{ip_addr}}/api/v1/localsettings/languages

HTTP method:

GET

Response code:

Standard HTTP response code, treating syntactic errors.

Response data:

{
    "data": {
        "languages": [
            {
                "id": "af-ZA",
                "name": "Afrikaans"
            },
            {
                "id": "az-AZ",
                "name": "Azərbaycan"
            },
    ...
            {
                "id": "ja-JP",
                "name": "日本語"
            }
        ]
    }
}

Getting list of available time zones

URL:

https://{{ip_addr}}/api/v1/localsettings/timezones

HTTP method:

GET

Response code:

Standard HTTP response code, treating syntactic errors.

Response data:

{
    "data": {
        "timezones": [
            {
                "id": 0,
                "name": "GMT -11:00 Midway Island (Pacific/Midway)"
            },
            {
                "id": 1,
                "name": "GMT -10:00 Hawaii (Pacific/Honolulu)"
            },
            ...
            {
                "id": 84,
                "name": "GMT +13:00 Tonga (Pacific/Tongatapu)"
            }
        ]
    }
}