Network Zones

The Okta Network Zones API provides operations to manage Zones in your organization. There are two usage Zone types: Policy Network Zones and Blocklist Network Zones. Policy Network Zones are used to guide policy decisions. Blocklist Network Zones are used to deny access from certain IP addresses, locations, proxy types, or Autonomous System Numbers (ASNs) before policy evaluation.

A default system Policy Network Zone is provided in your Okta org. You can use the Network Zones API to modify the default Policy Network Zone or to create a custom Policy or Blocklist Network Zone. When you create your custom Zone, you can specify if the Zone is an IP Zone or a Dynamic Zone. An IP Zone allows you to define network perimeters around a set of IPs, whereas a Dynamic Zone allows you to define network perimeters around location, IP type, and ASNs.

Note: To create multiple network zones, including Dynamic Zones, you must enable Adaptive MFA.

List all Network Zones
OAuth 2.0: okta.networkZones.read

Lists all network zones with pagination. A subset of zones can be returned that match a supported filter expression or query.

This operation requires URL encoding. For example, filter=(id eq "nzoul0wf9jyb8xwZm0g3" or id eq "nzoul1MxmGN18NDQT0g3") is encoded as filter=%28id+eq+%22nzoul0wf9jyb8xwZm0g3%22+or+id+eq+%22nzoul1MxmGN18NDQT0g3%22%29.

Okta supports filtering on the id and usage properties. See Filtering for more information on the expressions that are used in filtering.

Request
query Parameters
after
string

Specifies the pagination cursor for the next page of network zones

Example: after=200u7yq5goxNFTiMjW1d7
limit
integer <int32>
Default: -1

Specifies the number of results for a page

Example: limit=5
filter
string

Filters zones by usage or ID expression

Example: filter=filter=%28id+eq+%22nzowc1U5Jh5xuAK0o0g3%22%29
Responses
200

Success

403

Forbidden

429

Too Many Requests

get/api/v1/zones
Request samples
Response samples
application/json
[]

Create a Network Zone
OAuth 2.0: okta.networkZones.manage

Creates a new network zone.

  • At least one of either the gateways attribute or proxies attribute must be defined when creating a Network Zone.
  • At least one of the following attributes must be defined: proxyType, locations, or asns.
Request
Request Body schema: application/json
required
asns
Array of strings <= 75

Dynamic network zone property: An array of strings that represent an ASN numeric value

Array of objects (NetworkZoneAddress)

IP network zone property: the IP addresses (range or CIDR form) of this zone. The maximum array length is 150 entries for admin-created IP zones, 1000 entries for IP blocklist zones, and 5000 entries for the default system IP Zone.

Array
type
string (NetworkZoneAddressType)

Format of the value

Enum: "CIDR" "RANGE"
value
string

Value in CIDR/range form depending on the type specified

Array of objects (NetworkZoneLocation) <= 75

Dynamic network zone property: an array of geolocations of this network zone

Array
country
string

Format of the country value: length 2 ISO-3166-1 country code. Do not use continent codes as they are treated as generic codes for undesignated countries.

region
string

Format of the region value (optional): region code ISO-3166-2 appended to country code (countryCode-regionCode), or null if empty. Do not use continent codes as they are treated as generic codes for undesignated regions.

name
string

Unique name for this network zone. Maximum of 128 characters.

Array of objects or null (NetworkZoneAddress)

IP network zone property: the IP addresses (range or CIDR form) that are allowed to forward a request from gateway addresses These proxies are automatically trusted by Threat Insights, and used to identify the client IP of a request. The maximum array length is 150 entries for admin-created zones and 5000 entries for the default system IP Zone.

Array
type
string (NetworkZoneAddressType)

Format of the value

Enum: "CIDR" "RANGE"
value
string

Value in CIDR/range form depending on the type specified

proxyType
string

Dynamic network zone property: the proxy type used

Enum: Description
null

(Or "") No proxy used

Any

Use any proxy type for the dynamic zone.

Tor

Use TorAnonymizer as the proxy type for the dynamic zone.

NotTorAnonymizer

Use NotTorAnonymizer as the proxy type for the dynamic zone.

status
string (NetworkZoneStatus)

Network zone status

Enum: "ACTIVE" "INACTIVE"
system
boolean

Indicates if this is a system network zone. For admin-created zones, this is always false. The system IP Policy Network Zone (LegacyIpZone) is included by default in your Okta org. Notice that system=true for the LegacyIpZone object. Admin users can modify the name of this default system Zone and can add up to 5000 gateway or proxy IP entries.

type
string (NetworkZoneType)

The type of network zone

Enum: "DYNAMIC" "IP"
usage
string (NetworkZoneUsage)

The usage of the network zone

Enum: "BLOCKLIST" "POLICY"
Responses
200

Success

400

Bad Request

403

Forbidden

429

Too Many Requests

post/api/v1/zones
Request samples
application/json
{
  • "type": "IP",
  • "name": "newNetworkZone",
  • "gateways": [
    • {
      },
    • {
      }
    ],
  • "proxies": [
    • {
      },
    • {
      }
    ]
}
Response samples
application/json
{}

Retrieve a Network Zone
OAuth 2.0: okta.networkZones.read

Retrieves a network zone by zoneId

Request
path Parameters
zoneId
required
string

id of the Network Zone

