Skip to main content
Version: 4.x

List Maintenance Windows

Lists the maintenance windows of a cluster.

Request

Basic information
HTTP URLhttps://cloud-api.celerdata.com/api/1.0/clusters/:cluster_id/maintenance-windows
HTTP methodGET
Frequency600/minute

Path variables

ParameterExample valueRequiredTypeDescription
cluster_id4ae48a3f-f840-46fa-b0e7-0709a220fa40YesStringThe ID of the cluster. You can sign in to the PhoenixAI Cloud console and then navigate to the Cluster properties section of the cluster's Overview page to obtain the cluster ID.

:<variable_name> indicates a URL path variable in web development tools such as Postman. :cluster_id in the above URL path, as such, indicates the ID of the cluster you want to suspend. However, if you use other tools such as curl, you need to replace :cluster_id with the actual cluster ID by hand in the curl command.

Header parameters

ParameterExample valueRequiredTypeDescription
AuthorizationBearer OGQ5MDA4MZGTNJMWNS0ZY2Y2LWFJNZYTOTBINMZIYTGZZDUYYesStringThe access token used to access the PhoenixAI Cloud API. Format: Bearer <access_token>.

See Obtain access token.

Request body

{
"window_type": "WEEKLY"
}
ParameterExample valueRequiredTypeDescription
window_type"WEEKLY"NoSTRINGLists only certain type of the maintenance window. Valid values: WEEKLY and MONTHLY. If it is not specified, all types of windows are returned.

Response

Sample response

{
"code": 20000,
"data": {
"windows": [
{
"window_id": "w-1a2b3c",
"cluster_id": "c-9f8e7d",
"window_type": "WEEKLY",
"day_of_week": "SUNDAY",
"day_of_month": 0,
"start_time": "02:00",
"end_time": "05:00",
"timezone": "America/Los_Angeles",
"enabled": true
},
{
"window_id": "w-4d5e6f",
"cluster_id": "c-9f8e7d",
"window_type": "WEEKLY",
"day_of_week": "MONDAY",
"day_of_month": 0,
"start_time": "01:00",
"end_time": "04:00",
"timezone": "America/Los_Angeles",
"enabled": true
}
]
}
}

Response elements

ParameterExample valueTypeDescription
code20000IntegerThe error code. If the error code returned is 20000, the request succeeded. If any other error code is returned, the request failed.
data-ObjectThe result of the API call. The data object may not be returned for some API actions. It returns the object of window information.
data.windows-ArrayArray of window information
data.windows.window_idw-1a2b3cStringThe ID of the window.
data.windows.cluster_id-StringThe ID of the cluster.
data.windows.window_type"WEEKLY"STRINGThe recurrence of the maintenance window.
data.windows.day_of_week"SUNDAY"STRINGDay of the week if window_type is WEEKLY.
data.windows.day_of_month15IntegerDay of the month if window_type is MONTHLY.
data.windows.start_time"01:00"STRINGThe start time of the window.
data.windows.end_time"04:00"STRINGThe end time of the window.
data.windows.timezone"America/Los_Angeles"STRINGIANA zone name.
data.windows.enabledtrueBOOLEANWhether the window is enabled.