Migrate Static(Datacenter/ISP) IPs between zones

API endpoint: POST /api/zone/ips/migrate
POST body
  • from=ZONE1 Zone which IPs will be migrated from
  • to=ZONE1 Zone to which IPs will be migrated
  • ips=['ip1','ip2'] Array of ips which should be migrated
Sample Response :
Response will output the zones which were involved in the migration and the count of the migrated IPs.
curl "https://api.brightdata.com/zone/ips/migrate" -H "Content-Type: application/json" -H "Authorization: Bearer API_TOKEN" -d "{\"from\":\"zone1\",\"to\":\"zone2\",\"ips\":[\"\",\"\",\"\"]}"


#!/usr/bin/env node
	method: 'POST',
	url: 'https://api.brightdata.com/zone/ips/migrate',
	json: {'from': 'zone1','to':'zone2','ips':['','','']},
	headers: {'Authorization': 'Bearer API_TOKEN'},
}).then(function(data){ console.log(data); },
	function(err){ console.error(err); });


package example;

import org.apache.http.HttpHost;
import org.apache.http.client.fluent.*;

public class Example {
  public static void main(String[] args) throws Exception {
String body = "{\"from\":\"zone1\",\"to\":\"zone2\",\"ips\":[\"\",\"\",\"\"]}"; String res = Executor.newInstance() .addHeader("Authorization", "Bearer API_TOKEN")

.bodyString(body, ContentType.APPLICATION_JSON))

System.out.println(res) }



using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;

public class Program {
  public static async Task Main() {
    var client = new HttpClient();
    var requestMessage = new HttpRequestMessage {
      Method = HttpMethod.Post,
RequestUri = new Uri("https://api.brightdata.com/zone/ips/migrate"), Headers = { {"Authorization", "Bearer API_TOKEN"} },
Content = new StringContent(JsonConvert.SerializeObject(new {
from = "zone1", to = "zone2", ips = [ "", "", "" ]
}), Encoding.UTF8, "application/json")) }; var response = await client.SendAsync(requestMessage); var responseString = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseString); } }


#!/usr/bin/env python
print('If you get error "ImportError: No module named requests", please install it:\n$ sudo pip install requests');
import requests

data = {'from': 'zone1','to':'zone2','ips':['','','']} headers = {'Authorization': 'Bearer API_TOKEN'} r = requests.post('https://api.brightdata.com/zone/ips/migrate', data=data, headers=headers) print(r.content)

Was this article helpful?