Login IP Allowlist
  • 26 Oct 2022
  • 3 Minutes to read
  • Dark
    Light

Login IP Allowlist

  • Dark
    Light

Article Summary

Login IP Allowlist

You need Manage Security permission to manage login ip allowlist.

Login IP Allowlist Config JSON Format

Login IP Allowlist Config is represented as simple flat JSON objects with the following keys:

NameTypeDescription
siteIdintegerId of the site.
isEnabledboolWhether login IP allowlist is enabled or not.
isLoginIpAllowlistApplicableForMobileAccessboolWhether IP login allows mobile access or not.

Get a single Login IP Allowlist Config

GET global/loginIpAllowlistConfig

  • Parameters:

No Parameters

  • Response:

Login IP Allowlist Config

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/loginIpAllowlistConfig \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "siteId": 10000,
  "isEnabled": false,
  "isLoginIpAllowlistApplicableForMobileAccess": false
} 

Disable the Login IP Allowlist Config

POST global/loginIpAllowlistConfig:disable

  • Parameters:

No Parameters

  • Response:

Login IP Allowlist Config

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/loginIpAllowlistConfig:disable \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "siteId": 10000,
  "isEnabled": false,
  "isLoginIpAllowlistApplicableForMobileAccess": false
} 

Enable the Login IP Allowlist Config

POST global/loginIpAllowlistConfig:enable

  • Parameters:

No Parameters

  • Response:

Login IP Allowlist Config

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/loginIpAllowlistConfig:enable \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "siteId": 10000,
  "isEnabled": true,
  "isLoginIpAllowlistApplicableForMobileAccess": false
} 

Update the Login IP Allowlist Config

PUT global/loginIpAllowlistConfig

  • Parameters:

NameTypeinRequiredDescription
isEnabledboolbodynoWhether login IP allowlist is enabled or not.
isLoginIpAllowlistApplicableForMobileAccessboolbodynoWhether IP login allows mobile access or not.
  • Response:

Login IP Allowlist Config

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/loginIpAllowlistConfig \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"isEnabled":false,"isLoginIpAllowlistApplicableForMobileAccess":false}' 

Response:

HTTP/1.1 200 OK

{
  "siteId": 10000,
  "isEnabled": false,
  "isLoginIpAllowlistApplicableForMobileAccess": false
} 

Login IP Allowlist JSON Format

Login IP Allowlist is represented as simple flat JSON objects with the following keys:

NameTypeDescription
ipRangeFromstringWhere an IP range starts.
ipRangeTostringWhere an IP range ends.
idguidId of the login IP allowlist.

Get the list of Allowed IP List

GET global/loginIpAllowlists

  • Parameters:

No Parameters

  • Response:

An array of Login IP Allowlist

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/loginIpAllowlists \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "ipRangeFrom": "192.168.0.1",
      "ipRangeTo": "192.168.0.100",
      "id": "f072ad60-b2d7-4f0c-831c-7fdd2a702e9f"
  }
] 

Get a single Login IP Allowlist

GET global/loginIpAllowlists/{id}

  • Parameters:

No Parameters

  • Response:

Login IP Allowlist

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/loginIpAllowlists/f072ad60-b2d7-4f0c-831c-7fdd2a702e9f \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "ipRangeFrom": "192.168.0.1",
  "ipRangeTo": "192.168.0.100",
  "id": "f072ad60-b2d7-4f0c-831c-7fdd2a702e9f"
} 

Create a new Login IP Allowlist

POST global/loginIpAllowlists

  • Parameters:

NameTypeinRequiredDescription
ipRangeFromstringbodyyesWhere an IP range starts.
ipRangeTostringbodyyesWhere an IP range ends.
  • Response:

Login IP Allowlist

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/loginIpAllowlists \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"ipRangeFrom":"192.168.0.1","ipRangeTo":"192.168.0.100"}' 

Response:

HTTP/1.1 201 Created

{
  "ipRangeFrom": "192.168.0.1",
  "ipRangeTo": "192.168.0.100",
  "id": "f072ad60-b2d7-4f0c-831c-7fdd2a702e9f"
} 

Update the Login IP Allowlist

PUT global/loginIpAllowlists/{id}

  • Parameters:

NameTypeinRequiredDescription
ipRangeFromstringbodyyesWhere an IP range starts.
ipRangeTostringbodyyesWhere an IP range ends.
  • Response:

Login IP Allowlist

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/loginIpAllowlists/f072ad60-b2d7-4f0c-831c-7fdd2a702e9f \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"ipRangeFrom":"192.168.0.1","ipRangeTo":"192.168.0.100"}' 

Response:

HTTP/1.1 200 OK

{
  "ipRangeFrom": "192.168.0.1",
  "ipRangeTo": "192.168.0.100",
  "id": "f072ad60-b2d7-4f0c-831c-7fdd2a702e9f"
} 

Remove the Login IP Allowlist

DELETE global/loginIpAllowlists/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/global/loginIpAllowlists/f072ad60-b2d7-4f0c-831c-7fdd2a702e9f \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?