Example: nzowc1U5Jh5xuAK0o0g3
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/zones/{zoneId}
Request samples
Response samples
application/json
{}

Replace a Network Zone
OAuth 2.0: okta.networkZones.manage

Replaces a network zone by zoneId. The replaced network zone type must be the same as the existing type. You may replace the usage (POLICY, BLOCKLIST) of a network zone by updating the usage attribute.

Request
path Parameters
zoneId
required
string

id of the Network Zone

Example: nzowc1U5Jh5xuAK0o0g3
Request Body schema: application/json
required
asns
Array of strings <= 75

Dynamic network zone property: An array of strings that represent an ASN numeric value

Array of objects (NetworkZoneAddress)

IP network zone property: the IP addresses (range or CIDR form) of this zone. The maximum array length is 150 entries for admin-created IP zones, 1000 entries for IP blocklist zones, and 5000 entries for the default system IP Zone.

Array
type
string (NetworkZoneAddressType)

Format of the value

Enum: "CIDR" "RANGE"
value
string

Value in CIDR/range form depending on the type specified

Array of objects (NetworkZoneLocation) <= 75

Dynamic network zone property: an array of geolocations of this network zone

Array
country
string

Format of the country value: length 2 ISO-3166-1 country code. Do not use continent codes as they are treated as generic codes for undesignated countries.

region
string

Format of the region value (optional): region code ISO-3166-2 appended to country code (countryCode-regionCode), or null if empty. Do not use continent codes as they are treated as generic codes for undesignated regions.

name
string

Unique name for this network zone. Maximum of 128 characters.

Array of objects or null (NetworkZoneAddress)

IP network zone property: the IP addresses (range or CIDR form) that are allowed to forward a request from gateway addresses These proxies are automatically trusted by Threat Insights, and used to identify the client IP of a request. The maximum array length is 150 entries for admin-created zones and 5000 entries for the default system IP Zone.

Array
type
string (NetworkZoneAddressType)

Format of the value

Enum: "CIDR" "RANGE"
value
string

Value in CIDR/range form depending on the type specified

proxyType
string

Dynamic network zone property: the proxy type used

Enum: Description
null

(Or "") No proxy used

Any

Use any proxy type for the dynamic zone.

Tor

Use TorAnonymizer as the proxy type for the dynamic zone.

NotTorAnonymizer

Use NotTorAnonymizer as the proxy type for the dynamic zone.

status
string (NetworkZoneStatus)

Network zone status

Enum: "ACTIVE" "INACTIVE"
system
boolean

Indicates if this is a system network zone. For admin-created zones, this is always false. The system IP Policy Network Zone (LegacyIpZone) is included by default in your Okta org. Notice that system=true for the LegacyIpZone object. Admin users can modify the name of this default system Zone and can add up to 5000 gateway or proxy IP entries.

type
string (NetworkZoneType)

The type of network zone

Enum: "DYNAMIC" "IP"
usage
string (NetworkZoneUsage)

The usage of the network zone

Enum: "BLOCKLIST" "POLICY"
Responses
200

Success

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

put/api/v1/zones/{zoneId}
Request samples
application/json
{
  • "type": "IP",
  • "id": "nzovw2rFz2YoqmvwZ0g9",
  • "name": "UpdatedNetZone",
  • "status": "ACTIVE",
  • "usage": "POLICY",
  • "gateways": [
    • {
      },
    • {
      },
    • {
      },
    • {
      }
    ],
  • "proxies": [
    • {
      },
    • {
      },
    • {
      },
    • {
      }
    ],
  • "_links": {}
}
Response samples
application/json
{
  • "type": "IP",
  • "id": "nzovw2rFz2YoqmvwZ0g3",
  • "name": "UpdatedNetZone",
  • "status": "ACTIVE",
  • "usage": "POLICY",
  • "created": "2019-01-24T19:53:28.000Z",
  • "lastUpdated": "2019-02-24T19:53:28.000Z",
  • "system": false,
  • "gateways": [
    • {
      },
    • {
      },
    • {
      },
    • {
      }
    ],
  • "proxies": [
    • {
      },
    • {
      },
    • {
      },
    • {
      }
    ]
}

Delete a Network Zone
OAuth 2.0: okta.networkZones.manage

Deletes network zone by zoneId

Request
path Parameters
zoneId
required
string

id of the Network Zone

Example: nzowc1U5Jh5xuAK0o0g3
Responses
204

No Content

403

Forbidden

404

Not Found

429

Too Many Requests

delete/api/v1/zones/{zoneId}
Request samples
Response samples
application/json
{
  • "errorCode": "E0000006",
  • "errorSummary": "You do not have permission to perform the requested action",
  • "errorLink": "E0000006",
  • "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
  • "errorCauses": [ ]
}

Activate a Network Zone
OAuth 2.0: okta.networkZones.manage

Activates a network zone by zoneId

Request
path Parameters
zoneId
required
string

id of the Network Zone

Example: nzowc1U5Jh5xuAK0o0g3
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/zones/{zoneId}/lifecycle/activate
Request samples
Response samples
application/json
{}

Deactivate a Network Zone
OAuth 2.0: okta.networkZones.manage

Deactivates a network zone by zoneId

Request
path Parameters
zoneId
required
string

id of the Network Zone

Example: nzowc1U5Jh5xuAK0o0g3
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/zones/{zoneId}/lifecycle/deactivate
Request samples
Response samples
application/json
{}