IP Allowlist [Beta]

This contains APIs for IP Allowlist.

Create a IP Allowlist config

Creates a new IP Allowlist config

Securityx-api-key
Request
header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Request Body schema: application/json
object (IPAllowlistConfig)

This contains data for a config set in Harness to allow selected IPs

Responses
201

Example response

post/v1/ip-allowlist
Request samples
application/json
{
  • "ip_allowlist_config": {
    }
}
Response samples
application/json
{
  • "ip_allowlist_config": {
    },
  • "created": 0,
  • "updated": 0
}

List IP Allowlist Configs

Retrieves the information of the IP Allowlist Config

Securityx-api-key
Request
query Parameters
search_term
string

This would be used to filter resources having attributes matching with search term.

page
integer
Default: 0

Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page

limit
integer <= 1000
Default: 20

Number of items to return per page.

sort
string

Parameter on the basis of which sorting is done.

Enum: "name" "identifier" "created" "updated"
order
string

Order on the basis of which sorting is done.

Enum: "ASC" "DESC"
allowed_source_type
string

This is to filter IP allowlist configs only blocked from UI or API

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Example response

get/v1/ip-allowlist
Request samples
Response samples
application/json
[
  • {
    }
]

Retrieve a IP Allowlist config

Retrieves the specified IP Allowlist config

Securityx-api-key
Request
path Parameters
ip-config-identifier
required
string
header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Example response

get/v1/ip-allowlist/{ip-config-identifier}
Request samples
Response samples
application/json
{
  • "ip_allowlist_config": {
    },
  • "created": 0,
  • "updated": 0
}

Update IP Allowlist config

Updates the specified IP Allowlist config

Securityx-api-key
Request
path Parameters
ip-config-identifier
required
string
header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Request Body schema: application/json
object (IPAllowlistConfig)

This contains data for a config set in Harness to allow selected IPs

Responses
200

Example response

put/v1/ip-allowlist/{ip-config-identifier}
Request samples
application/json
{
  • "ip_allowlist_config": {
    }
}
Response samples
application/json
{
  • "ip_allowlist_config": {
    },
  • "created": 0,
  • "updated": 0
}

Delete an IP Allowlist config

Deletes the specified IP Allowlist config

Securityx-api-key
Request
path Parameters
ip-config-identifier
required
string
header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
204

No Content

delete/v1/ip-allowlist/{ip-config-identifier}
Request samples

Validate unique IP Allowlist config identifier

Checks whether the IP Allowlist config identifier is unique or not

Securityx-api-key
Request
path Parameters
ip-config-identifier
required
string
header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Example response

get/v1/ip-allowlist/validate-unique-identifier/{ip-config-identifier}
Request samples
Response samples
application/json
true

Validate IP address lies in a specified range or not

Checks whether the IP address is allowed or not. It also supports checking against a specific IP block range.

Securityx-api-key
Request
query Parameters
ip_address
required
string

This is the IP address that needs to be checked if allowed or not

custom_ip_address_block
string

This is the IP address or block of IP address against which we need to verify if a given IP address is allowed or not. If not passed we do the validation against the IP configs within Harness.

include_disabled_configs
boolean
Default: false

This setting controls the visibility of IP allowlist configurations. When set to 'true', it displays both enabled and disabled configurations. When set to 'false' or left unset, it displays only the enabled configurations.

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Example response

get/v1/ip-allowlist/validate/ip-address
Request samples
Response samples
application/json
{
  • "allowed_for_custom_block": true,
  • "allowlisted_configs": [
    ],
  • "allowed_for_ui": true,
  • "allowed_for_api": true,
  • "disabled_allowlisted_configs": [
    ]
}