Create location context policy⁠

POST /api/v1/location-contexts

Create a new location context policy with specified criteria for IP, country, and default checks to define access policies based on geographic location or IP address.

Attributes:

  • name (string): The name of the location context.

  • description (string): Description of the location context.

  • userGroupsIds (array of strings): List of user group IDs associated with this location context.

  • ipCheck (object): Specifies the IP check criteria.

    • allowed (boolean): Indicates whether the IP addresses are allowed.

    • ips (array of objects): List of IP addresses and descriptions.

  • countryCheck (object): Specifies the country check criteria.

    • countries (array of strings): List of allowed countries.

    • allowed (boolean): Indicates whether connections from specified countries are allowed.

  • defaultCheck (object): Specifies the default check criteria for access.

    • allowed (boolean): Indicates if default access is allowed.

Body parameter

{
  "name": "string",
  "description": "string",
  "userGroupsIds": [
    "string"
  ],
  "ipCheck": {
    "allowed": true,
    "ips": [
      {
        "ip": "string",
        "description": "string"
      }
    ]
  },
  "countryCheck": {
    "countries": [
      "string"
    ],
    "allowed": true
  },
  "defaultCheck": {
    "allowed": true
  }
}

Parameters⁠

Name

In

Type

Required

Description

body

body

LocationContextRequest

true

none

» name

body

string

false

none

» description

body

string

false

none

» userGroupsIds

body

[string]

false

none

» ipCheck

body

IpCheckRequest

false

none

»» allowed

body

boolean

false

none

»» ips

body

[IpRequest]

false

none

»»» ip

body

string

false

none

»»» description

body

string

false

none

» countryCheck

body

CountryCheckRequest

false

none

»» countries

body

[string]

false

none

»» allowed

body

boolean

false

none

» defaultCheck

body

DefaultCheckRequest

false

none

»» allowed

body

boolean

false

none

Responses⁠

Status

Meaning

Description

Schema

200

OK

OK

LocationContextResponse

To perform this operation, you must be authenticated by means of one of the following methods: oauth