> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.megaport.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.megaport.ferndocs.com/_mcp/server.

# Maintenance Events

GET https://api.megaport.com/ens/v1/status/maintenance

Returns details about maintenance events, filtered by the specified state value.

The following information is returned for maintenance events in the response, with some fields being optional and only included under certain conditions. For example, `cancelReason` is returned only if the event is canceled.

- `eventId` - Ticket number against which a particular event is created.
    
- `state` - Current state of the event.
    
- `startTime` - Event start time in ISO 8601 UTC format (yyyy-MM-dd'T'HH:mm:ss.SSSX).
    
- `endTime` - Event end time in ISO 8601 UTC format (yyyy-MM-dd'T'HH:mm:ss.SSSX).
    
- `impact` - Impact of the event on the services, if any.
    
- `purpose` - Reason why this event is created.
    
- `cancelReason` - Field returned if the event is canceled, stating the cancellation reason.
    
- `eventType` - If the event is created on short notice, the event type is "Emergency"; otherwise, it is a "Planned" event.
    
- `services` - List of services affected by the event, containing the short UUIDs of the services.

Reference: https://en.megaport.ferndocs.com/api-reference/maintenance-and-outage-events/maintenance-events

## Servers

- `https://api.megaport.com` (Production environment, default)
- `https://api-staging.megaport.com` (Staging environment (test only, reset every 24 hours))

## Request

### Query parameters

- `state` (string, optional) — Filter by the state of the maintenance event. The values for state are "Completed", "Cancelled", "Scheduled" and "Running". If you don't specify a value, the default is "Running". Values are case-insensitive. (Optional).

## Response

### 200

Maintenance Events - Scheduled / Maintenance Events - Managed Account / Maintenance Events - Managed Account / Maintenance Events - Scheduled

- `list of EnsV1StatusMaintenanceGetResponsesContentApplicationJsonSchemaItems`

## Types

### EnsV1StatusMaintenanceGetResponsesContentApplicationJsonSchemaItems

- `cancelReason` (string, optional)
- `endTime` (string, optional)
- `eventId` (string, optional)
- `eventType` (string, optional)
- `impact` (string, optional)
- `purpose` (string, optional)
- `services` (list of string, optional)
- `startTime` (string, optional)
- `state` (string, optional)

## Examples

### Maintenance Events - Managed Account

**Response**

```json
[
  {
    "endTime": "2024-05-24T09:42:00.000Z",
    "eventId": "CSS-1234",
    "eventType": "Emergency",
    "impact": "There will be minor impact on services.",
    "purpose": "Services will become more effective",
    "services": [
      "f06c80bc",
      "0746e9a3"
    ],
    "startTime": "2024-05-24T09:12:00.000Z",
    "state": "Scheduled"
  },
  {
    "cancelReason": "Not Needed",
    "endTime": "2024-05-24T09:42:00.000Z",
    "eventId": "CSS-1235",
    "eventType": "Emergency",
    "impact": "There will be minor impact on services.",
    "purpose": "Services will become more effective",
    "services": [
      "f06c80bc",
      "0746e9a3"
    ],
    "startTime": "2024-05-24T09:12:00.000Z",
    "state": "Cancelled"
  }
]
```

**SDK Code**

```python Maintenance Events - Managed Account
import requests

url = "https://api.megaport.com/ens/v1/status/maintenance"

response = requests.get(url)

print(response.json())
```

```javascript Maintenance Events - Managed Account
const url = 'https://api.megaport.com/ens/v1/status/maintenance';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Maintenance Events - Managed Account
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.megaport.com/ens/v1/status/maintenance"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Maintenance Events - Managed Account
require 'uri'
require 'net/http'

url = URI("https://api.megaport.com/ens/v1/status/maintenance")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Maintenance Events - Managed Account
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.megaport.com/ens/v1/status/maintenance")
  .asString();
```

```php Maintenance Events - Managed Account
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.megaport.com/ens/v1/status/maintenance');

echo $response->getBody();
```

```csharp Maintenance Events - Managed Account
using RestSharp;

var client = new RestClient("https://api.megaport.com/ens/v1/status/maintenance");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Maintenance Events - Managed Account
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.megaport.com/ens/v1/status/maintenance")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Maintenance Events - Scheduled

**Response**

```json
[
  {
    "endTime": "2024-05-24T09:42:00.000Z",
    "eventId": "CSS-1234",
    "eventType": "Emergency",
    "impact": "There will be minor impact on services.",
    "purpose": "Services will become more effective",
    "services": [
      "f06c80bc",
      "0746e9a3"
    ],
    "startTime": "2024-05-24T09:12:00.000Z",
    "state": "Scheduled"
  },
  {
    "cancelReason": "Not Needed",
    "endTime": "2024-05-24T09:42:00.000Z",
    "eventId": "CSS-1235",
    "eventType": "Emergency",
    "impact": "There will be minor impact on services.",
    "purpose": "Services will become more effective",
    "services": [
      "f06c80bc",
      "0746e9a3"
    ],
    "startTime": "2024-05-24T09:12:00.000Z",
    "state": "Cancelled"
  }
]
```

**SDK Code**

```python Maintenance Events - Scheduled
import requests

url = "https://api.megaport.com/ens/v1/status/maintenance"

response = requests.get(url)

print(response.json())
```

```javascript Maintenance Events - Scheduled
const url = 'https://api.megaport.com/ens/v1/status/maintenance';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Maintenance Events - Scheduled
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.megaport.com/ens/v1/status/maintenance"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Maintenance Events - Scheduled
require 'uri'
require 'net/http'

url = URI("https://api.megaport.com/ens/v1/status/maintenance")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Maintenance Events - Scheduled
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.megaport.com/ens/v1/status/maintenance")
  .asString();
```

```php Maintenance Events - Scheduled
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.megaport.com/ens/v1/status/maintenance');

echo $response->getBody();
```

```csharp Maintenance Events - Scheduled
using RestSharp;

var client = new RestClient("https://api.megaport.com/ens/v1/status/maintenance");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Maintenance Events - Scheduled
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.megaport.com/ens/v1/status/maintenance")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```