--- title: "Login IP Allowlist" slug: "server-api-global-setting-login-ip-allowlist" updated: 2022-10-26T08:21:37Z published: 2022-10-26T08:21:37Z canonical: "developer.comm100.com/server-api-global-setting-login-ip-allowlist" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Login IP Allowlist ## Login IP Allowlist You need Manage Security permission to manage login ip allowlist. - `Login IP Allow List Config` - Login IP Allow List Config - `GET global/loginIpAllowlistConfig` - [Get a single Login IP Allowlist Config](/docs/server-api-global-setting-login-ip-allowlist#get-a-single-login-ip-allowlist-config) - `POST global/loginIpAllowlistConfig:disable` - [Disable the Login IP Allowlist Config](/docs/server-api-global-setting-login-ip-allowlist#disable-the-login-ip-allowlist-config) - `POST global/loginIpAllowlistConfig:enable` - [Enable the Login IP Allowlist Config](/docs/server-api-global-setting-login-ip-allowlist#enable-the-login-ip-allowlist-config) - `PUT global/loginIpAllowlistConfig` - [Update the Login IP Allowlist Config](/docs/server-api-global-setting-login-ip-allowlist#update-the-login-ip-allowlist-config) - `Login IP Allow List` - Login IP Allow List - `GET global/loginIpAllowlists` - [Get the list of Allowed IP List](/docs/server-api-global-setting-login-ip-allowlist#get-the-list-of-allowed-ip-list) - `GET global/loginIpAllowlists/{id}` - [Get a single Login IP Allowlist](/docs/server-api-global-setting-login-ip-allowlist#get-a-single-login-ip-allowlist) - `POST global/loginIpAllowlists` - [Create a new Login IP Allowlist](/docs/server-api-global-setting-login-ip-allowlist#create-a-new-login-ip-allowlist) - `PUT global/loginIpAllowlists/{id}` - [Update the Login IP Allowlist](/docs/server-api-global-setting-login-ip-allowlist#update-the-login-ip-allowlist) - `DELETE global/loginIpAllowlists/{id}` - [Remove the Login IP Allowlist](/docs/server-api-global-setting-login-ip-allowlist#remove-the-login-ip-allowlist) ### Login IP Allowlist Config JSON Format Login IP Allowlist Config is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `siteId` | integer | Id of the site. | | `isEnabled` | bool | Whether login IP allowlist is enabled or not. | | `isLoginIpAllowlistApplicableForMobileAccess` | bool | Whether 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](/docs/server-api-global-setting-login-ip-allowlist#login-ip-allowlist-config-json-format) - #### 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](/docs/server-api-global-setting-login-ip-allowlist#login-ip-allowlist-config-json-format) - #### 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](/docs/server-api-global-setting-login-ip-allowlist#login-ip-allowlist-config-json-format) - #### 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: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `isEnabled` | bool | body | no | Whether login IP allowlist is enabled or not. | | `isLoginIpAllowlistApplicableForMobileAccess` | bool | body | no | Whether IP login allows mobile access or not. | - #### Response: [Login IP Allowlist Config](/docs/server-api-global-setting-login-ip-allowlist#login-ip-allowlist-config-json-format) - #### 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: | Name | Type | Description | | --- | --- | --- | | `ipRangeFrom` | string | Where an IP range starts. | | `ipRangeTo` | string | Where an IP range ends. | | `id` | guid | Id 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](/docs/server-api-global-setting-login-ip-allowlist#login-ip-allowlist-json-format) - #### 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](/docs/server-api-global-setting-login-ip-allowlist#login-ip-allowlist-json-format) - #### 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: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `ipRangeFrom` | string | body | yes | Where an IP range starts. | | `ipRangeTo` | string | body | yes | Where an IP range ends. | - #### Response: [Login IP Allowlist](/docs/server-api-global-setting-login-ip-allowlist#login-ip-allowlist-json-format) - #### 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: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `ipRangeFrom` | string | body | yes | Where an IP range starts. | | `ipRangeTo` | string | body | yes | Where an IP range ends. | - #### Response: [Login IP Allowlist](/docs/server-api-global-setting-login-ip-allowlist#login-ip-allowlist-json-format) - #### 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