Edit Connector to update specific properties or Re-provision License Key
client.magicTransit.connectors.edit(stringconnectorId, ConnectorEditParams { account_id, activated, interrupt_window_days_of_week, 6 more } params, RequestOptionsoptions?): ConnectorEditResponse { id, activated, interrupt_window_days_of_week, 10 more }
PATCH/accounts/{account_id}/magic/connectors/{connector_id}
Edit Connector to update specific properties or Re-provision License Key
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Edit Connector to update specific properties or Re-provision License Key
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const response = await client.magicTransit.connectors.edit('connector_id', {
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});
console.log(response.id);{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"result": {
"id": "id",
"activated": true,
"interrupt_window_days_of_week": [
"Sunday"
],
"interrupt_window_duration_hours": 1,
"interrupt_window_embargo_dates": [
"string"
],
"interrupt_window_hour_of_day": 0,
"last_updated": "last_updated",
"notes": "notes",
"timezone": "timezone",
"device": {
"id": "id",
"serial_number": "serial_number"
},
"last_heartbeat": "last_heartbeat",
"last_seen_version": "last_seen_version",
"license_key": "license_key"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"result": {
"id": "id",
"activated": true,
"interrupt_window_days_of_week": [
"Sunday"
],
"interrupt_window_duration_hours": 1,
"interrupt_window_embargo_dates": [
"string"
],
"interrupt_window_hour_of_day": 0,
"last_updated": "last_updated",
"notes": "notes",
"timezone": "timezone",
"device": {
"id": "id",
"serial_number": "serial_number"
},
"last_heartbeat": "last_heartbeat",
"last_seen_version": "last_seen_version",
"license_key": "license_key"
},
"success": true
}