Bulk create allowed IP address ranges
Create up to 1000 allowed IP address ranges for the organization in one request. The whole batch is created atomically — if any item fails validation or conflicts with an existing range, no rows are inserted. This endpoint is NOT idempotent: a retry after an unacknowledged 2xx response may return 409. Clients should call ListAllowedIpAddressRanges to verify state before retrying.
POST
/
organizations
/
{organizationId}
/
allowed-ip-address-ranges
/
bulk-create
Bulk create allowed IP address ranges
curl --request POST \
--url https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowedIpAddressRanges": [
"1.1.1.1/32",
"2.2.2.2/32"
]
}
'import requests
url = "https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create"
payload = { "allowedIpAddressRanges": ["1.1.1.1/32", "2.2.2.2/32"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowedIpAddressRanges: ['1.1.1.1/32', '2.2.2.2/32']})
};
fetch('https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'allowedIpAddressRanges' => [
'1.1.1.1/32',
'2.2.2.2/32'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create"
payload := strings.NewReader("{\n \"allowedIpAddressRanges\": [\n \"1.1.1.1/32\",\n \"2.2.2.2/32\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowedIpAddressRanges\": [\n \"1.1.1.1/32\",\n \"2.2.2.2/32\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowedIpAddressRanges\": [\n \"1.1.1.1/32\",\n \"2.2.2.2/32\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"allowedIpAddressRanges": [
{
"createdAt": "2022-11-22T04:37:12Z",
"id": "clm9sq6s0000008kz7uvl7yz7",
"ipAddressRange": "1.1.1.1/32",
"organizationId": "clyt27999000008me3yp39wcp",
"updatedAt": "2022-11-22T04:37:12Z",
"createdBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"description": "Office VPN",
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
}
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}Authorizations
Path Parameters
Body
application/json
The request body containing the list of CIDR ranges to create.
Was this page helpful?
⌘I
Bulk create allowed IP address ranges
curl --request POST \
--url https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowedIpAddressRanges": [
"1.1.1.1/32",
"2.2.2.2/32"
]
}
'import requests
url = "https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create"
payload = { "allowedIpAddressRanges": ["1.1.1.1/32", "2.2.2.2/32"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({allowedIpAddressRanges: ['1.1.1.1/32', '2.2.2.2/32']})
};
fetch('https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'allowedIpAddressRanges' => [
'1.1.1.1/32',
'2.2.2.2/32'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create"
payload := strings.NewReader("{\n \"allowedIpAddressRanges\": [\n \"1.1.1.1/32\",\n \"2.2.2.2/32\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowedIpAddressRanges\": [\n \"1.1.1.1/32\",\n \"2.2.2.2/32\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.astronomer.io/v1/organizations/{organizationId}/allowed-ip-address-ranges/bulk-create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowedIpAddressRanges\": [\n \"1.1.1.1/32\",\n \"2.2.2.2/32\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"allowedIpAddressRanges": [
{
"createdAt": "2022-11-22T04:37:12Z",
"id": "clm9sq6s0000008kz7uvl7yz7",
"ipAddressRange": "1.1.1.1/32",
"organizationId": "clyt27999000008me3yp39wcp",
"updatedAt": "2022-11-22T04:37:12Z",
"createdBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
},
"description": "Office VPN",
"updatedBy": {
"id": "clm8qv74h000008mlf08scq7k",
"apiTokenName": "my-token",
"avatarUrl": "https://avatar.url",
"fullName": "Jane Doe",
"subjectType": "USER",
"username": "user1@company.com"
}
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}{
"message": "<string>",
"requestId": "<string>",
"statusCode": 500,
"fieldErrors": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>"
}
]
}