Overview
The Timezone API provides a set of endpoints to retrieve all the available time zones in your account.
Use cases
Use the Timezone API to retrieve the local time when a monitor performs checks or receives alerts, including daylight saving time (DST), if applicable. Use this along with the GET /Account/Settings API endpoint to retrieve the time zone ID used in your account.
Prerequisites
Before using the Timezone API, make sure that you have:
- An Enterprise account
- Uptrends API credentials
Timezone API fields
When working with the Timezone API endpoints, the Timezone object contains various API fields:
Field name | Description |
---|---|
TimezoneId |
The unique identifier of the time zone. |
Description |
The name of the time zone. |
OffsetFromUtc |
The difference between the account’s local time and UTC in minutes. If the local time is behind UTC, the value shows a negative offset. |
HasDaylightSaving |
Indicates true if the time zone has DST, otherwise, false . |
DaylightSavingOffset |
The difference between the standard time and the DST time in minutes. |
DaylightSavingStart |
The date and timestamp of when the DST starts. |
DaylightSavingEnd |
The date and timestamp of when the DST ends. |
For a complete list of available API fields, refer to the Timezone API fields.
Timezone API endpoints
The Timezone API provides the following endpoints:
Method | Endpoint | Description |
---|---|---|
GET |
/Timezone |
Retrieve a list of all the available time zones and their configuration. |
GET |
/Timezone/{timezoneId} |
Retrieve the specified time zone and its configuration. |
For detailed request and response formats and interactive API testing, refer to the Uptrends Timezone API documentation.
Troubleshooting
This section covers common HTTP errors and troubleshooting steps for the Timezone API.
Common errors
Common HTTP status codes and their descriptions:
Status Code | Description |
---|---|
200 | OK — request successful. |
400 | Bad request — invalid request parameters or missing required fields. |
401 | Unauthorized — invalid or missing authentication credentials. |
404 | Not Found — the specified timezone ID does not exist. |
500 | Internal Server Error — a server-side error occurred. |
General troubleshooting guide
Ensure that you:
- Always validate your request data before sending API calls.
- Use appropriate HTTP methods for each operation.
For further assistance, please reach out to our Support team.
Additional articles
For more details, refer to the following articles:
- Uptrends Timezone API documentation — an interactive API documentation with detailed endpoint specifications.
- API changelog - for latest API updates and deprecation notices.