{"swagger":"2.0","info":{"version":"0.0.1","title":"Portnox Cloud API","description":"Portnox Cloud's​ ​API​ ​is​ ​REST-full​ ​API​ ​over​ ​HTTPS​ ​that​ ​can​ ​be​ ​used​ ​in​ ​any​ ​programming​ ​language​ ​that supports​ ​REST​ ​messaging​ ​or​ ​can​ ​be​ ​use​ ​directly​ ​through​ ​any​ ​HTTPS​ ​client​ ​such​ ​as​ ​​curl. Response​ ​and​ ​Request​ ​always​ ​in​ ​standard​ ​JSON​ ​format. Any​ ​request​ ​is​ ​authenticated​ ​with​ ​credentials​ ​of​ ​the Portnox Cloud​ ​administrator​ ​and​ ​each​ ​request​ ​must be​ ​re-authenticated","termsOfService":"Terms of Service","contact":{"email":"success@portnox.com"}},"basePath":"https://clear.portnox.com:8081/CloudPortalBackEnd","paths":{"/api/account":{"post":{"tags":["Account Operations"],"summary":"Create an account","description":"Create a new account based on the request data","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiCreateAccountAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateAccountApiRequest"}}],"responses":{"200":{"description":"Account was successfully created","schema":{"$ref":"#/definitions/AccountApiItem"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"e5d20b54-c0b3-4cae-a500-b6b7acb8d065","name":"Create Portnox Account","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiCreateAccountAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                AccountName = \"<user-name>@<org-mail-domain>\",\r\n                IdentityType = 1,\r\n                Description = \"Email account\"\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/account\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"39df3631-05cf-4fa3-9e63-853f8984f6b1","name":"Create LDAP account","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiCreateAccountAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                AccountName = \"<ldap-user>\",\r\n                DirectoryDomain = \"<directory-domain>\",\r\n                IdentityType = 0,\r\n                Description = \"Directory user account\"\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/account\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"b547f2d3-3d43-4345-97d1-3b55580dce4e","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiCreateAccountAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"AccountName\": \"<user-name>@<org-mail-domain>\",\r\n  \"DirectoryDomain\": null,\r\n  \"IdentityType\": 1,\r\n  \"Description\": \"Email account\",\r\n  \"AllowAgentlessDevices\": false,\r\n  \"CredentialsExpirationDate\": null\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/account')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiCreateAccountAsync())","externalUrl":null,"Type":"CompilableModule"}]},"delete":{"tags":["Account Operations"],"summary":"Delete an account","description":"Delete the specified account","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiDeleteAccountAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/DeleteAccountRequest"}}],"responses":{"200":{"description":"Account was successfully deleted"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"3122c0f7-557f-44db-b1d7-f4b5167239b3","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task ApiDeleteAccountAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                AccountId = \"<user-name>@<org-mail-domain>\"\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.SendAsync(new HttpRequestMessage\r\n\t\t\t\t{\r\n\t\t\t\t\tMethod = HttpMethod.Delete,\r\n\t\t\t\t\tRequestUri = new Uri(\"api/account\", UriKind.Relative),\r\n\t\t\t\t\tContent = (request == null) ? null\r\n\t\t\t\t\t\t: new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\")\r\n\t\t\t\t});\r\n\r\n            // throw HttpRequestException if response status code was other than 200 OK\r\n            response.EnsureSuccessStatusCode();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"06763ff2-f5f4-4c20-8185-c8e1a1ce16c3","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiDeleteAccountAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"AccountId\": \"<user-name>@<org-mail-domain>\"\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/account')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.delete(uri, auth=creds) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiDeleteAccountAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/account/block":{"post":{"tags":["Account Operations"],"summary":"Block an account","description":"Block the specified account","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiBlockAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/BlockEntityRequest"}}],"responses":{"200":{"description":"Account successfully blocked"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"2ccbbcc5-6437-4322-91f5-d44180e9ca19","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task ApiBlockAccount(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                EntityId = \"<directory-domain>\\\\<ldap-user>\",\r\n                Reason = \"Temporary block\"\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/account/block\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // throw HttpRequestException if response status code was other than 200 OK\r\n            response.EnsureSuccessStatusCode();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"eeebf194-5435-45ba-be55-f8131b7b400e","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiBlockAccount():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"EntityId\": \"<user-name>@<org-mail-domain>\",\r\n  \"Reason\": \"Temporary block\"\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/account/block')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiBlockAccount())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/account/move-to-group":{"post":{"tags":["Account Operations"],"summary":"Move an account to another Portnox group","description":"Move a non-LDAP account to the Portnox group specified in the request (LDAP accounts are automatically assigned based on LDAP mapping, and cannot be manually moved).\r\n            The risk score of all the moved account’s devices will be recalculated according to the new group’s policy.","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiMoveAccountAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/MoveAccountRequest"}}],"responses":{"200":{"description":"Portnox group was successfully changed for account"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"17473132-75a6-4902-b4c8-1b690ec4c3ba","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task ApiMoveAccountAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                AccountId = \"<user-name>@<org-mail-domain>\",\r\n                GroupName = \"Default\"\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/account/move-to-group\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // throw HttpRequestException if response status code was other than 200 OK\r\n            response.EnsureSuccessStatusCode();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"9a593ea8-f5b2-4603-b213-f5324ef8ba3f","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiMoveAccountAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"GroupName\": \"Default\",\r\n  \"AccountId\": \"<user-name>@<org-mail-domain>\"\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/account/move-to-group')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiMoveAccountAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/clear-accounts":{"post":{"tags":["Account Operations"],"summary":"Create one or multiple Portnox Accounts","description":"Create a list of Portnox Accounts based on the request data","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiCreateClearAccountsAliasAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateClearAccountApiRequest"}}],"responses":{"200":{"description":"Account was successfully created","schema":{"$ref":"#/definitions/AccountEntitiesResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"deprecated":true,"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"05b22137-3fbe-48e3-92ff-fb901911bd5f","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiCreateClearAccountsAliasAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/clear-accounts')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiCreateClearAccountsAliasAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/cloud-accounts":{"post":{"tags":["Account Operations"],"summary":"Create one or multiple Portnox Accounts","description":"Create a list of Portnox Accounts based on the request data","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiCreateClearAccountsAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateClearAccountApiRequest"}}],"responses":{"200":{"description":"Account was successfully created","schema":{"$ref":"#/definitions/AccountEntitiesResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"37eb3ac8-e948-4857-91dc-114098595cfa","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiCreateClearAccountsAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/cloud-accounts')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiCreateClearAccountsAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/contractor-accounts":{"post":{"tags":["Account Operations"],"summary":"Create one or multiple Contractor accounts","description":"Create a list of Contractor accounts based on the request data","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiCreateContractorAccountsAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateContractorAccountApiRequest"}}],"responses":{"200":{"description":"Account was successfully created","schema":{"$ref":"#/definitions/AccountEntitiesResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"b460763c-9315-4402-bb83-db4c92d9f9d0","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiCreateContractorAccountsAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/contractor-accounts')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiCreateContractorAccountsAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/device/{deviceId}":{"get":{"tags":["Device Operations"],"summary":"Get a device","description":"Fetch all the details of the device specified by its Device ID.\r\n              We recommend that prior to making API call, first make the <b>‘list’</b> API call to fetch a list of desired accounts and their devices and then use the returned data. \r\n              Note also that the Device ID, used to specify a device, can be found in the <b>Device Details</b> pane, displayed when clicking a device in the Portnox Cloud portal’s <b>Devices</b> > <b>Accounts</b>.","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiGetDeviceByIdAsync","consumes":["application/json","application/xml"],"produces":["application/json"],"parameters":[{"name":"deviceId","in":"path","required":true,"type":"string"}],"responses":{"404":{"description":"Device with specified ID was not found"},"200":{"description":"Device fetched","schema":{"$ref":"#/definitions/DeviceEntity","allOf":[{"$ref":"#/definitions/MobileDeviceEntity"},{"$ref":"#/definitions/ComputerEntity"}]}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"49496e0f-8a13-4a0c-a5a4-7dd31a56abac","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiGetDeviceByIdAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = (object)null;\r\n\r\n            // send the request\r\n            var response = await client.GetAsync(\"api/device/{deviceId}\");\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"5ae7f5c3-4f65-4ca5-acb4-95bd63f16f07","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiGetDeviceByIdAsync():\r\n    # fill in parameters\r\n    deviceId=\"\"\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/device/{deviceId}')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.get(uri, auth=creds) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiGetDeviceByIdAsync())","externalUrl":null,"Type":"CompilableModule"}]},"delete":{"tags":["Device Operations"],"summary":"Delete a device","description":"Delete the device specified by its device ID.\r\n            We recommend that prior to making API call, first make the <b>‘list’</b> API call to fetch a list of desired accounts and their devices and then use the returned data. \r\n              Note also that the Device ID, used to specify a device, can be found in the <b>Device Details</b> pane, displayed when clicking a device in the Portnox Cloud portal’s <b>Devices</b> > <b>Accounts</b>.","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiDeleteDeviceAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"deviceId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Device deleted"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"ad44cf3c-d349-4e78-a305-22b7d24d93df","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task ApiDeleteDeviceAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = (object)null;\r\n\r\n            // send the request\r\n            var response = await client.SendAsync(new HttpRequestMessage\r\n\t\t\t\t{\r\n\t\t\t\t\tMethod = HttpMethod.Delete,\r\n\t\t\t\t\tRequestUri = new Uri(\"api/device/{deviceId}\", UriKind.Relative),\r\n\t\t\t\t\tContent = (request == null) ? null\r\n\t\t\t\t\t\t: new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\")\r\n\t\t\t\t});\r\n\r\n            // throw HttpRequestException if response status code was other than 200 OK\r\n            response.EnsureSuccessStatusCode();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"4063601c-7d71-4c29-877e-d50723172902","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiDeleteDeviceAsync():\r\n    # fill in parameters\r\n    deviceId=\"\"\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/device/{deviceId}')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.delete(uri, auth=creds) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiDeleteDeviceAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/device/block":{"post":{"tags":["Device Operations"],"summary":"Block a device","description":"Block the specified device.\r\n              We recommend that prior to making API call, first make the <b>‘list’</b> API call to fetch a list of desired accounts and their devices and then use the returned data. \r\n              Note also that the Device ID, used to specify a device, can be found in the <b>Device Details</b> pane, displayed when clicking a device in the Portnox Cloud portal’s <b>Devices</b> > <b>Accounts</b>.","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiBlockDevice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/BlockEntityRequest"}}],"responses":{"200":{"description":"Device blocked"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"4b8868c7-bc0f-45fa-9534-bc2c0361e641","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task ApiBlockDevice(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                EntityId = \"<device-guid>\",\r\n                Reason = \"Too many authentication attempts\"\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/device/block\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // throw HttpRequestException if response status code was other than 200 OK\r\n            response.EnsureSuccessStatusCode();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"24a0e675-a23c-49cd-b924-0400fe2881ce","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiBlockDevice():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"EntityId\": \"<device-guid>\",\r\n  \"Reason\": \"Too much authentication attempts\"\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/device/block')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiBlockDevice())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/device/list":{"post":{"tags":["Device Operations"],"summary":"Fetch a list of accounts and their devices","description":"Fetch a list of accounts and their devices. \r\n             You can narrow down the search by applying filter criteria (analogous to the <b>Search</b> criteria available in the Portnox Cloud portal’s <b>Devices</b> > <b>Accounts</b> page).\r\n             You can also specify ‘fetching with continuation’ using the PageNumber and PageSize parameters, if the returned list is expected to be very long.","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiLookupDevices","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/DeviceQueryRequest"}}],"responses":{"200":{"description":"Account and devices were fetched","schema":{"$ref":"#/definitions/DeviceQueryResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"96d2e215-a720-47c9-b169-d393c52cc787","name":"List first 10 devices and their accounts","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiLookupDevices(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                Query = new\r\n                {\r\n                    PageNumber = 1,\r\n                    PageSize = 10               // allowed values 5..30\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/device/list\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"1a36e152-c315-4a3b-a9e9-27d4a98b964a","name":"List devices with Chrome browser installed","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiLookupDevices(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                Query = new\r\n                {\r\n                    Page = 1,\r\n                    PageSize = 15               // allowed values 5..30\r\n                },\r\n                Search = new\r\n                {\r\n                    Field = 15,                 // Browser\r\n                    Value = \"Chrome\"\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/device/list\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"f2cbc6b6-d564-4bb4-86db-51843a58c113","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiLookupDevices():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"Query\": {\r\n    \"Filter\": null,\r\n    \"PageNumber\": 1,\r\n    \"PageSize\": 8,\r\n    \"Order\": 0,\r\n    \"OrderBy\": null\r\n  },\r\n  \"Search\": null,\r\n  \"ClientTimeOffset\": 0,\r\n  \"IncludeAccountWithoutDevices\": false,\r\n  \"Order\": null,\r\n  \"StartTimeLimit\": null,\r\n  \"EndTimeLimit\": null,\r\n  \"StartReportedTimeLimit\": null,\r\n  \"EndReportedTimeLimit\": null,\r\n  \"StartCreatedTimeLimit\": null,\r\n  \"EndCreatedTimeLimit\": null\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/device/list')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiLookupDevices())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/ldap-accounts":{"post":{"tags":["Account Operations"],"summary":"Create one or multiple Acive Directory accounts","description":"Create a list of Active Directory accounts based on the request data","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiCreateLdapAccountsAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateLdapAccountsApiRequest"}}],"responses":{"200":{"description":"Account was successfully created","schema":{"$ref":"#/definitions/AccountEntitiesResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"63274d2d-2256-45b4-8cd9-58bc9acd9947","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiCreateLdapAccountsAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/ldap-accounts')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiCreateLdapAccountsAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/list-mac-based-accounts/{pageIdx}":{"get":{"tags":["Account Operations"],"summary":"List MAB accounts","description":"Fetch all the details of the MAB accounts page by page.\r\nPage index starts with 1. Page size is 50","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiListMacBasedAccountInfoAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"pageIdx","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Fetched accounts","schema":{"$ref":"#/definitions/ListMacBasedAccountsResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"8234b2c9-bc83-4d42-9fdf-7580d9b0e8aa","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiListMacBasedAccountInfoAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = (object)null;\r\n\r\n            // send the request\r\n            var response = await client.GetAsync(\"api/list-mac-based-accounts/{pageIdx}\");\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"5a78caa4-c696-44e5-97a1-ca9ae4f7f808","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiListMacBasedAccountInfoAsync():\r\n    # fill in parameters\r\n    pageIdx=\"\"\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/list-mac-based-accounts/{pageIdx}')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.get(uri, auth=creds) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiListMacBasedAccountInfoAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/mac-based-accounts":{"post":{"tags":["Account Operations"],"summary":"Create one or multiple MAC-based accounts","description":"Create a list of MAB accounts based on the request data","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiCreateMacBasedAccountsAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateMacBasedAccountsApiRequest"}}],"responses":{"200":{"description":"Account was successfully created","schema":{"$ref":"#/definitions/AccountEntitiesResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"5c744718-b12d-4b2f-a683-530888455c40","name":"Create MAC-based account","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiCreateMacBasedAccountsAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                MacBasedAccounts = new[]\r\n                {\r\n                    new\r\n                    {\r\n                        AccountName = \"<user-name>\",\r\n                        Description = \"MAC-based account\",\r\n                        MacWhiteList = new[]\r\n                        {\r\n                            new\r\n                            {\r\n                                Mac = \"<mac-address>\",\r\n                                Description = \"MAC address\",\r\n                                Expiration = \"yyyy-MM-ddTHH:mm:ss.FFFFFFFK\"\r\n                            },\r\n                        },\r\n                        VendorsWhiteList = new[] \r\n                        { \r\n                            new\r\n                            {\r\n                                VendorName = \"<mac-vendor>\"\r\n                            },\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/mac-based-accounts\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"0be1ae04-ad04-4b07-8f66-8f876e778cbc","name":"Create multiple MAC-based accounts","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiCreateMacBasedAccountsAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                MacBasedAccounts = new[]\r\n                {\r\n                    new\r\n                    {\r\n                        AccountName = \"<user-name>\",\r\n                        Description = \"First MAC-based account\",\r\n                        MacWhiteList = new[]\r\n                        {\r\n                            new\r\n                            {\r\n                                Mac = \"<mac-address>\",\r\n                                Description = \"MAC address\"\r\n                            },\r\n                        },\r\n                        VendorsWhiteList = new[] \r\n                        { \r\n                            new\r\n                            {\r\n                                VendorName = \"<mac-vendor>\"\r\n                            },\r\n                        }\r\n                    },\r\n                    new\r\n                    {\r\n                        AccountName = \"<user-name>\",\r\n                        Description = \"Second MAC-based account\",\r\n                        MacWhiteList = new[]\r\n                        {\r\n                            new\r\n                            {\r\n                                Mac = \"<mac-address>\",\r\n                                Description = \"MAC address\"\r\n                            },\r\n                        },\r\n                        VendorsWhiteList = new[] \r\n                        { \r\n                            new\r\n                            {\r\n                                VendorName = \"<mac-vendor>\"\r\n                            },\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/mac-based-accounts\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"a45e2c27-fef1-48fd-9701-ee62f7dc6097","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiCreateMacBasedAccountsAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"MacBasedAccounts\": [\r\n    {\r\n      \"AccountName\": \"<user-name>\",\r\n      \"Description\": \"MAC-based account\",\r\n      \"MacWhiteList\": [\r\n        {\r\n          \"Description\": \"MAC address\",\r\n          \"Mac\": \"<mac-address>\",\r\n          \"Expiration\": \"2026-06-19T18:48:15.4513261Z\"\r\n        }\r\n      ],\r\n      \"VendorsWhiteList\": [\r\n        {\r\n          \"VendorPrefixes\": null,\r\n          \"VendorName\": \"<mac-vendor>\"\r\n        }\r\n      ],\r\n      \"CredentialsExpirationDate\": null,\r\n      \"AllowAgentlessDevices\": true,\r\n      \"PutDevicesIntoVoiceVlan\": false,\r\n      \"IdentityPreSharedKey\": null\r\n    }\r\n  ]\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/mac-based-accounts')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiCreateMacBasedAccountsAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/mac-based-accounts/{accountId}":{"get":{"tags":["Account Operations"],"summary":"Get a MAB account","description":"Fetch all the details of the MAB account specified by its ID","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiGetMacBasedAccountInfoAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","required":true,"type":"string"}],"responses":{"404":{"description":"Account with specified ID was not found"},"200":{"description":"Account fetched","schema":{"$ref":"#/definitions/MabAccountApiItem"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"966ff5f6-777e-4fee-937e-ac46caf6fbcf","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiGetMacBasedAccountInfoAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = (object)null;\r\n\r\n            // send the request\r\n            var response = await client.GetAsync(\"api/mac-based-accounts/{accountId}\");\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"f174871e-6a0f-41fb-8c6a-9583fea51211","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiGetMacBasedAccountInfoAsync():\r\n    # fill in parameters\r\n    accountId=\"\"\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/mac-based-accounts/{accountId}')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.get(uri, auth=creds) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiGetMacBasedAccountInfoAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/mac-based-accounts/change-expiration":{"post":{"tags":["Account Operations"],"summary":"Change MAC-address expiration time","description":"Change expiration time for one or multiple MACs in MAB account","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiChangeMacAddressExpirationAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/MacExpirationChangeRequest"}}],"responses":{"200":{"description":"Expiration time for requested MACs has been changed"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"dd3b1e04-4681-4a4d-8d9e-b3913c26901d","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiChangeMacAddressExpirationAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"AccountName\": \"<directory-domain>\\\\\\\\\\\\\\\\<ldap-user>\",\r\n  \"MacWhiteList\": [\r\n    {\r\n      \"Description\": \"MAC address\",\r\n      \"Mac\": \"<mac-address>\",\r\n      \"Expiration\": \"2026-06-19T18:48:15.4669534Z\"\r\n    }\r\n  ]\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/mac-based-accounts/change-expiration')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiChangeMacAddressExpirationAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/mac-based-accounts/mac-whitelist-add":{"post":{"tags":["Account Operations"],"summary":"Add MAC Addresses to an existing MAC-based account","description":"Add mac addresses to the whitelist of an existing MAC-based account","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiAddMacAddressesToMacBasedAccountAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/UpdateMabAccountMacWhiteListApiRequest"}}],"responses":{"200":{"description":"Mac addresses were successfully added"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"163809d9-d2c8-4cd9-8bb6-24dfd4d324e1","name":"Add MAC Addresses to an existing MAC-based account","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task ApiAddMacAddressesToMacBasedAccountAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                AccountName = \"<user-name>\",\r\n                MacWhiteList = new[]\r\n                {\r\n                    new\r\n                    {\r\n                        Mac = \"<mac-address>\",\r\n                        Description = \"MAC address\",\r\n                        Expiration = \"yyyy-MM-ddTHH:mm:ss.FFFFFFFK\"\r\n                    }\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/mac-based-accounts/mac-whitelist-add\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // throw HttpRequestException if response status code was other than 200 OK\r\n            response.EnsureSuccessStatusCode();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"72d897bc-23fd-4252-ad29-3fd7ba144770","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiAddMacAddressesToMacBasedAccountAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"AccountName\": \"<user-name>\",\r\n  \"MacWhiteList\": [\r\n    {\r\n      \"Description\": \"MAC address\",\r\n      \"Mac\": \"<mac-address>\",\r\n      \"Expiration\": \"2026-06-19T18:48:15.4669534Z\"\r\n    }\r\n  ]\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/mac-based-accounts/mac-whitelist-add')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiAddMacAddressesToMacBasedAccountAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/mac-based-accounts/mac-whitelist-move":{"post":{"tags":["Account Operations"],"summary":"Move MAC Addresses with corresponding devices between MAC-based accounts","description":"Move mac addresses with corresponding devices between MAC-based accounts. If request list is empty, entire whitelist will be moved","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiMoveMacAddressesToAnotherMacBasedAccountAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/MoveMacAddressesToAnotherMabAccountApiRequest"}}],"responses":{"200":{"description":"Mac addresses with devices were successfully moved"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"894bdf62-73fe-462a-b2c4-8304db06ed87","name":"Move MAC Addresses with corresponding devices between MAC-based accounts","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task ApiMoveMacAddressesToAnotherMacBasedAccountAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                CurrentAccountName = \"<user-name>\",\r\n                TargetAccountName = \"<user-name>\",\r\n                MacWhiteList = new[]\r\n                {\r\n                    new\r\n                    {\r\n                        Mac = \"<mac-address>\"\r\n                    }\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/mac-based-accounts/mac-whitelist-move\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // throw HttpRequestException if response status code was other than 200 OK\r\n            response.EnsureSuccessStatusCode();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"2bf4fd2c-3a81-4e34-a252-7603085ff219","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiMoveMacAddressesToAnotherMacBasedAccountAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"CurrentAccountName\": \"<user-name>\",\r\n  \"TargetAccountName\": \"<user-name>\",\r\n  \"MacWhiteList\": [\r\n    {\r\n      \"Description\": null,\r\n      \"Mac\": \"<mac-address>\",\r\n      \"Expiration\": null\r\n    }\r\n  ]\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/mac-based-accounts/mac-whitelist-move')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiMoveMacAddressesToAnotherMacBasedAccountAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/mac-based-accounts/mac-whitelist-remove":{"delete":{"tags":["Account Operations"],"summary":"Remove MAC Addresses from an existing MAC-based account","description":"Remove mac addresses from the whitelist of an existing MAC-based account. If request list is empty, entire whitelist will be removed","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiRemoveMacAddressesFromMacBasedAccountAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/UpdateMabAccountMacWhiteListApiRequest"}}],"responses":{"200":{"description":"Mac addresses were successfully removed"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"d76ce959-944d-4ca4-bd36-2c2b6c3ffa0f","name":"Remove MAC Addresses from an existing MAC-based account","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task ApiRemoveMacAddressesFromMacBasedAccountAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                AccountName = \"<user-name>\",\r\n                MacWhiteList = new[]\r\n                {\r\n                    new\r\n                    {\r\n                        Mac = \"<mac-address>\"\r\n                    }\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.SendAsync(new HttpRequestMessage\r\n\t\t\t\t{\r\n\t\t\t\t\tMethod = HttpMethod.Delete,\r\n\t\t\t\t\tRequestUri = new Uri(\"api/mac-based-accounts/mac-whitelist-remove\", UriKind.Relative),\r\n\t\t\t\t\tContent = (request == null) ? null\r\n\t\t\t\t\t\t: new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\")\r\n\t\t\t\t});\r\n\r\n            // throw HttpRequestException if response status code was other than 200 OK\r\n            response.EnsureSuccessStatusCode();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"235a9776-c9b1-4a44-82f8-d7506584c3a5","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiRemoveMacAddressesFromMacBasedAccountAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"AccountName\": \"<user-name>\",\r\n  \"MacWhiteList\": [\r\n    {\r\n      \"Description\": null,\r\n      \"Mac\": \"<mac-address>\",\r\n      \"Expiration\": null\r\n    }\r\n  ]\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/mac-based-accounts/mac-whitelist-remove')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.delete(uri, auth=creds) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiRemoveMacAddressesFromMacBasedAccountAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/mac-based-accounts/search":{"post":{"tags":["Account Operations"],"summary":"Search MAB accounts by whitelisted MAC Addresses","description":"Search MAB accounts by whitelisted MAC Addresses","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiLookUpMacBasedAccountsByMacAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/MacAccountSearchByMacRequest"}}],"responses":{"200":{"description":"Mac addresses with requested macs were successfully searched","schema":{"$ref":"#/definitions/AccountEntitiesResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"7a5e867a-3c0b-45f2-8118-a08b17c98eea","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiLookUpMacBasedAccountsByMacAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"MacWhiteList\": [\r\n    {\r\n      \"Description\": \"MAC address\",\r\n      \"Mac\": \"<mac-address>\",\r\n      \"Expiration\": \"2026-06-19T18:48:15.4669534Z\"\r\n    }\r\n  ]\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/mac-based-accounts/search')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiLookUpMacBasedAccountsByMacAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/nases":{"post":{"tags":["Network Sites Operations"],"summary":"Get NASes list","description":"Fetch all the NASes of the organization with specified mode: All, Enforcement or Monitoring","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiGetNasesAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/NasRequest"}}],"responses":{"200":{"description":"List of NASes","schema":{"type":"array","items":{"$ref":"#/definitions/NetworkAccessServer"}}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"5d147910-721c-4d9b-84dd-9bac2c73af7e","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiGetNasesAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/nases')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiGetNasesAsync())","externalUrl":null,"Type":"CompilableModule"}]},"put":{"tags":["Network Sites Operations"],"summary":"Update NASes","description":"Updates NASes.\r\nFields assinged with null/undefined values are ignored; their values are kept intact.\r\nIf NasId does not match any NAS in organization such object is ignored.\r\nWhen several entries have the same NasId such input is considered malicious and whole request is declined without processing.\r\nThe batch update limit is 250 NASes per request","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiPutNasesAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","in":"body","required":true,"schema":{"$ref":"#/definitions/NasUpdateRequest"}}],"responses":{"200":{"description":"Updated NASes","schema":{"type":"array","items":{"$ref":"#/definitions/NetworkAccessServer"}}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"78f58bb6-8932-4790-b026-f7ad10d1a288","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiPutNasesAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                Nases = new[] \r\n                {\r\n                    new\r\n                    {\r\n                        NasId = \"<nas-id>\",\r\n                        DisplayName = \"<display-name>\",\r\n                        Vendor = 0,\r\n                        Description = \"<description>\",\r\n                        IsMonitoringModeEnabled = false\r\n                    }\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PutAsync(\"api/nases\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"24ba55ac-567d-4999-9f4a-f342fb42b15b","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiPutNasesAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"Nases\": [\r\n    {\r\n      \"NasId\": \"<nas-id>\",\r\n      \"DisplayName\": \"<display-name>\",\r\n      \"Vendor\": 0,\r\n      \"Description\": \"<description>\",\r\n      \"IsMonitoringModeEnabled\": false\r\n    },\r\n    {\r\n      \"NasId\": \"<nas-id>\",\r\n      \"DisplayName\": null,\r\n      \"Vendor\": null,\r\n      \"Description\": null,\r\n      \"IsMonitoringModeEnabled\": true\r\n    }\r\n  ]\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/nases')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.put(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiPutNasesAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/nases/sites":{"get":{"tags":["Network Sites Operations"],"summary":"Get network sites","description":"Fetch all the details of the organization networks sites","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiGetNetworkSitesAsync","consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"List of sites","schema":{"$ref":"#/definitions/NetworkSitesResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"0bdf796e-6cf4-45ac-a576-7cfdb64e0e0b","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiGetNetworkSitesAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = (object)null;\r\n\r\n            // send the request\r\n            var response = await client.GetAsync(\"api/nases/sites\");\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"947ce204-cab3-4c98-a233-d9dba4440f09","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiGetNetworkSitesAsync():\r\n    \r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/nases/sites')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.get(uri, auth=creds) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiGetNetworkSitesAsync())","externalUrl":null,"Type":"CompilableModule"}]},"put":{"tags":["Network Sites Operations"],"summary":"Create a site","description":"Create a new site based on the request data","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiCreateNetworkSiteAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"req","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateNetworkSiteRequest"}}],"responses":{"200":{"description":"Site was created","schema":{"$ref":"#/definitions/NetworkSiteResponse"}},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"c70d81eb-36d8-48de-a318-0b7a8cff41f0","name":"Create network site","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiCreateNetworkSiteAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                Name = \"<site-name>\",\r\n                Description = \"New site\",\r\n                Rules = new[]\r\n                {\r\n                    new\r\n                    {\r\n                        Type = \"IpRange\",\r\n                        From = \"<start-ip-address>\",\r\n                        To = \"<end-ip-address>\"\r\n                    }\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PutAsync(\"api/nases/sites\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"2f4f7985-83a3-4f39-928c-b4af01d00640","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiCreateNetworkSiteAsync():\r\n    # fill in parameters\r\n    payload = json.loads(\"\"\"{\r\n  \"Name\": \"<site-name>\",\r\n  \"Description\": \"New site\",\r\n  \"ParentId\": \"<site-guid>\",\r\n  \"Rules\": [\r\n    {\r\n      \"Type\": 1,\r\n      \"From\": \"<start-ip-address>\",\r\n      \"To\": null,\r\n      \"Mask\": 24\r\n    },\r\n    {\r\n      \"Type\": 2,\r\n      \"From\": \"<start-ip-address>\",\r\n      \"To\": \"<end-ip-address>\",\r\n      \"Mask\": null\r\n    }\r\n  ]\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/nases/sites')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.put(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiCreateNetworkSiteAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/nases/sites/{siteId}":{"delete":{"tags":["Network Sites Operations"],"summary":"Delete a network site","description":"Delete the specified network site","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiDeleteNetworkSiteAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"siteId","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"Site deleted"},"404":{"description":"Site was not found"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"9c97d763-88f6-4588-a990-2af807b71dc3","name":"Code sample","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task ApiDeleteNetworkSiteAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = (object)null;\r\n\r\n            // send the request\r\n            var response = await client.SendAsync(new HttpRequestMessage\r\n\t\t\t\t{\r\n\t\t\t\t\tMethod = HttpMethod.Delete,\r\n\t\t\t\t\tRequestUri = new Uri(\"api/nases/sites/{siteId}\", UriKind.Relative),\r\n\t\t\t\t\tContent = (request == null) ? null\r\n\t\t\t\t\t\t: new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\")\r\n\t\t\t\t});\r\n\r\n            // throw HttpRequestException if response status code was other than 200 OK\r\n            response.EnsureSuccessStatusCode();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"75640c64-8399-4edd-98b0-140abe466824","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiDeleteNetworkSiteAsync():\r\n    # fill in parameters\r\n    siteId=\"\"\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/nases/sites/{siteId}')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.delete(uri, auth=creds) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    return None\r\n\r\nif __name__ == '__main__':\r\n    print(ApiDeleteNetworkSiteAsync())","externalUrl":null,"Type":"CompilableModule"}]}},"/api/nases/sites/{siteId}/rules":{"post":{"tags":["Network Sites Operations"],"summary":"Change a network site rules","description":"Change a network site rules based on the request data","operationId":"Portnox.CloudPortalBackEndRole.CloudPortalBackEndSwaggerDocs.ApiChangeRulesForNetworkSiteAsync","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"siteId","in":"path","required":true,"type":"string"},{"name":"req","in":"body","required":true,"schema":{"$ref":"#/definitions/ChangeNetworkSiteRulesRequest"}}],"responses":{"200":{"description":"Site was created","schema":{"$ref":"#/definitions/NetworkSiteResponse"}},"404":{"description":"Site was not found"},"400":{"description":"Missing or malformed parameter"},"401":{"description":"Provided organizational credentials are not valid"},"403":{"description":"Access denied due to the license restrictions"},"500":{"description":"Internal server error"}},"security":[{"basicAuth":[]},{"apiKey":[]}],"codeSamples":[{"id":"56b09d9b-735b-427f-af3e-fbf7078554c7","name":"Rule with ip range","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiChangeRulesForNetworkSiteAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                Rules = new[]\r\n                {\r\n                    new\r\n                    {\r\n                        Type = \"IpRange\",\r\n                        From = \"<start-ip-address>\",\r\n                        To = \"<end-ip-address>\"\r\n                    }\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/nases/sites/{siteId}/rules\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"e347c163-a161-47ff-a34a-9c28f0755970","name":"Rule with CIDR range","language":"C#","code":"using System;\r\nusing System.Net.Http;\r\nusing System.Net.Http.Headers;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Newtonsoft.Json;\r\n\r\nnamespace PortnoxApi\r\n{\r\n    public class ApiClient\r\n    {\r\n        public async Task<string> ApiChangeRulesForNetworkSiteAsync(string login, string password)\r\n        {\r\n            // create HTTP client\r\n            var client = new HttpClient\r\n            {\r\n                BaseAddress = new Uri(\"https://clear.portnox.com:8081/CloudPortalBackEnd/\")\r\n            };\r\n\r\n            // clear all headers\r\n            client.DefaultRequestHeaders.Accept.Clear();\r\n\r\n            // add authorization header with CLEAR admin login and password\r\n            var credentials = string.Format(\"{0}:{1}\", login, password);\r\n\t\t\tvar headerValue = Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));\r\n            client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(\"Basic\", headerValue);\r\n\r\n            // add mediatype header\r\n            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(\"application/json\"));\r\n\r\n            // create request body\r\n            var request = new\r\n            {\r\n                Rules = new[]\r\n                {\r\n                    new\r\n                    {\r\n                        Type = \"Cidr\",\r\n                        From = \"<start-ip-address>\",\r\n                        Mask = 24\r\n                    }\r\n                }\r\n            };\r\n\r\n            // send the request\r\n            var response = await client.PostAsync(\"api/nases/sites/{siteId}/rules\",\r\n                new StringContent(JsonConvert.SerializeObject(request), Encoding.UTF8, \"application/json\"));\r\n\r\n            // read response body as string if response status code was 200 OK\r\n            // or throw HttpRequestException otherwise\r\n            return await response.EnsureSuccessStatusCode().Content.ReadAsStringAsync();\r\n        }\r\n    }\r\n}","externalUrl":null,"Type":"CompilableModule"},{"id":"91753e3c-6683-4973-b499-a94aedf161fc","name":"Code sample","language":"Python 3","code":"import json\r\nimport requests\r\nfrom requests.auth import HTTPBasicAuth\r\nfrom urllib.parse import urljoin\r\n\r\nBASE_URI = 'https://clear.portnox.com:8081/CloudPortalBackEnd/'\r\nLOGIN = '<CLEAR admin login>'\r\nPASS = '<CLEAR admin password>'\r\n\r\ndef ApiChangeRulesForNetworkSiteAsync():\r\n    # fill in parameters\r\n    siteId=\"\"\r\n    payload = json.loads(\"\"\"{\r\n  \"Rules\": [\r\n    {\r\n      \"Type\": 1,\r\n      \"From\": \"<start-ip-address>\",\r\n      \"To\": null,\r\n      \"Mask\": 24\r\n    },\r\n    {\r\n      \"Type\": 2,\r\n      \"From\": \"<start-ip-address>\",\r\n      \"To\": \"<end-ip-address>\",\r\n      \"Mask\": null\r\n    }\r\n  ]\r\n}\"\"\")\r\n\r\n\r\n    # prepare request\r\n    uri = urljoin(BASE_URI, f'api/nases/sites/{siteId}/rules')\r\n    creds = HTTPBasicAuth(LOGIN, PASS)\r\n\r\n    # send REST request\r\n    response = requests.post(uri, auth=creds, json=payload) \r\n\r\n    # throw if status code other than 200 OK\r\n    if response.status_code != 200:\r\n        raise Exception(f'Request failed with status code {response.status_code}')\r\n\r\n    # return JSON string response\r\n    return response.text\r\n    # or else\r\n    # return response.json()\r\n\r\nif __name__ == '__main__':\r\n    print(ApiChangeRulesForNetworkSiteAsync())","externalUrl":null,"Type":"CompilableModule"}]}}},"tags":[{"name":"Account Operations","description":"API methods for account operations in the organizational Portnox Cloud portal."},{"name":"Device Operations","description":"API methods for device operations in the organizational Portnox Cloud portal."},{"name":"Network Sites Operations","description":"API methods for network sites operations in the organizational Portnox Cloud portal."}],"definitions":{"AccountApiItem":{"properties":{"OrgId":{"type":"string"},"AccountName_UI":{"type":"string"},"AccountName":{"type":"string"},"AccountId":{"type":"string"},"AdDomain":{"type":"string"},"MailDomain":{"type":"string"},"Alias":{"type":"string"},"IsComputer":{"type":"boolean"},"Description":{"type":"string"},"Phone":{"type":"string"},"GroupId":{"type":"string"},"RepositoryId":{"type":"string"},"RepositoryObjectId":{"type":"string"},"CreatedAt":{"type":"string","format":"date-time"},"AgentlessOptions":{"$ref":"#/definitions/AgentlessAccountOptionsApiItem"},"RadiusOptions":{"$ref":"#/definitions/RadiusOptionsApiItem"},"LdapEmails":{"type":"array","items":{"type":"string"}},"LdapUpns":{"type":"array","items":{"type":"string"}},"LdapAllUpns":{"type":"array","items":{"type":"string"}},"Certificates":{"type":"array","items":{"$ref":"#/definitions/AuthorityCertificateInfoApiItem"}},"IsBlockByAdmin":{"type":"boolean"},"BlockReason":{"type":"string"},"LatestCertificate":{"$ref":"#/definitions/AuthorityCertificateInfoApiItem"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"AccountApiItem"},"AccountDevices":{"properties":{"Account":{"$ref":"#/definitions/AccountApiItem"},"Devices":{"description":"List of devices within given account","type":"array","items":{"$ref":"#/definitions/DeviceListItem"}}},"type":"object","format":"AccountDevices"},"AccountEntitiesResponse":{"properties":{"Accounts":{"type":"array","items":{"$ref":"#/definitions/AccountApiItem"}},"UnupsertedAccounts":{"type":"array","items":{"$ref":"#/definitions/AccountApiItem"}},"IsSuccess":{"type":"boolean"}},"type":"object","format":"AccountEntitiesResponse"},"AdministrativeVulnerabilities":{"properties":{"Administrators":{"type":"array","items":{"type":"string"}},"NonExpiringPasswordUsers":{"type":"array","items":{"type":"string"}},"WeakPasswordUsers":{"type":"array","items":{"type":"string"}},"EnabledGuestAccounts":{"type":"array","items":{"type":"string"}},"AutologonDisabled":{"type":"boolean"},"AnonymousAccessRestricted":{"type":"boolean"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"AdministrativeVulnerabilities"},"AgentlessAccountOptionsApiItem":{"properties":{"AllowAgentless":{"type":"boolean"},"LastUpdatedBy":{"type":"string"},"LastUpdatedOn":{"type":"string","format":"date-time"},"AccountExpiration":{"type":"string","format":"date-time"},"MacWhiteList":{"type":"array","items":{"$ref":"#/definitions/MacWhiteListApiItem"}},"VendorsWhiteList":{"type":"array","items":{"$ref":"#/definitions/MacVendorWhiteListApiItem"}},"SecureMabOptions":{"$ref":"#/definitions/SecureMabOptionsApiItem"}},"type":"object","format":"AgentlessAccountOptionsApiItem"},"AlertDetailsAttribute":{"properties":{"Name":{"type":"string"},"Description":{"type":"string"}},"type":"object","format":"AlertDetailsAttribute"},"AppInstallationSourceSettings":{"properties":{"SourceType":{"description":"\r\n\r\n    None = 0 \r\n    AppStore = 1 \r\n    AppStoreAndIdentifiedDevelopers = 2 \r\n    Anywhere = 3 \r\n","type":"integer","format":"enum"}},"type":"object","format":"AppInstallationSourceSettings"},"AuthorityCertificateInfoApiItem":{"properties":{"Thumbprint":{"type":"string"},"IssuedTo":{"type":"string"},"IssuedBy":{"type":"string"},"SerialNumber":{"type":"string"},"Expired":{"type":"string","format":"date-time"},"Status":{"description":"\r\n\r\n    Unknown = 0 \r\n    Active = 1 \r\n    Revoked = 2 \r\n","type":"integer","format":"enum"},"RevokedAt":{"type":"string","format":"date-time"},"RevokedBy":{"type":"string"},"IsCertReissueAllowed":{"type":"boolean"}},"type":"object","format":"AuthorityCertificateInfoApiItem"},"AutoLoginInfo":{"properties":{"IsEnabled":{"type":"boolean"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"AutoLoginInfo"},"BitlockerInfo":{"properties":{"DeviceID":{"type":"string"},"PersistentVolumeID":{"type":"string"},"DriveLetter":{"type":"string"},"ProtectionStatus":{"description":"\r\n\r\n    Off = 0 \r\n    On = 1 \r\n    Unknown = 2 \r\n","type":"integer","format":"enum"},"StatusDelayCount":{"type":"integer","format":"int32","default":"0"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"BitlockerInfo"},"BlockEntityRequest":{"properties":{"EntityId":{"description":"Id of device or account name to block. Can be found on devices page.","type":"string"},"Reason":{"description":"Blocking reason","type":"string"}},"type":"object","format":"BlockEntityRequest"},"CallerDeviceId":{"properties":{"IdType":{"description":"\r\n\r\n    None = 0 \r\n    MacAddress = 1 \r\n    IpAddress = 2 \r\n","type":"integer","format":"enum"},"CallerId":{"type":"string"},"CallerMACVendor":{"type":"string"}},"type":"object","format":"CallerDeviceId"},"CallingDevice":{"properties":{"MacAddress":{"type":"string"},"ComputerName":{"type":"string"},"IpAdresses":{"type":"array","items":{"type":"string"}},"OsType":{"description":"\r\n\r\n    iOS = 0 \r\n    Android = 1 \r\n    Windows = 2 \r\n    MacOsX = 3 \r\n    ChromeOs = 4 \r\n    Linux = 5 \r\n    Unix = 6 \r\n    Other = 7 \r\n    Unknown = 999 \r\n","type":"integer","format":"enum"}},"type":"object","format":"CallingDevice"},"ChangeNetworkSiteRulesRequest":{"properties":{"Rules":{"description":"New network rules for site","type":"array","items":{"$ref":"#/definitions/NetworkSiteRule"}}},"type":"object","format":"ChangeNetworkSiteRulesRequest"},"ClearAccountApiItem":{"properties":{"AccountName":{"description":"Account name for Portnox Account.","type":"string"},"Description":{"description":"Account description in a free form","type":"string"},"CredentialsExpirationDate":{"description":"Pass null, empty string, or omit if no expiration. Date format is 'yyyy-MM-ddTHH:mm:ss.FFFFFFFK'","type":"string"},"AllowAgentlessDevices":{"description":"Indicates wheather agentless devices can be authenticated using this account credentials","type":"boolean"}},"type":"object","format":"ClearAccountApiItem"},"ComputerData":{"properties":{"Network":{"$ref":"#/definitions/NetworkConnection"},"ComputerSystem":{"$ref":"#/definitions/ComputerSystem"},"ComputerOperatingSystem":{"$ref":"#/definitions/ComputerOperatingSystem"},"SystemHotFixes":{"description":"Information about device operation system. Available only for computers","type":"array","items":{"$ref":"#/definitions/SystemHotFix"}},"Processors":{"description":"Information about device processors. Available only for computers","type":"array","items":{"$ref":"#/definitions/ComputerProcessor"}},"InstaledCertificates":{"description":"List of certificates installed on device. Available only for computers","type":"array","items":{"$ref":"#/definitions/InstalledCertificate"}},"TpmInfo":{"$ref":"#/definitions/TpmInfo"},"BitlockerInfo":{"type":"array","items":{"$ref":"#/definitions/BitlockerInfo"}},"ComputerNetworkInterfaces":{"description":"List of known computer network interfaces. Available only for computers","type":"array","items":{"$ref":"#/definitions/ComputerNetworkInterface"}},"WindowsSecurityCenter":{"$ref":"#/definitions/WindowsSecurityCenter"},"WindowsUpdateInfo":{"$ref":"#/definitions/WindowsUpdateInfo"},"Peripherals":{"description":"Information about peripheral devices connected to current device. Available only for computers","type":"array","items":{"$ref":"#/definitions/PeripheralDevice"}},"MemoryInfo":{"$ref":"#/definitions/MemoryInfo"},"PasscodePolicy":{"$ref":"#/definitions/PasscodePolicyInfo"},"AutoLoginInfo":{"$ref":"#/definitions/AutoLoginInfo"},"FirewallInfo":{"$ref":"#/definitions/FirewallInfo"},"FileVaultInfo":{"$ref":"#/definitions/FileVaultInfo"},"CriticalSoftwares":{"description":"List of critical software installed on device. Available only for computers","type":"array","items":{"$ref":"#/definitions/CriticalSoftware"}},"HostFileInfo":{"description":"Information about device's host file. Available only for computers","type":"array","items":{"$ref":"#/definitions/HostFileInfo"}},"AppInstallationSourceSettings":{"$ref":"#/definitions/AppInstallationSourceSettings"},"EnabledWindowsFeatures":{"description":"List of Windows enabled features. Available only for windows devices","type":"array","items":{"$ref":"#/definitions/WindowsFeature"}},"Drivers":{"description":"List of drivers installed on the device. Available only for computers","type":"array","items":{"$ref":"#/definitions/DriverInfo"}},"LocalUsers":{"description":"List of users registered on the device. Available only for computers","type":"array","items":{"$ref":"#/definitions/LocalUser"}},"LocalUserGroups":{"type":"array","items":{"$ref":"#/definitions/LocalUserGroup"}},"AdministrativeVulnerabilities":{"$ref":"#/definitions/AdministrativeVulnerabilities"},"WindowsRegistryItems":{"description":"Registry items","type":"array","items":{"$ref":"#/definitions/WindowsRegistryItem"}},"MotherBoardInfo":{"$ref":"#/definitions/MotherBoardInfo"},"IsDomainJoined":{"type":"boolean"},"LoggedUsers":{"type":"array","items":{"$ref":"#/definitions/LoggedUser"}},"RunningServices":{"type":"array","items":{"$ref":"#/definitions/RunningService"}},"SslCertificates":{"type":"array","items":{"$ref":"#/definitions/NmapSslCert"}},"DomainName":{"type":"string"},"AllPortsAreFiltered":{"type":"boolean"},"DeviceId":{"type":"string"},"IsAzureJoined":{"type":"boolean"},"ClientSwVersion":{"description":"Version of Portnox AgentP installed on device","type":"string"},"OsVersion":{"description":"Version of operating system installed on device","type":"string"},"DeviceFormFactor":{"description":"Device form-factor: laptop, computer, phone etc..\r\n\r\n    Unknown = 0 \r\n    Desktop = 1 \r\n    Laptop = 2 \r\n    Mobile = 3 \r\n    Tablet = 4 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4]},"TimeZone":{"description":"Timezone which is defined on device","type":"string"},"Timestamp":{"description":"Last device post event time","type":"string","format":"date-time"},"OrganizationPresence":{"description":"Indicates if device is connected to organizational network\r\n\r\n    Outside = 0 \r\n    Inside = 1 \r\n","type":"integer","format":"enum","enum":[0,1]},"RecordId":{"type":"string"},"InstalledApplications":{"description":"List of applications installed on the device","type":"array","items":{"$ref":"#/definitions/InstalledApplication"}},"RemoteConnections":{"description":"List of remote connections","type":"array","items":{"$ref":"#/definitions/RemoteConnection"}},"ListenersPorts":{"description":"List of open ports","type":"array","items":{"$ref":"#/definitions/ListenerPort"}},"LogicalDisks":{"description":"List of hard drives installed on device","type":"array","items":{"$ref":"#/definitions/LogicalDiskInfo"}},"LastOnPremLoging":{"description":"Last login time of given device to network","type":"string","format":"date-time"},"Location":{"$ref":"#/definitions/Location"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"ComputerData"},"ComputerEntity":{"properties":{"ComputerData":{"$ref":"#/definitions/ComputerData"},"ComputerSystem":{"$ref":"#/definitions/ComputerSystem"},"ComputerNetworkInterfaces":{"type":"array","items":{"$ref":"#/definitions/DeviceNetworkInterface"}},"AllMacAddresses":{"type":"array","items":{"type":"string"}},"AllMacVendors":{"type":"array","items":{"$ref":"#/definitions/KeyValuePair (String, String)"}},"AllIpAddresses":{"type":"array","items":{"type":"string"}},"OrgId":{"description":"ID of organization to which device belongs","type":"string"},"AccountId":{"description":"ID of account to which device belongs","type":"string"},"DeviceId":{"description":"Device unique identificator","type":"string"},"LastValidationStatusNasId":{"description":"ID of NAS device was last connected to","type":"string"},"ValidationStatuses":{"description":"Last device authentication info. Regular authentication and via Okta","type":"array","items":{"$ref":"#/definitions/DeviceNetworkAuthNStatus"}},"LastValidationStatus":{"$ref":"#/definitions/DeviceNetworkAuthNStatus"},"DeviceNotficationKey":{"description":"Key for device's push notifications","type":"string"},"DeviceType":{"description":"Device name: computer/phone name or macaddress if first can't be detected","type":"string"},"OsType":{"description":"Device's operating system\r\n\r\n    iOS = 0 \r\n    Android = 1 \r\n    Windows = 2 \r\n    MacOsX = 3 \r\n    ChromeOs = 4 \r\n    Linux = 5 \r\n    Unix = 6 \r\n    Other = 7 \r\n    Unknown = 999 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5,6,7,999]},"InstallationPackageType":{"description":"Installation package type. In case of different installation package this field used to autoupdate\r\n\r\n    Unknown = 0 \r\n    Deb = 1 \r\n    Rpm = 2 \r\n    Windows_x64 = 64 \r\n    Windows_x86 = 86 \r\n","type":"integer","format":"enum","enum":[0,1,2,64,86]},"ExtendedOSInfo":{"$ref":"#/definitions/ExtendedOperatingSystemInfo"},"Status":{"$ref":"#/definitions/DeviceStatus"},"LastIpAddress":{"description":"Last known device IP address","type":"string"},"IsContractorDevice":{"description":"Indicates if device owned by contractor or not","type":"boolean"},"RiskStatus":{"$ref":"#/definitions/DeviceRiskStatus"},"Manufacturer":{"description":"Device manufacturer","type":"string"},"MdmEnrollmentInfo":{"$ref":"#/definitions/DeviceMdmEnrollmentInfo"},"CertificateInformation":{"$ref":"#/definitions/DeviceCertificateInformationEntity"},"MachineCertificate":{"$ref":"#/definitions/DeviceCertificateInformationEntity"},"AccountsCertificates":{"description":"Other accounts certificate information","type":"array","items":{"$ref":"#/definitions/KeyValuePair (String, DeviceCertificateInformationEntity)"}},"UsesOldCredentials":{"type":"boolean"},"ProfilingData":{"$ref":"#/definitions/ProfilingInfo"},"IntuneDeviceData":{"$ref":"#/definitions/IntuneDeviceData"},"AzureValidationResult":{"$ref":"#/definitions/DeviceDomainValidationResult"},"ActiveDirectoryValidationResult":{"$ref":"#/definitions/DeviceDomainValidationResult"},"OrganizationPresence":{"description":"Indicates if device is connected to organizational network\r\n\r\n    Outside = 0 \r\n    Inside = 1 \r\n","type":"integer","format":"enum","enum":[0,1]},"LastOnPremLoging":{"description":"Last login time of given device to network","type":"string","format":"date-time"},"Location":{"$ref":"#/definitions/Location"},"OsVersion":{"description":"Version of operating system installed on device","type":"string"},"AzureTenantId":{"description":"ID of Azure Tenant to which device is connected","type":"string"},"AzureTenantName":{"description":"Name of Azure Tenant to which device is connected","type":"string"},"AzureDeviceId":{"description":"Unique identifier which azure gives for device during device's connection to LDAP","type":"string"},"JamfDeviceId":{"description":"Unique identifier of device in Jamf","type":"string"},"IntuneDeviceId":{"description":"Unique identifier of device in Intune","type":"string"},"AbsoluteDeviceId":{"description":"Unique identifier of device in Absolute","type":"string"},"CrowdStrikeDeviceId":{"description":"Unique identifier of device in CrowdStrike","type":"string"},"CrowdStrikeError":{"description":"Error encountered during CrowdStrike integration\r\n\r\n    Success = 0 \r\n    IntegrationMissing = 1 \r\n    SerialNumberMissing = 2 \r\n    ApiError = 3 \r\n    NoMatchedDevice = 4 \r\n    MultipleMatchedDevices = 5 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5]},"SentinelOneDeviceId":{"description":"Unique identifier of device in SentinelOne","type":"string"},"SentinelOneError":{"description":"Error encountered during SentinelOne integration\r\n\r\n    Success = 0 \r\n    IntegrationMissing = 1 \r\n    SerialNumberMissing = 2 \r\n    ApiError = 3 \r\n    NoMatchedDevice = 4 \r\n    MultipleMatchedDevices = 5 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5]},"DeviceDataTimestamp":{"description":"Last device post event time","type":"string","format":"date-time"},"ClientSwVersion":{"description":"Version of Portnox AgentP installed on device","type":"string"},"CreatedTime":{"type":"string","format":"date-time"},"IsAgentlessDevice":{"type":"boolean"},"IsEnrolledAgentpDevice":{"type":"boolean"},"Id":{"type":"string"},"DeviceKeyShort":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"ComputerEntity"},"ComputerNetworkInterface":{"properties":{"IsConnectedToInternet":{"type":"boolean"},"NetworkName":{"type":"string"},"NetworkConnectionType":{"description":"\r\n\r\n    None = 0 \r\n    Ethernet = 1 \r\n    WiFi = 2 \r\n    VPN = 3 \r\n","type":"integer","format":"enum"},"Ssid":{"type":"string"},"DeviceId":{"type":"string"},"DeviceGUID":{"type":"string"},"Name":{"type":"string"},"Manufacturer":{"type":"string"},"Macaddress":{"type":"string"},"MacVendor":{"type":"string"},"AdapterType":{"type":"string"},"NetworkConfigurations":{"type":"array","items":{"$ref":"#/definitions/NetworkConfiguration"}},"BytesSent":{"type":"integer","format":"uint64"},"BytesReceived":{"type":"integer","format":"uint64"},"NetConnectionID":{"type":"string"},"HasNetworkName":{"type":"boolean"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"ComputerNetworkInterface"},"ComputerOperatingSystem":{"properties":{"Name":{"type":"string"},"Build":{"type":"string"},"TimeZone":{"type":"string"},"IsGenuine":{"type":"boolean"},"Vendor":{"type":"string"},"Edition":{"type":"integer","format":"int32"},"ServicePackMajorVersion":{"type":"integer","format":"int32"},"Language":{"type":"string"},"Architecture":{"type":"string"}},"type":"object","format":"ComputerOperatingSystem"},"ComputerProcessor":{"properties":{"Manufacturer":{"type":"string"},"Name":{"type":"string"},"ProcessorId":{"type":"string"},"MaxSpeed":{"type":"number","format":"uint32"},"Type":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"ComputerProcessor"},"ComputerSystem":{"properties":{"Name":{"type":"string"},"NameLower":{"type":"string"},"Model":{"type":"string"},"Manufacturer":{"type":"string"},"Domain":{"type":"string"},"DomainLower":{"type":"string"},"IsAdJoined":{"type":"boolean"},"WindowsUpdateSettings":{"description":"\r\n\r\n    None = 0 \r\n    Automatically = 1 \r\n    Manually = 2 \r\n    Never = 3 \r\n","type":"integer","format":"enum"},"WindowsUpdateConfiguration":{"$ref":"#/definitions/WindowsUpdateConfiguration"},"DomainMachineValidationStatus":{"description":"\r\n\r\n    None = 0 \r\n    Validated = 1 \r\n    Invalid = 2 \r\n    FailedToValidate = 3 \r\n","type":"integer","format":"enum"},"DomainMachineValidationStatusFailure":{"$ref":"#/definitions/DomainMachineValidationStatusFailure"},"LastDomainMachineValidationDate":{"type":"string","format":"date-time"},"AzureDirectoryRegistration":{"type":"string"}},"type":"object","format":"ComputerSystem"},"ContractorAccountApiItem":{"properties":{"AccountName":{"description":"Account name for Contractor account.","type":"string"},"Description":{"description":"Account description in a free form","type":"string"},"CredentialsExpirationDate":{"description":"Pass null, empty string, or omit if no expiration. Date format is 'yyyy-MM-ddTHH:mm:ss.FFFFFFFK'","type":"string"},"AllowAgentlessDevices":{"description":"Indicates wheather agentless devices can be authenticated using this account credentials","type":"boolean"}},"type":"object","format":"ContractorAccountApiItem"},"CreateAccountApiRequest":{"properties":{"AccountName":{"description":"Email in case of CLEAR or Contactor account. Account name for MAC-based account. Username for LDAP account","type":"string"},"DirectoryDomain":{"description":"LDAP domain for LDAP account","type":"string"},"IdentityType":{"description":"Account identity type: Clear, Contractor, LDAP or Mac-based\r\n\r\n    ActiveDirectory = 0 \r\n    ClearRepository = 1 \r\n    MacListOnly = 2 \r\n    Contractor = 3 \r\n","type":"integer","format":"enum","enum":[0,1,2,3]},"Description":{"description":"Account description in a free form","type":"string"},"AllowAgentlessDevices":{"description":"Indicates wheather agentless devices can be authenticated using this account credentials","type":"boolean"},"CredentialsExpirationDate":{"description":"Pass null, empty string, or omit if no expiration. Date format is 'yyyy-MM-ddTHH:mm:ss.FFFFFFFK'","type":"string"}},"type":"object","format":"CreateAccountApiRequest"},"CreateClearAccountApiRequest":{"properties":{"ClearAccounts":{"type":"array","items":{"$ref":"#/definitions/ClearAccountApiItem"}}},"type":"object","format":"CreateClearAccountApiRequest"},"CreateContractorAccountApiRequest":{"properties":{"ContractorAccounts":{"type":"array","items":{"$ref":"#/definitions/ContractorAccountApiItem"}}},"type":"object","format":"CreateContractorAccountApiRequest"},"CreateLdapAccountsApiRequest":{"properties":{"LdapAccounts":{"type":"array","items":{"$ref":"#/definitions/LdapAccountApiItem"}}},"type":"object","format":"CreateLdapAccountsApiRequest"},"CreateMacBasedAccountsApiRequest":{"properties":{"MacBasedAccounts":{"description":"MAC-based accounts list","type":"array","items":{"$ref":"#/definitions/MacBasedAccountApiEntity"}}},"type":"object","format":"CreateMacBasedAccountsApiRequest"},"CreateNetworkSiteRequest":{"properties":{"Name":{"description":"Site name","type":"string"},"Description":{"description":"Site desciption","type":"string"},"ParentId":{"description":"Id of parent site. If null, will be assigned to organization root site","type":"string"},"Rules":{"description":"List of network rules","type":"array","items":{"$ref":"#/definitions/NetworkSiteRule"}}},"type":"object","format":"CreateNetworkSiteRequest"},"CriticalSoftware":{"properties":{"Type":{"description":"\r\n\r\n    Java = 0 \r\n    AdobeFlashPlayerActiveX = 1 \r\n    AdobeFlashPlayerNpapi = 2 \r\n    AdobeFlashPlayerPpapi = 3 \r\n    AdobeFlashPlayerPpapiChrome = 4 \r\n    AdobeAIR = 5 \r\n    AdobeShockwave = 6 \r\n    DotNet = 7 \r\n","type":"integer","format":"enum"},"InstalledVersion":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"CriticalSoftware"},"DeleteAccountRequest":{"properties":{"AccountId":{"description":"Email in case of CLEAR or Contactor account. Account name for MAC-based account. Domain/Username for LDAP account","type":"string"}},"type":"object","format":"DeleteAccountRequest"},"DeviceAccount":{"properties":{"Name":{"type":"string"},"Type":{"type":"string"},"Status":{"description":"\r\n\r\n    Unknown = 0 \r\n    On = 1 \r\n    Off = 2 \r\n","type":"integer","format":"enum"}},"type":"object","format":"DeviceAccount"},"DeviceCertificateInformationEntity":{"properties":{"CertificateSerialNumber":{"type":"string"},"CertificateThumbrint":{"type":"string"},"CertificateExpirationDate":{"type":"string","format":"date-time"},"CertificateValidNotBefore":{"type":"string","format":"date-time"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceCertificateInformationEntity"},"DeviceData":{"properties":{"GsmSettings":{"$ref":"#/definitions/GsmSettings"},"IsEncryptedStorage":{"description":"True if device storage is encrypted. Available only for Android devices","type":"boolean"},"IsPasscodeEnabled":{"description":"True if device is protected with lock screen. Available only for mobile devices","type":"boolean"},"IsJailbroken":{"description":"True if device is jailbroken. Available only for mobile devices","type":"boolean"},"IsMdmEnrolled":{"description":"True if device is enrolled with MDM. Available only for Android","type":"boolean"},"PhoneNumber":{"description":"Phone number. Available only for mobile devices","type":"string"},"IsUnknownSourceAppAllowed":{"description":"True if installation from unknown sources is allowed. Available only for mobile devices","type":"boolean"},"WifiSettings":{"$ref":"#/definitions/WifiSettings"},"FetchNotificationsStatus":{"description":"\r\n\r\n    Restricted = 0 \r\n    Disabled = 1 \r\n    Available = 2 \r\n","type":"integer","format":"enum"},"DeviceRam":{"description":"Total device RAM, in bytes. Available only for mobile devices","type":"integer","format":"uint64"},"DeviceAccounts":{"description":"List of users using device. Available only for mobile devices","type":"array","items":{"$ref":"#/definitions/DeviceAccount"}},"ModelIdentifier":{"description":"Device model. Available only for mobile devices","type":"string"},"VpnSettings":{"description":"List of device's vpn interfaces. Available only for mobile devices","type":"array","items":{"$ref":"#/definitions/VpnSettings"}},"InstaledCertificates":{"description":"List of certificates installed on device","type":"array","items":{"$ref":"#/definitions/InstalledCertificate"}},"DeviceId":{"type":"string"},"IsAzureJoined":{"type":"boolean"},"ClientSwVersion":{"description":"Version of Portnox AgentP installed on device","type":"string"},"OsVersion":{"description":"Version of operating system installed on device","type":"string"},"DeviceFormFactor":{"description":"Device form-factor: laptop, computer, phone etc..\r\n\r\n    Unknown = 0 \r\n    Desktop = 1 \r\n    Laptop = 2 \r\n    Mobile = 3 \r\n    Tablet = 4 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4]},"TimeZone":{"description":"Timezone which is defined on device","type":"string"},"Timestamp":{"description":"Last device post event time","type":"string","format":"date-time"},"OrganizationPresence":{"description":"Indicates if device is connected to organizational network\r\n\r\n    Outside = 0 \r\n    Inside = 1 \r\n","type":"integer","format":"enum","enum":[0,1]},"RecordId":{"type":"string"},"InstalledApplications":{"description":"List of applications installed on the device","type":"array","items":{"$ref":"#/definitions/InstalledApplication"}},"RemoteConnections":{"description":"List of remote connections","type":"array","items":{"$ref":"#/definitions/RemoteConnection"}},"ListenersPorts":{"description":"List of open ports","type":"array","items":{"$ref":"#/definitions/ListenerPort"}},"LogicalDisks":{"description":"List of hard drives installed on device","type":"array","items":{"$ref":"#/definitions/LogicalDiskInfo"}},"LastOnPremLoging":{"description":"Last login time of given device to network","type":"string","format":"date-time"},"Location":{"$ref":"#/definitions/Location"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceData"},"DeviceDomainValidationResult":{"properties":{"DomainMachineValidationStatus":{"description":"\r\n\r\n    None = 0 \r\n    Validated = 1 \r\n    Invalid = 2 \r\n    FailedToValidate = 3 \r\n","type":"integer","format":"enum"},"DomainMachineValidationStatusFailure":{"$ref":"#/definitions/DomainMachineValidationStatusFailure"},"LastDomainMachineValidationDate":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceDomainValidationResult"},"DeviceEntity":{"allOf":[{"$ref":"#/definitions/MobileDeviceEntity"},{"$ref":"#/definitions/ComputerEntity"}],"properties":{"OrgId":{"description":"ID of organization to which device belongs","type":"string"},"AccountId":{"description":"ID of account to which device belongs","type":"string"},"DeviceId":{"description":"Device unique identificator","type":"string"},"LastValidationStatusNasId":{"description":"ID of NAS device was last connected to","type":"string"},"ValidationStatuses":{"description":"Last device authentication info. Regular authentication and via Okta","type":"array","items":{"$ref":"#/definitions/DeviceNetworkAuthNStatus"}},"LastValidationStatus":{"$ref":"#/definitions/DeviceNetworkAuthNStatus"},"DeviceNotficationKey":{"description":"Key for device's push notifications","type":"string"},"DeviceType":{"description":"Device name: computer/phone name or macaddress if first can't be detected","type":"string"},"OsType":{"description":"Device's operating system\r\n\r\n    iOS = 0 \r\n    Android = 1 \r\n    Windows = 2 \r\n    MacOsX = 3 \r\n    ChromeOs = 4 \r\n    Linux = 5 \r\n    Unix = 6 \r\n    Other = 7 \r\n    Unknown = 999 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5,6,7,999]},"InstallationPackageType":{"description":"Installation package type. In case of different installation package this field used to autoupdate\r\n\r\n    Unknown = 0 \r\n    Deb = 1 \r\n    Rpm = 2 \r\n    Windows_x64 = 64 \r\n    Windows_x86 = 86 \r\n","type":"integer","format":"enum","enum":[0,1,2,64,86]},"ExtendedOSInfo":{"$ref":"#/definitions/ExtendedOperatingSystemInfo"},"Status":{"$ref":"#/definitions/DeviceStatus"},"LastIpAddress":{"description":"Last known device IP address","type":"string"},"IsContractorDevice":{"description":"Indicates if device owned by contractor or not","type":"boolean"},"RiskStatus":{"$ref":"#/definitions/DeviceRiskStatus"},"Manufacturer":{"description":"Device manufacturer","type":"string"},"MdmEnrollmentInfo":{"$ref":"#/definitions/DeviceMdmEnrollmentInfo"},"CertificateInformation":{"$ref":"#/definitions/DeviceCertificateInformationEntity"},"MachineCertificate":{"$ref":"#/definitions/DeviceCertificateInformationEntity"},"AccountsCertificates":{"description":"Other accounts certificate information","type":"array","items":{"$ref":"#/definitions/KeyValuePair (String, DeviceCertificateInformationEntity)"}},"UsesOldCredentials":{"type":"boolean"},"ProfilingData":{"$ref":"#/definitions/ProfilingInfo"},"IntuneDeviceData":{"$ref":"#/definitions/IntuneDeviceData"},"AzureValidationResult":{"$ref":"#/definitions/DeviceDomainValidationResult"},"ActiveDirectoryValidationResult":{"$ref":"#/definitions/DeviceDomainValidationResult"},"OrganizationPresence":{"description":"Indicates if device is connected to organizational network\r\n\r\n    Outside = 0 \r\n    Inside = 1 \r\n","type":"integer","format":"enum","enum":[0,1]},"LastOnPremLoging":{"description":"Last login time of given device to network","type":"string","format":"date-time"},"Location":{"$ref":"#/definitions/Location"},"OsVersion":{"description":"Version of operating system installed on device","type":"string"},"AzureTenantId":{"description":"ID of Azure Tenant to which device is connected","type":"string"},"AzureTenantName":{"description":"Name of Azure Tenant to which device is connected","type":"string"},"AzureDeviceId":{"description":"Unique identifier which azure gives for device during device's connection to LDAP","type":"string"},"JamfDeviceId":{"description":"Unique identifier of device in Jamf","type":"string"},"IntuneDeviceId":{"description":"Unique identifier of device in Intune","type":"string"},"AbsoluteDeviceId":{"description":"Unique identifier of device in Absolute","type":"string"},"CrowdStrikeDeviceId":{"description":"Unique identifier of device in CrowdStrike","type":"string"},"CrowdStrikeError":{"description":"Error encountered during CrowdStrike integration\r\n\r\n    Success = 0 \r\n    IntegrationMissing = 1 \r\n    SerialNumberMissing = 2 \r\n    ApiError = 3 \r\n    NoMatchedDevice = 4 \r\n    MultipleMatchedDevices = 5 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5]},"SentinelOneDeviceId":{"description":"Unique identifier of device in SentinelOne","type":"string"},"SentinelOneError":{"description":"Error encountered during SentinelOne integration\r\n\r\n    Success = 0 \r\n    IntegrationMissing = 1 \r\n    SerialNumberMissing = 2 \r\n    ApiError = 3 \r\n    NoMatchedDevice = 4 \r\n    MultipleMatchedDevices = 5 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5]},"DeviceDataTimestamp":{"description":"Last device post event time","type":"string","format":"date-time"},"ClientSwVersion":{"description":"Version of Portnox AgentP installed on device","type":"string"},"CreatedTime":{"type":"string","format":"date-time"},"IsAgentlessDevice":{"type":"boolean"},"IsEnrolledAgentpDevice":{"type":"boolean"},"Id":{"type":"string"},"DeviceKeyShort":{"type":"string"},"AllMacAddresses":{"type":"array","items":{"type":"string"}},"AllMacVendors":{"type":"array","items":{"$ref":"#/definitions/KeyValuePair (String, String)"}},"AllIpAddresses":{"type":"array","items":{"type":"string"}},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceEntity"},"DeviceListItem":{"properties":{"DeviceId":{"description":"Device unique identifier","type":"string"},"AccountId":{"description":"ID of account to which device belongs","type":"string"},"IsAgentless":{"description":"True if device doesn't have AgentP installed","type":"boolean"},"HasAgentPInstalled":{"description":"True if device has AgentP installed","type":"boolean"},"OrganizationPresence":{"description":"Shows if device is connected to organizational network\r\n\r\n    Outside = 0 \r\n    Inside = 1 \r\n","type":"integer","format":"enum","enum":[0,1]},"Location":{"$ref":"#/definitions/Location"},"ClientSwVersion":{"description":"Version of Portnox AgentP installed on device","type":"string"},"Status":{"$ref":"#/definitions/DeviceStatus"},"ValidationStatuses":{"description":"Last device authentication info. Regular authentication and via Okta","type":"array","items":{"$ref":"#/definitions/DeviceNetworkAuthNStatus"}},"AllMacAddresses":{"description":"All known MAC addresses for device","type":"array","items":{"type":"string"}},"AllIpAddresses":{"description":"All known IP addresses for device","type":"array","items":{"type":"string"}},"ProfilingData":{"$ref":"#/definitions/ProfilingInfo"},"DeviceType":{"description":"Device name: computer/phone name or macaddress if first can't be detected","type":"string"},"IntuneDeviceData":{"$ref":"#/definitions/IntuneDeviceData"},"RiskStatus":{"$ref":"#/definitions/DeviceRiskStatus"},"MdmEnrollmentInfo":{"$ref":"#/definitions/DeviceMdmEnrollmentInfo"},"MdmOperationsCapable":{"description":"Mobile device management operations are allowed","type":"boolean"},"MobileGsmSettings":{"$ref":"#/definitions/GsmSettings"},"MobileWifiSettings":{"$ref":"#/definitions/WifiSettings"},"MobilePhoneNumber":{"description":"Phone number associated with device. Available only for mobile devices","type":"string"},"ComputerNetworkInterfaces":{"description":"List of device's known network interfaces. Available only for computer devices","type":"array","items":{"$ref":"#/definitions/ComputerNetworkInterface"}},"LastIpAddress":{"description":"Last known device IP address","type":"string"},"AllMacVendors":{"description":"All known MAC vendors for device","type":"array","items":{"$ref":"#/definitions/KeyValuePair (String, String)"}},"OsType":{"description":"Device's operating system\r\n\r\n    iOS = 0 \r\n    Android = 1 \r\n    Windows = 2 \r\n    MacOsX = 3 \r\n    ChromeOs = 4 \r\n    Linux = 5 \r\n    Unix = 6 \r\n    Other = 7 \r\n    Unknown = 999 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5,6,7,999]},"OsVersion":{"description":"Version of operating system installed on device","type":"string"},"ExtendedOSInfo":{"$ref":"#/definitions/ExtendedOperatingSystemInfo"},"IsDesktop":{"description":"True if device is computer","type":"boolean"},"IsMobile":{"description":"True if device is mobile","type":"boolean"},"IsJailbroken":{"description":"True if device is jailbroken. Available only for mboile devices","type":"boolean"},"IsActiveDevice":{"description":"True if device is Agentless or Enrolled AgentP device","type":"boolean"},"IsArchivedDevice":{"description":"True if device is Agentless Archived or AgentP Archived device","type":"boolean"},"DeviceFormFactor":{"description":"Device form-factor: laptop, computer, phone etc..\r\n\r\n    Unknown = 0 \r\n    Desktop = 1 \r\n    Laptop = 2 \r\n    Mobile = 3 \r\n    Tablet = 4 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4]},"ApiTokenExpiration":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceListItem"},"DeviceMdmEnrollmentInfo":{"properties":{"DeviceMdmEnrollmentStatus":{"description":"\r\n\r\n    None = 0 \r\n    Required = 1 \r\n    Authenticated = 2 \r\n    Enrolled = 3 \r\n","type":"integer","format":"enum"},"MdmProvider":{"description":"\r\n\r\n    Portnox = 0 \r\n    Intune = 1 \r\n    Ase = 2 \r\n    Jamf = 3 \r\n","type":"integer","format":"enum"},"DeviceUdid":{"type":"string"},"MdmPushToken":{"type":"string"},"MdmPushMagic":{"type":"string"},"MdmEnrollmentDate":{"type":"string","format":"date-time"},"UnlockToken":{"type":"string"},"MdmLastReportDate":{"type":"string","format":"date-time"},"MacAddress":{"type":"string"},"LastStatusUpdateDate":{"type":"string","format":"date-time"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceMdmEnrollmentInfo"},"DeviceNetworkAuthNStatus":{"properties":{"AuthNType":{"description":"\r\n\r\n    None = 0 \r\n    OnPremPortnox = 1 \r\n    AgentP = 2 \r\n    Otp = 4 \r\n    PAP = 16 \r\n    Eap_Chap = 32 \r\n    PushToAccess = 64 \r\n    DeviceValidation = 128 \r\n    MSCHAPV2 = 256 \r\n    Eap_Tls = 1024 \r\n    MacBased = 2048 \r\n    Eap_MD5 = 4096 \r\n    DirectAccess = 8192 \r\n","type":"integer","format":"enum"},"ValidationResult":{"description":"\r\n\r\n    None = 0 \r\n    Success = 1 \r\n    InternalFailed = 2 \r\n    AuthNFailed = 4 \r\n    PolicyFailed = 8 \r\n","type":"integer","format":"enum"},"Time":{"type":"string","format":"date-time"},"DisconnectTime":{"type":"string","format":"date-time"},"LastConnected":{"type":"string","format":"date-time"},"ValidationMAC":{"type":"string"},"ValidationMACVendor":{"type":"string"},"ValidationUser":{"type":"string"},"NasIp":{"type":"string"},"NasType":{"description":"\r\n\r\n    None = 0 (None)\r\n    VPN = 1 (VPN)\r\n    Wireless = 2 (Wireless)\r\n    Wire = 4 (Wired)\r\n    Okta = 8 (OKTA)\r\n    Portnox = 16 (Portnox)\r\n","type":"integer","format":"enum"},"NasId":{"type":"string"},"NetworkName":{"type":"string"},"CallingStationId":{"$ref":"#/definitions/CallerDeviceId"},"CallingStation":{"$ref":"#/definitions/CallingDevice"},"VpnType":{"type":"string"},"IpAddresses":{"type":"array","items":{"type":"string"}},"DevicePort":{"type":"string"},"NasName":{"type":"string"},"NasMac":{"type":"string"},"NasVendor":{"$ref":"#/definitions/NASVendor"},"AcctSessionId":{"type":"string"},"VLAN":{"type":"string"},"Acl":{"type":"string"},"DeviceAuthNMode":{"description":"\r\n\r\n    None = 0 \r\n    Quarantine = 1 \r\n    Monitoring = 2 \r\n","type":"integer","format":"enum"},"RadiusIp":{"type":"string"},"RadiusClusterId":{"type":"string"},"AuthReqSrcIp":{"type":"string"},"NtKeyResponse":{"type":"string"},"Attributes":{"type":"array","items":{"$ref":"#/definitions/KeyValuePair (String, String)"}},"ResponseAttributes":{"type":"array","items":{"$ref":"#/definitions/KeyValuePair (String, String)"}},"IsConnected":{"type":"boolean"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceNetworkAuthNStatus"},"DeviceNetworkInterface":{"properties":{"IPs":{"type":"array","items":{"type":"string"}},"MAC":{"type":"string"},"MACVendor":{"type":"string"}},"type":"object","format":"DeviceNetworkInterface"},"DeviceQueryRequest":{"properties":{"Query":{"$ref":"#/definitions/Query"},"Search":{"$ref":"#/definitions/DeviceSearchRequest"},"ClientTimeOffset":{"description":"Timezone offset. Used to put time fields into correct locale","type":"integer","format":"int32"},"IncludeAccountWithoutDevices":{"description":"By default all accounts are returned. Set to false to return only accounts with at least one device.","type":"boolean","default":"True"},"StartTimeLimit":{"type":"number","format":"double"},"EndTimeLimit":{"type":"number","format":"double"},"StartReportedTimeLimit":{"type":"string","format":"date-time"},"EndReportedTimeLimit":{"type":"string","format":"date-time"},"StartCreatedTimeLimit":{"type":"string","format":"date-time"},"EndCreatedTimeLimit":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceQueryRequest"},"DeviceQueryResponse":{"properties":{"Result":{"description":"Page with accounts and their devices available for current filter/search query","type":"array","items":{"$ref":"#/definitions/AccountDevices"}},"TotalPages":{"description":"Total pages available for current filter/search query","type":"integer","format":"int32"},"TotalDevices":{"description":"Total devices available for current filter/search query","type":"integer","format":"int32"}},"type":"object","format":"DeviceQueryResponse"},"DeviceRiskGraceStatus":{"properties":{"CurrentAttribute":{"description":"\r\n\r\n    OsVersion = 0 \r\n    GeoLocation = 1 \r\n    AccessDateTime = 2 \r\n    DriveEncryption = 3 \r\n    Dormant = 4 \r\n    Applications = 5 \r\n    OpenPorts = 6 \r\n    Passcode = 7 \r\n    Jailbroken = 8 \r\n    AntiVirus = 9 \r\n    FireWall = 10 \r\n    WindowsUpdate = 11 \r\n    WindowsGenius = 12 \r\n    Certificates = 13 \r\n    PatchLevel = 14 \r\n    DomainMembership = 15 \r\n    AdministrativePrivileges = 16 \r\n    OsMissingPatches = 17 \r\n    UnknownSourceAppAllowed = 18 \r\n    PeripheralDevices = 19 \r\n    MdmNonManaged = 20 \r\n    MdmNonCompliant = 21 \r\n    MdmDormant = 22 \r\n    AdministrativeVulnerabilities = 24 \r\n    RunningServices = 25 \r\n    AzureMembership = 26 \r\n    WindowsRegistry = 27 \r\n    AseNotManaged = 28 \r\n    JamfNotManaged = 29 \r\n    JamfDormant = 30 \r\n    CrowdStrikeNotManaged = 31 \r\n    CrowdStrikeDormant = 32 \r\n    CrowdStrikeZtaOverallScore = 33 \r\n    SentinelOneNotManaged = 34 \r\n    SentinelOneDormant = 35 \r\n    SentinelOneInfected = 36 \r\n","type":"integer","format":"enum"},"Items":{"type":"array","items":{"$ref":"#/definitions/KeyValuePair (PolicyAttribsId, DeviceRiskGraceStatusItem)"}}},"type":"object","format":"DeviceRiskGraceStatus"},"DeviceRiskGraceStatusItem":{"properties":{"ViolationDate":{"type":"string","format":"date-time"},"GracefulTill":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceRiskGraceStatusItem"},"DeviceRiskStatus":{"properties":{"Score":{"type":"number","format":"double"},"Result":{"$ref":"#/definitions/PolicyResults"},"Action":{"description":"\r\n\r\n    Allow = 0 \r\n    Alert = 1 \r\n    Block = 2 \r\n","type":"integer","format":"enum"},"GracefulTill":{"type":"string","format":"date-time"},"GraceStatus":{"$ref":"#/definitions/DeviceRiskGraceStatus"},"ScoreInt":{"type":"integer","format":"int32"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceRiskStatus"},"DeviceSearchRequest":{"properties":{"Value":{"description":"Value of parameter to search by","type":"string"},"Field":{"description":"Searching field\r\n\r\n    Id = 0 \r\n    DeviceId = 1 \r\n    OrgId = 2 \r\n    Status = 3 \r\n    OrgPresence = 4 \r\n    Account = 5 \r\n    AccountName_UI = 6 \r\n    OsName = 7 \r\n    Risk = 8 \r\n    GeoInfo = 9 \r\n    IpAdresses = 10 \r\n    MacAdresses = 11 \r\n    Applications = 12 \r\n    Hotfixes = 13 \r\n    LoggedUsers = 14 \r\n    Processes = 15 \r\n    Browser = 16 \r\n    Services = 17 \r\n    Ssid = 18 \r\n    BrowserExtension = 19 \r\n    Certificates = 20 \r\n    GroupName = 21 \r\n    MacVendor = 22 \r\n    Manufacturer = 23 \r\n    Network = 24 \r\n    Peripheral = 25 \r\n    CriticalSoftware = 26 \r\n    RiskScore = 27 \r\n    Location = 28 \r\n    FormFactor = 29 \r\n    NasIp = 30 \r\n    NasType = 31 \r\n    NasId = 32 \r\n    AgentPVersion = 33 \r\n    PanwThreatName = 34 \r\n    PanwThreatCategory = 35 \r\n    AccountType = 36 \r\n    LastConnected = 37 \r\n    LastConnectedScore = 38 \r\n    AuthenticationRepositoryType = 39 \r\n    Model = 40 \r\n    AccountContainsDevices = 41 \r\n    DeviceName = 42 \r\n    SiteFullPath = 43 \r\n    LastReportedTime = 44 \r\n    AccountAlias = 45 \r\n    GeographyPoint = 46 \r\n    CreatedTime = 47 \r\n    ApplicationsExport = 48 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48]}},"type":"object","format":"DeviceSearchRequest"},"DeviceStatus":{"properties":{"AmountOfWakeUpNotificationsAttempts":{"type":"integer","format":"int32"},"EnrollmentStatusDateTime":{"type":"string","format":"date-time"},"EnrollmentStatus":{"description":"\r\n\r\n    None = 0 \r\n    ActivationCodeSent = 1 \r\n    ActivationCodeReSent = 2 \r\n    FirtsDataRecieved = 4 \r\n    Unregister = 8 \r\n    Canceled = 16 \r\n    ActiveNotEnrolled = 32 \r\n    DissolvableAgent = 64 \r\n    ArhivedAgentless = 256 \r\n    ArchivedAgent = 512 \r\n    NetworkMonitoring = 1024 \r\n","type":"integer","format":"enum"},"IsBlockByAdmin":{"type":"boolean"},"BlockReason":{"type":"string"},"BlockDateTime":{"type":"string","format":"date-time"},"IsBlockedByProfiling":{"type":"boolean"},"BlockByProfilingDateTime":{"type":"string","format":"date-time"},"IsDead":{"type":"boolean"},"LastReportTime":{"type":"string","format":"date-time"},"LastWakeUpNotification":{"type":"string","format":"date-time"},"EnrollmentCertificateExpiration":{"type":"string","format":"date-time"}},"type":"object","format":"DeviceStatus"},"DomainMachineValidationStatusFailure":{"properties":{"FailuresCount":{"type":"integer","format":"int32"},"Domain":{"type":"string"},"MachineName":{"type":"string"},"Challenge":{"type":"string"},"ClientResponse":{"type":"string"},"ValidationFailuresCount":{"type":"integer","format":"int32"},"ValidationFailureDetected":{"type":"string","format":"date-time"}},"type":"object","format":"DomainMachineValidationStatusFailure"},"DriverInfo":{"properties":{"Name":{"type":"string"},"Vendor":{"type":"string"},"Version":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"DriverInfo"},"ExtendedOperatingSystemInfo":{"properties":{"HardwareType":{"type":"string"},"Family":{"type":"string"},"Name":{"type":"string"},"Version":{"type":"string"},"VersionName":{"type":"string"},"Vendor":{"type":"string"},"Build":{"type":"string"},"HardwareModel":{"type":"string"},"CheckId":{"type":"string"}},"type":"object","format":"ExtendedOperatingSystemInfo"},"FileVaultInfo":{"properties":{"IsEnabled":{"type":"boolean"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"FileVaultInfo"},"FirewallInfo":{"properties":{"IsEnabled":{"type":"boolean"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"FirewallInfo"},"GsmSettings":{"properties":{"IpAddress":{"type":"string"},"IpAddressV6":{"type":"string"},"Provider":{"type":"string"},"Operator":{"type":"string"},"MacAddress":{"type":"string"},"GsmMacVendor":{"type":"string"},"GsmIsRoaming":{"type":"boolean"},"MobileCountryCode":{"type":"string"},"MobileNetworkCode":{"type":"string"},"MobileNetworkType":{"description":"\r\n\r\n    None = 0 \r\n    Gsm2G = 1 \r\n    Gsm3G = 2 \r\n    Gsm4G = 3 \r\n","type":"integer","format":"enum"},"SimSerialNumber":{"type":"string"},"SignalStrength":{"type":"integer","format":"int32"}},"type":"object","format":"GsmSettings"},"HostFileInfo":{"properties":{"IpAddress":{"type":"string"},"Domain":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"HostFileInfo"},"InstalledApplication":{"properties":{"ProductId":{"type":"string"},"Name":{"type":"string"},"Vendor":{"type":"string"},"Version":{"type":"string"},"InstallDate":{"type":"string","format":"date-time"},"Language":{"type":"string"},"Architecture":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"InstalledApplication"},"InstalledCertificate":{"properties":{"User":{"type":"string"},"Thumbprint":{"type":"string"},"Subject":{"type":"string"},"Dn":{"type":"string"},"Issuer":{"type":"string"},"IssuerDn":{"type":"string"},"ValidFrom":{"type":"string","format":"date-time"},"ValidTo":{"type":"string","format":"date-time"},"IsSelfSigned":{"type":"boolean"},"IssuerChain":{"type":"array","items":{"$ref":"#/definitions/InstalledCertificateChainItem"}},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"InstalledCertificate"},"InstalledCertificateChainItem":{"properties":{"Thumbprint":{"type":"string"},"Subject":{"type":"string"},"Issuer":{"type":"string"},"Dn":{"type":"string"},"IssuerDn":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"InstalledCertificateChainItem"},"IntuneDeviceData":{"properties":{"DeviceOwners":{"type":"array","items":{"type":"string"}},"DeviceUsers":{"type":"array","items":{"type":"string"}},"ComplianceState":{"type":"boolean"},"IsManaged":{"type":"boolean"},"DeviceOwner":{"type":"string"},"MacAddress":{"type":"string"},"SerialNumber":{"type":"string"},"Imei":{"type":"string"},"Udid":{"type":"string"},"Meid":{"type":"string"},"DisplayName":{"type":"string"},"OsVersion":{"type":"string"},"Model":{"type":"string"},"Manufacturer":{"type":"string"},"AzureDeviceId":{"type":"string"},"LastContactTimeUtc":{"type":"string","format":"date-time"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"IntuneDeviceData"},"IpAddressInfo":{"properties":{"Address":{"type":"string"},"Mask":{"type":"string"}},"type":"object","format":"IpAddressInfo"},"KeyValuePair (PolicyAttribsId, DeviceRiskGraceStatusItem)":{"properties":{"Key":{"description":"\r\n\r\n    OsVersion = 0 \r\n    GeoLocation = 1 \r\n    AccessDateTime = 2 \r\n    DriveEncryption = 3 \r\n    Dormant = 4 \r\n    Applications = 5 \r\n    OpenPorts = 6 \r\n    Passcode = 7 \r\n    Jailbroken = 8 \r\n    AntiVirus = 9 \r\n    FireWall = 10 \r\n    WindowsUpdate = 11 \r\n    WindowsGenius = 12 \r\n    Certificates = 13 \r\n    PatchLevel = 14 \r\n    DomainMembership = 15 \r\n    AdministrativePrivileges = 16 \r\n    OsMissingPatches = 17 \r\n    UnknownSourceAppAllowed = 18 \r\n    PeripheralDevices = 19 \r\n    MdmNonManaged = 20 \r\n    MdmNonCompliant = 21 \r\n    MdmDormant = 22 \r\n    AdministrativeVulnerabilities = 24 \r\n    RunningServices = 25 \r\n    AzureMembership = 26 \r\n    WindowsRegistry = 27 \r\n    AseNotManaged = 28 \r\n    JamfNotManaged = 29 \r\n    JamfDormant = 30 \r\n    CrowdStrikeNotManaged = 31 \r\n    CrowdStrikeDormant = 32 \r\n    CrowdStrikeZtaOverallScore = 33 \r\n    SentinelOneNotManaged = 34 \r\n    SentinelOneDormant = 35 \r\n    SentinelOneInfected = 36 \r\n","type":"integer","format":"enum"},"Value":{"$ref":"#/definitions/DeviceRiskGraceStatusItem"}},"type":"object","format":"KeyValuePair (PolicyAttribsId, DeviceRiskGraceStatusItem)"},"KeyValuePair (PolicyAttribsId, List (String))":{"properties":{"Key":{"description":"\r\n\r\n    OsVersion = 0 \r\n    GeoLocation = 1 \r\n    AccessDateTime = 2 \r\n    DriveEncryption = 3 \r\n    Dormant = 4 \r\n    Applications = 5 \r\n    OpenPorts = 6 \r\n    Passcode = 7 \r\n    Jailbroken = 8 \r\n    AntiVirus = 9 \r\n    FireWall = 10 \r\n    WindowsUpdate = 11 \r\n    WindowsGenius = 12 \r\n    Certificates = 13 \r\n    PatchLevel = 14 \r\n    DomainMembership = 15 \r\n    AdministrativePrivileges = 16 \r\n    OsMissingPatches = 17 \r\n    UnknownSourceAppAllowed = 18 \r\n    PeripheralDevices = 19 \r\n    MdmNonManaged = 20 \r\n    MdmNonCompliant = 21 \r\n    MdmDormant = 22 \r\n    AdministrativeVulnerabilities = 24 \r\n    RunningServices = 25 \r\n    AzureMembership = 26 \r\n    WindowsRegistry = 27 \r\n    AseNotManaged = 28 \r\n    JamfNotManaged = 29 \r\n    JamfDormant = 30 \r\n    CrowdStrikeNotManaged = 31 \r\n    CrowdStrikeDormant = 32 \r\n    CrowdStrikeZtaOverallScore = 33 \r\n    SentinelOneNotManaged = 34 \r\n    SentinelOneDormant = 35 \r\n    SentinelOneInfected = 36 \r\n","type":"integer","format":"enum"},"Value":{"type":"array","items":{"type":"string"}}},"type":"object","format":"KeyValuePair (PolicyAttribsId, List (String))"},"KeyValuePair (String, DeviceCertificateInformationEntity)":{"properties":{"Key":{"type":"string"},"Value":{"$ref":"#/definitions/DeviceCertificateInformationEntity"}},"type":"object","format":"KeyValuePair (String, DeviceCertificateInformationEntity)"},"KeyValuePair (String, String)":{"properties":{"Key":{"type":"string"},"Value":{"type":"string"}},"type":"object","format":"KeyValuePair (String, String)"},"LdapAccountApiItem":{"properties":{"AccountName":{"description":"Username","type":"string"},"DirectoryDomain":{"description":"LDAP domain","type":"string"},"Description":{"description":"Account description in a free form","type":"string"},"AllowAgentlessDevices":{"description":"Indicates wheather agentless devices can be authenticated using this account credentials","type":"boolean"},"CredentialsExpirationDate":{"description":"Pass null, empty string, or omit if no expiration. Date format is 'yyyy-MM-ddTHH:mm:ss.FFFFFFFK'","type":"string"}},"type":"object","format":"LdapAccountApiItem"},"List (AlertDetailsAttribute)":{"type":"array","items":{"$ref":"#/definitions/List (AlertDetailsAttribute)"}},"ListenerPort":{"properties":{"ProtocolType":{"description":"\r\n\r\n    Tcp = 0 (TCP)\r\n    Udp = 1 (UDP)\r\n","type":"integer","format":"enum"},"LocalAddress":{"type":"string"},"LocalPort":{"type":"integer","format":"int32"},"ProcessName":{"type":"string"},"ProcessId":{"type":"integer","format":"int32"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"ListenerPort"},"ListMacBasedAccountsResponse":{"properties":{"MabAccounts":{"type":"array","items":{"$ref":"#/definitions/MabAccountApiItem"}}},"type":"object","format":"ListMacBasedAccountsResponse"},"LocalUser":{"properties":{"UserId":{"type":"string"},"UserName":{"type":"string"},"Domain":{"type":"string"},"IsMicrosoftAccount":{"type":"boolean"},"UserLocalGroups":{"type":"array","items":{"type":"string"}},"UserLocalGroupsHashCode":{"type":"integer","format":"int32"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"LocalUser"},"LocalUserGroup":{"properties":{"GroupId":{"type":"string"},"Name":{"type":"string"},"Domain":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"LocalUserGroup"},"Location":{"properties":{"Latitude":{"type":"number","format":"double"},"Longitude":{"type":"number","format":"double"},"Country":{"type":"string"},"State":{"type":"string"},"City":{"type":"string"},"PostalCode":{"type":"string"},"HasCoordinates":{"type":"boolean"}},"type":"object","format":"Location"},"LoggedUser":{"properties":{"UserId":{"type":"string"},"Name":{"type":"string"},"Domain":{"type":"string"},"LocalAccount":{"type":"boolean"},"IsMicrosoftAccount":{"type":"boolean"},"UserBrowser":{"$ref":"#/definitions/UserBrowser"},"UserLocalGroups":{"type":"array","items":{"$ref":"#/definitions/LocalUserGroup"}},"IsAdmin":{"type":"boolean"},"Browsers":{"type":"array","items":{"$ref":"#/definitions/UserBrowser"}},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"LoggedUser"},"LogicalDiskInfo":{"properties":{"Name":{"type":"string"},"Description":{"type":"string"},"TotalSize":{"type":"integer","format":"uint64"},"FreeSpace":{"type":"integer","format":"uint64"},"FileSystem":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"LogicalDiskInfo"},"MabAccountApiItem":{"properties":{"OrgId":{"type":"string"},"AccountId":{"type":"string"},"AccountName":{"type":"string"},"Description":{"type":"string"},"GroupId":{"type":"string"},"CreatedAt":{"type":"string","format":"date-time"},"CreationType":{"description":"\r\n\r\n    AutoCreatedDuringEnrolment = 0 \r\n    CreatedByAdmin = 1 \r\n    SelfCreatedFromOnBoardWeb = 2 \r\n    AutoCreatedByMachineCertificateAuthN = 3 \r\n    AutoCreatedByMonitoringOnlyMode = 4 \r\n    AutoCreatedDuringLdapAutoOnBoarding = 5 \r\n    AutoCreatedDuringMabAutoOnBoarding = 6 \r\n    AutoCreatedByQuarantine = 7 \r\n    AutoCreatedByProfiling = 8 \r\n    AutoCreatedBydMachineFqdnInSanCertificateAuthN = 9 \r\n    AutoCreatedByIntuneCertificateAuthN = 10 \r\n    AutoCreatedByScepCertificateAuthN = 11 \r\n    AutoCreatedByJamfCertificateAuthN = 12 \r\n","type":"integer","format":"enum"},"LastUpdatedBy":{"type":"string"},"IdentityType":{"description":"\r\n\r\n    ActiveDirectory = 0 \r\n    ClearRepository = 1 \r\n    MacListOnly = 2 \r\n    Contractor = 3 \r\n    DeviceTypeBased = 4 \r\n","type":"integer","format":"enum"},"AgentlessOptions":{"$ref":"#/definitions/AgentlessAccountOptionsApiItem"},"RadiusOptions":{"$ref":"#/definitions/RadiusOptionsApiItem"},"IsBlockByAdmin":{"type":"boolean"},"BlockReason":{"type":"string"}},"type":"object","format":"MabAccountApiItem"},"MacAccountSearchByMacRequest":{"properties":{"MacWhiteList":{"description":"Mac addresses to search","type":"array","items":{"$ref":"#/definitions/MacWhiteListApiItem"}}},"type":"object","format":"MacAccountSearchByMacRequest"},"MacBasedAccountApiEntity":{"properties":{"AccountName":{"description":"Account name for MAC-based account.","type":"string"},"Description":{"description":"Account description in a free form","type":"string"},"MacWhiteList":{"description":"Allowed mac addresses","type":"array","items":{"$ref":"#/definitions/MacWhiteListApiItem"}},"VendorsWhiteList":{"description":"Allowed mac vendors","type":"array","items":{"$ref":"#/definitions/MacVendorWhiteListApiItem"}},"CredentialsExpirationDate":{"description":"Pass null, empty string, or omit if no expiration. Date format is 'yyyy-MM-ddTHH:mm:ss.FFFFFFFK'","type":"string"},"AllowAgentlessDevices":{"description":"Indicates wheather agentless devices can be authenticated using this account credentials","type":"boolean"},"PutDevicesIntoVoiceVlan":{"description":"Indicates whether devices should be assigned to voice VLAN","type":"boolean"},"IdentityPreSharedKey":{"description":"Device's unique PSK, which needs to be send to the NAS as Radius Attribute","type":"string"},"MaxMacWhiteListLenght":{"type":"integer","format":"int32"},"MaxVendorsWhiteListsLenght":{"type":"integer","format":"int32"}},"type":"object","format":"MacBasedAccountApiEntity"},"MacExpirationChangeRequest":{"properties":{"AccountName":{"description":"MAC-based account name","type":"string"},"MacWhiteList":{"description":"Mac addresses","type":"array","items":{"$ref":"#/definitions/WhiteListedMacExpirationApiItem"}}},"type":"object","format":"MacExpirationChangeRequest"},"MacVendorWhiteListApiItem":{"properties":{"VendorPrefixes":{"type":"array","items":{"type":"string"}},"VendorName":{"description":"Vendor name","type":"string"}},"type":"object","format":"MacVendorWhiteListApiItem"},"MacWhiteListApiItem":{"properties":{"Description":{"description":"MAC description in a free form","type":"string"},"Mac":{"description":"MAC address","type":"string"},"Expiration":{"type":"string","format":"date-time"}},"type":"object","format":"MacWhiteListApiItem"},"MemoryInfo":{"properties":{"DeviceRam":{"type":"integer","format":"uint64"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"MemoryInfo"},"MobileDeviceEntity":{"properties":{"MobileDeviceData":{"$ref":"#/definitions/DeviceData"},"GsmNetworkInterface":{"$ref":"#/definitions/DeviceNetworkInterface"},"WifiNetworkInterface":{"$ref":"#/definitions/DeviceNetworkInterface"},"AllMacAddresses":{"type":"array","items":{"type":"string"}},"AllMacVendors":{"type":"array","items":{"$ref":"#/definitions/KeyValuePair (String, String)"}},"AllIpAddresses":{"type":"array","items":{"type":"string"}},"OrgId":{"description":"ID of organization to which device belongs","type":"string"},"AccountId":{"description":"ID of account to which device belongs","type":"string"},"DeviceId":{"description":"Device unique identificator","type":"string"},"LastValidationStatusNasId":{"description":"ID of NAS device was last connected to","type":"string"},"ValidationStatuses":{"description":"Last device authentication info. Regular authentication and via Okta","type":"array","items":{"$ref":"#/definitions/DeviceNetworkAuthNStatus"}},"LastValidationStatus":{"$ref":"#/definitions/DeviceNetworkAuthNStatus"},"DeviceNotficationKey":{"description":"Key for device's push notifications","type":"string"},"DeviceType":{"description":"Device name: computer/phone name or macaddress if first can't be detected","type":"string"},"OsType":{"description":"Device's operating system\r\n\r\n    iOS = 0 \r\n    Android = 1 \r\n    Windows = 2 \r\n    MacOsX = 3 \r\n    ChromeOs = 4 \r\n    Linux = 5 \r\n    Unix = 6 \r\n    Other = 7 \r\n    Unknown = 999 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5,6,7,999]},"InstallationPackageType":{"description":"Installation package type. In case of different installation package this field used to autoupdate\r\n\r\n    Unknown = 0 \r\n    Deb = 1 \r\n    Rpm = 2 \r\n    Windows_x64 = 64 \r\n    Windows_x86 = 86 \r\n","type":"integer","format":"enum","enum":[0,1,2,64,86]},"ExtendedOSInfo":{"$ref":"#/definitions/ExtendedOperatingSystemInfo"},"Status":{"$ref":"#/definitions/DeviceStatus"},"LastIpAddress":{"description":"Last known device IP address","type":"string"},"IsContractorDevice":{"description":"Indicates if device owned by contractor or not","type":"boolean"},"RiskStatus":{"$ref":"#/definitions/DeviceRiskStatus"},"Manufacturer":{"description":"Device manufacturer","type":"string"},"MdmEnrollmentInfo":{"$ref":"#/definitions/DeviceMdmEnrollmentInfo"},"CertificateInformation":{"$ref":"#/definitions/DeviceCertificateInformationEntity"},"MachineCertificate":{"$ref":"#/definitions/DeviceCertificateInformationEntity"},"AccountsCertificates":{"description":"Other accounts certificate information","type":"array","items":{"$ref":"#/definitions/KeyValuePair (String, DeviceCertificateInformationEntity)"}},"UsesOldCredentials":{"type":"boolean"},"ProfilingData":{"$ref":"#/definitions/ProfilingInfo"},"IntuneDeviceData":{"$ref":"#/definitions/IntuneDeviceData"},"AzureValidationResult":{"$ref":"#/definitions/DeviceDomainValidationResult"},"ActiveDirectoryValidationResult":{"$ref":"#/definitions/DeviceDomainValidationResult"},"OrganizationPresence":{"description":"Indicates if device is connected to organizational network\r\n\r\n    Outside = 0 \r\n    Inside = 1 \r\n","type":"integer","format":"enum","enum":[0,1]},"LastOnPremLoging":{"description":"Last login time of given device to network","type":"string","format":"date-time"},"Location":{"$ref":"#/definitions/Location"},"OsVersion":{"description":"Version of operating system installed on device","type":"string"},"AzureTenantId":{"description":"ID of Azure Tenant to which device is connected","type":"string"},"AzureTenantName":{"description":"Name of Azure Tenant to which device is connected","type":"string"},"AzureDeviceId":{"description":"Unique identifier which azure gives for device during device's connection to LDAP","type":"string"},"JamfDeviceId":{"description":"Unique identifier of device in Jamf","type":"string"},"IntuneDeviceId":{"description":"Unique identifier of device in Intune","type":"string"},"AbsoluteDeviceId":{"description":"Unique identifier of device in Absolute","type":"string"},"CrowdStrikeDeviceId":{"description":"Unique identifier of device in CrowdStrike","type":"string"},"CrowdStrikeError":{"description":"Error encountered during CrowdStrike integration\r\n\r\n    Success = 0 \r\n    IntegrationMissing = 1 \r\n    SerialNumberMissing = 2 \r\n    ApiError = 3 \r\n    NoMatchedDevice = 4 \r\n    MultipleMatchedDevices = 5 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5]},"SentinelOneDeviceId":{"description":"Unique identifier of device in SentinelOne","type":"string"},"SentinelOneError":{"description":"Error encountered during SentinelOne integration\r\n\r\n    Success = 0 \r\n    IntegrationMissing = 1 \r\n    SerialNumberMissing = 2 \r\n    ApiError = 3 \r\n    NoMatchedDevice = 4 \r\n    MultipleMatchedDevices = 5 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5]},"DeviceDataTimestamp":{"description":"Last device post event time","type":"string","format":"date-time"},"ClientSwVersion":{"description":"Version of Portnox AgentP installed on device","type":"string"},"CreatedTime":{"type":"string","format":"date-time"},"IsAgentlessDevice":{"type":"boolean"},"IsEnrolledAgentpDevice":{"type":"boolean"},"Id":{"type":"string"},"DeviceKeyShort":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"MobileDeviceEntity"},"MotherBoardInfo":{"properties":{"Manufacturer":{"type":"string"},"Product":{"type":"string"},"SerialNumber":{"type":"string"},"BiosManufacturer":{"type":"string"},"BiosVersion":{"type":"string"},"BiosReleaseDate":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"MotherBoardInfo"},"MoveAccountRequest":{"properties":{"GroupName":{"description":"CLEAR group name where account should be moved","type":"string"},"AccountId":{"description":"Email in case of CLEAR or Contactor account, Account name for MAC-based account","type":"string"}},"type":"object","format":"MoveAccountRequest"},"MoveMacAddressesToAnotherMabAccountApiRequest":{"properties":{"CurrentAccountName":{"description":"Account name of current MAC-based account.","type":"string"},"TargetAccountName":{"description":"Account name of target MAC-based account.","type":"string"},"MacWhiteList":{"description":"Mac addresses to move","type":"array","items":{"$ref":"#/definitions/MacWhiteListApiItem"}},"MaxMacWhiteListLenght":{"type":"integer","format":"int32"}},"type":"object","format":"MoveMacAddressesToAnotherMabAccountApiRequest"},"NasRequest":{"properties":{"Mode":{"description":"Filter for NAS modes.\r\n\r\n    All = 0 (All NASes are returned)\r\n    Enforcement = 1 (Only NASes with Enforcement mode are returned)\r\n    Monitoring = 2 (Only NASes with Monitoring mode are returned)\r\n","type":"integer","format":"enum","enum":[0,1,2]},"Info":{"description":"Flags of NAS related information to include in response.\r\n\r\n    None = 0 (No additional info included)\r\n    SitePath = 1 (Compute site path)\r\n","type":"integer","format":"enum","enum":[0,1]}},"type":"object","format":"NasRequest"},"NasUpdateApiItem":{"properties":{"NasId":{"description":"NAS ID to perform update on","type":"string"},"DisplayName":{"description":"NAS display name to set. Maximum length is 60","type":"string"},"Vendor":{"description":"NAS device vendor. Note that passing it using API turns off automatic vendor determinantion logic\r\n\r\n    Unknown = 0 \r\n    Aerohive = 1 \r\n    AlcatelLucent = 2 \r\n    AlliedTelesis = 3 \r\n    Aruba = 4 \r\n    Brocade = 5 \r\n    Cisco = 6 \r\n    DellNetworking = 7 \r\n    Extreme = 8 \r\n    HP = 9 \r\n    Huawei = 10 \r\n    Juniper = 11 \r\n    Meraki = 12 \r\n    Mist = 13 \r\n    Ruckus = 14 \r\n    TPLink = 15 \r\n    WatchGuard = 16 \r\n    Zyxel = 17 \r\n    Arista = 18 \r\n    F5 = 19 \r\n    PaloAlto = 20 \r\n    Ubiquiti = 21 \r\n","type":"integer","format":"enum","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]},"Description":{"description":"Any comments here. Maximum length is 256","type":"string"},"IsMonitoringModeEnabled":{"description":"Monitoring mode flag","type":"boolean"}},"type":"object","format":"NasUpdateApiItem"},"NasUpdateRequest":{"properties":{"Nases":{"description":"NASes to update","type":"array","items":{"$ref":"#/definitions/NasUpdateApiItem"}}},"type":"object","format":"NasUpdateRequest"},"NASVendor":{"properties":{"Identity":{"description":"\r\n\r\n    Unknown = 0 \r\n    All = 1 \r\n    Aerohive = 2 \r\n    AlcatelLucent = 3 \r\n    AlliedTelesis = 4 \r\n    Aruba = 5 \r\n    Brocade = 6 \r\n    Cisco = 7 \r\n    DellNetworking = 8 \r\n    Extreme = 9 \r\n    HP = 10 \r\n    Huawei = 11 \r\n    Juniper = 12 \r\n    Meraki = 13 \r\n    Ruckus = 14 \r\n    TPLink = 15 \r\n    WatchGuard = 16 \r\n    Mist = 17 \r\n    Zyxel = 18 \r\n    Arista = 19 \r\n    F5 = 20 \r\n    PaloAlto = 21 \r\n    Ubiquiti = 22 \r\n","type":"integer","format":"enum"},"ManuallySetup":{"type":"boolean"}},"type":"object","format":"NASVendor"},"NetworkAccessServer":{"properties":{"NasId":{"type":"string"},"Ip":{"type":"string"},"Name":{"type":"string"},"DisplayName":{"type":"string"},"Mac":{"type":"string"},"Mode":{"description":"\r\n\r\n    Enforcement = 0 (Enforcement)\r\n    Monitoring = 1 (Monitoring)\r\n","type":"integer","format":"enum"},"Type":{"description":"\r\n\r\n    None = 0 (None)\r\n    VPN = 1 (VPN)\r\n    Wireless = 2 (Wireless)\r\n    Wire = 4 (Wired)\r\n    Okta = 8 (OKTA)\r\n    Portnox = 16 (Portnox)\r\n","type":"integer","format":"enum"},"SiteId":{"type":"string"},"SitePath":{"type":"string"},"Description":{"type":"string"},"IsMonitoringModeEnabled":{"type":"boolean"},"Vendor":{"description":"\r\n\r\n    Unknown = 0 \r\n    Aerohive = 1 \r\n    AlcatelLucent = 2 \r\n    AlliedTelesis = 3 \r\n    Aruba = 4 \r\n    Brocade = 5 \r\n    Cisco = 6 \r\n    DellNetworking = 7 \r\n    Extreme = 8 \r\n    HP = 9 \r\n    Huawei = 10 \r\n    Juniper = 11 \r\n    Meraki = 12 \r\n    Mist = 13 \r\n    Ruckus = 14 \r\n    TPLink = 15 \r\n    WatchGuard = 16 \r\n    Zyxel = 17 \r\n    Arista = 18 \r\n    F5 = 19 \r\n    PaloAlto = 20 \r\n    Ubiquiti = 21 \r\n","type":"integer","format":"enum"},"FirstSeen":{"type":"string","format":"date-time"},"LastSeen":{"type":"string","format":"date-time"}},"type":"object","format":"NetworkAccessServer"},"NetworkConfiguration":{"properties":{"DhcpEnabled":{"type":"boolean"},"DnsServers":{"type":"array","items":{"type":"string"}},"Gateways":{"type":"array","items":{"type":"string"}},"IpAddresses":{"type":"array","items":{"$ref":"#/definitions/IpAddressInfo"}},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"NetworkConfiguration"},"NetworkConnection":{"properties":{"NetworkType":{"description":"\r\n\r\n    None = 0 \r\n    Ethernet = 1 \r\n    WiFi = 2 \r\n    VPN = 3 \r\n","type":"integer","format":"enum"},"NetworkName":{"type":"string"},"NetworkCategory":{"description":"\r\n\r\n    Public = 0 \r\n    Private = 1 \r\n    Domain = 2 \r\n","type":"integer","format":"enum"}},"type":"object","format":"NetworkConnection"},"NetworkSite":{"properties":{"Id":{"type":"string"},"Name":{"type":"string"},"Description":{"type":"string"},"ParentId":{"type":"string"},"Rules":{"type":"array","items":{"$ref":"#/definitions/NetworkSiteRule"}}},"type":"object","format":"NetworkSite"},"NetworkSiteResponse":{"properties":{"Site":{"$ref":"#/definitions/NetworkSite"}},"type":"object","format":"NetworkSiteResponse"},"NetworkSiteRule":{"properties":{"Type":{"description":"Network rule type\r\n\r\n    Cidr = 1 (Rule based on CIDR format)\r\n    IpRange = 2 (Rule based on IP range)\r\n","type":"integer","format":"enum","enum":[1,2]},"From":{"description":"Start IP address of range or CIDR mask","type":"string"},"To":{"description":"Last IP address of range. Required if IP Range rule type is specified","type":"string"},"Mask":{"description":"CIDR mask. Required if CIDR rule type is specified","type":"integer","format":"int32"}},"type":"object","format":"NetworkSiteRule"},"NetworkSitesResponse":{"properties":{"Sites":{"type":"array","items":{"$ref":"#/definitions/NetworkSite"}}},"type":"object","format":"NetworkSitesResponse"},"NmapSslCert":{"properties":{"PortNumber":{"type":"integer","format":"int32"},"Subject":{"type":"string"},"Issuer":{"type":"string"},"PublicKeyType":{"type":"string"},"PublicKeyBits":{"type":"integer","format":"int32"},"SignatureAlgorithm":{"type":"string"},"NotValidBefore":{"type":"string","format":"date-time"},"NotValidAfter":{"type":"string","format":"date-time"},"MD5":{"type":"string"},"SHA1":{"type":"string"}},"type":"object","format":"NmapSslCert"},"PasscodePolicyInfo":{"properties":{"AskForPasswordDelay":{"type":"integer","format":"uint64"},"AskForPassword":{"type":"boolean"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"PasscodePolicyInfo"},"PeripheralDevice":{"properties":{"Type":{"description":"\r\n\r\n    None = 0 (None)\r\n    Storage = 1 (Storage)\r\n    Printer = 2 (Printer)\r\n    Scanner = 3 (Scanner)\r\n    Camera = 4 (Camera)\r\n    Mouse = 5 (Mouse)\r\n    Headphones = 6 (Headphones)\r\n    Microphone = 7 (Microphone)\r\n    Mobile = 8 (Mobile)\r\n    Other = 9 (Other)\r\n    Modem = 10 (Modem)\r\n    IrDAReceiver = 11 (Infra Red Receiver)\r\n    Keyboard = 12 (Keyboard)\r\n    CdDvd = 13 (CD-Rom)\r\n    CardReader = 14 (Card Reader)\r\n    Tape = 15 (Tape)\r\n    Sensors = 16 (Sensors)\r\n    Biometric = 17 (Biometric)\r\n    PowerSupply = 18 (Power Supply)\r\n","type":"integer","format":"enum"},"ConnectionType":{"description":"\r\n\r\n    None = 0 \r\n    Usb = 1 \r\n    Serial = 2 \r\n    Bluetooth = 3 \r\n    Other = 4 \r\n    ModemPortRJ = 5 \r\n    InfraRedIrDA = 6 \r\n    FireWire = 7 \r\n    eSATA = 8 \r\n    Parallel = 9 \r\n    PCMCIA = 10 \r\n    SecureDigitalSD = 11 \r\n","type":"integer","format":"enum"},"Model":{"type":"string"},"Manufacture":{"type":"string"},"FirmwareVersion":{"type":"string"},"AdditionalInfo":{"type":"array","items":{"type":"string"}},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"PeripheralDevice"},"PolicyResults":{"properties":{"Score":{"type":"number","format":"double"},"Details":{"type":"array","items":{"$ref":"#/definitions/KeyValuePair (PolicyAttribsId, List (String))"}},"UnableToCheck":{"description":"\r\n\r\n    OsVersion = 0 \r\n    GeoLocation = 1 \r\n    AccessDateTime = 2 \r\n    DriveEncryption = 3 \r\n    Dormant = 4 \r\n    Applications = 5 \r\n    OpenPorts = 6 \r\n    Passcode = 7 \r\n    Jailbroken = 8 \r\n    AntiVirus = 9 \r\n    FireWall = 10 \r\n    WindowsUpdate = 11 \r\n    WindowsGenius = 12 \r\n    Certificates = 13 \r\n    PatchLevel = 14 \r\n    DomainMembership = 15 \r\n    AdministrativePrivileges = 16 \r\n    OsMissingPatches = 17 \r\n    UnknownSourceAppAllowed = 18 \r\n    PeripheralDevices = 19 \r\n    MdmNonManaged = 20 \r\n    MdmNonCompliant = 21 \r\n    MdmDormant = 22 \r\n    AdministrativeVulnerabilities = 24 \r\n    RunningServices = 25 \r\n    AzureMembership = 26 \r\n    WindowsRegistry = 27 \r\n    AseNotManaged = 28 \r\n    JamfNotManaged = 29 \r\n    JamfDormant = 30 \r\n    CrowdStrikeNotManaged = 31 \r\n    CrowdStrikeDormant = 32 \r\n    CrowdStrikeZtaOverallScore = 33 \r\n    SentinelOneNotManaged = 34 \r\n    SentinelOneDormant = 35 \r\n    SentinelOneInfected = 36 \r\n","type":"array","items":{"type":"integer","format":"enum"}},"PolicyId":{"type":"string"},"PolicyName":{"type":"string"}},"type":"object","format":"PolicyResults"},"ProfilingInfo":{"properties":{"LastSuccessfullAttemptTime":{"type":"string","format":"date-time"},"LastProfilingMac":{"type":"string"}},"type":"object","format":"ProfilingInfo"},"Query":{"properties":{"PageNumber":{"description":"Requested page","type":"integer","format":"int32"},"PageSize":{"description":"Requested page size. Integer in range [1-30]","type":"integer","format":"int32"}},"type":"object","format":"Query"},"RadiusOptionsApiItem":{"properties":{"PutDevicesIntoVoiceVlan":{"type":"boolean"}},"type":"object","format":"RadiusOptionsApiItem"},"RemoteConnection":{"properties":{"RemoteAddress":{"type":"string"},"RemotePort":{"type":"integer","format":"int32"},"IsInternalNetwork":{"type":"boolean"},"ProtocolType":{"description":"\r\n\r\n    Tcp = 0 (TCP)\r\n    Udp = 1 (UDP)\r\n","type":"integer","format":"enum"},"LocalAddress":{"type":"string"},"LocalPort":{"type":"integer","format":"int32"},"ProcessName":{"type":"string"},"ProcessId":{"type":"integer","format":"int32"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"RemoteConnection"},"RunningService":{"properties":{"ServiceName":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"RunningService"},"SecureMabOptionsApiItem":{"properties":{"Enabled":{"description":"Indicates whether IoT Device Trust is on/off. (default)false","type":"boolean"},"Action":{"description":"(default)SendWarning\r\n\r\n    None = 0 \r\n    SendWarning = 1 \r\n    BlockDevice = 2 \r\n","type":"integer","format":"enum","enum":[0,1,2]}},"type":"object","format":"SecureMabOptionsApiItem"},"SecurityProduct":{"properties":{"DisplayName":{"type":"string"},"ProductVersion":{"type":"string"},"ProductState":{"description":"\r\n\r\n    None = 0 \r\n    Enabled = 1 \r\n    UpToDate = 4 \r\n    OutOfDate = 8 \r\n","type":"integer","format":"enum"},"DisabledCount":{"type":"integer","format":"int32"},"ProductStateText":{"type":"string"}},"type":"object","format":"SecurityProduct"},"SystemHotFix":{"properties":{"Description":{"type":"string"},"FixComments":{"type":"string"},"HotFixID":{"type":"string"},"InstalledBy":{"type":"string"},"InstalledOn":{"type":"string"},"Name":{"type":"string"},"ServicePackInEffect":{"type":"string"},"Status":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"SystemHotFix"},"TpmInfo":{"properties":{"IsActivated":{"type":"boolean"},"IsEnabled":{"type":"boolean"},"IsOwned":{"type":"boolean"},"SpecVersion":{"type":"string"},"ManufacturerVersion":{"type":"string"},"ManufacturerVersionInfo":{"type":"string"},"ManufacturerId":{"type":"number","format":"uint32"},"PhysicalPresenceVersionInfo":{"type":"string"}},"type":"object","format":"TpmInfo"},"UpdateMabAccountMacWhiteListApiRequest":{"properties":{"AccountName":{"description":"MAC-based account name.","type":"string"},"MacWhiteList":{"description":"Mac addresses","type":"array","items":{"$ref":"#/definitions/MacWhiteListApiItem"}},"MaxMacWhiteListLenght":{"type":"integer","format":"int32"}},"type":"object","format":"UpdateMabAccountMacWhiteListApiRequest"},"UserBrowser":{"properties":{"File":{"type":"string"},"Version":{"type":"string"},"IsDefault":{"type":"boolean"},"Name":{"type":"string"},"UserBrowserAccount":{"$ref":"#/definitions/UserBrowserAccount"},"Extensions":{"type":"array","items":{"$ref":"#/definitions/UserBrowserExtension"}},"Plugins":{"type":"array","items":{"$ref":"#/definitions/UserBrowserPlugin"}},"BrowserType":{"description":"\r\n\r\n    Unknown = 0 \r\n    Chrome = 1 \r\n    InternetExplorer = 2 \r\n    Opera = 3 \r\n    Firefox = 4 \r\n    Safari = 5 \r\n    Other = 6 \r\n    Edge = 7 \r\n","type":"integer","format":"enum"}},"type":"object","format":"UserBrowser"},"UserBrowserAccount":{"properties":{"AccountId":{"type":"string"},"Email":{"type":"string"},"Name":{"type":"string"}},"type":"object","format":"UserBrowserAccount"},"UserBrowserExtension":{"properties":{"ExtensionType":{"type":"string"},"Name":{"type":"string"},"Description":{"type":"string"},"Version":{"type":"string"},"IsEnabled":{"type":"boolean"}},"type":"object","format":"UserBrowserExtension"},"UserBrowserPlugin":{"properties":{"Path":{"type":"string"},"Version":{"type":"string"},"Name":{"type":"string"},"Vendor":{"type":"string"},"IsEnabled":{"type":"boolean"}},"type":"object","format":"UserBrowserPlugin"},"VpnSettings":{"properties":{"IpAddress":{"type":"string"},"IpAddressV6":{"type":"string"},"Interface":{"type":"string"}},"type":"object","format":"VpnSettings"},"WhiteListedMacExpirationApiItem":{"properties":{"Mac":{"description":"MAC address","type":"string"},"Expiration":{"type":"string","format":"date-time"}},"type":"object","format":"WhiteListedMacExpirationApiItem"},"WifiSettings":{"properties":{"IpAddress":{"type":"string"},"IpAddressV6":{"type":"string"},"SSID":{"type":"string"},"MacAddress":{"type":"string"},"WiFiMacVendor":{"type":"string"},"IsEnabled":{"type":"boolean"},"BytesSent":{"type":"integer","format":"int64"},"BytesReceived":{"type":"integer","format":"int64"}},"type":"object","format":"WifiSettings"},"WindowsFeature":{"properties":{"Caption":{"type":"string"},"Name":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"WindowsFeature"},"WindowsRegistryItem":{"properties":{"Root":{"description":"\r\n\r\n    LocalMachine = 0 \r\n    ClassesRoot = 1 \r\n    Users = 2 \r\n    CurrentConfig = 3 \r\n","type":"integer","format":"enum"},"Key":{"type":"string"},"ValueName":{"type":"string"},"ValueType":{"description":"\r\n\r\n    None = 0 \r\n    Int = 1 \r\n    String = 2 \r\n    Bytes = 3 \r\n","type":"integer","format":"enum"},"Value":{"type":"string"},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"WindowsRegistryItem"},"WindowsSecurityCenter":{"properties":{"AntiVirus":{"type":"array","items":{"$ref":"#/definitions/SecurityProduct"}},"AntiSpyware":{"type":"array","items":{"$ref":"#/definitions/SecurityProduct"}},"Firewall":{"type":"array","items":{"$ref":"#/definitions/SecurityProduct"}},"Health":{"$ref":"#/definitions/WindowsSecurityCenterHealth"}},"type":"object","format":"WindowsSecurityCenter"},"WindowsSecurityCenterHealth":{"properties":{"AntiVirusHealth":{"description":"\r\n\r\n    Undefined = 0 \r\n    Good = 1 \r\n    NotMonitored = 2 \r\n    Poor = 3 \r\n    Snooze = 4 \r\n","type":"integer","format":"enum"},"AntiSpywareHealth":{"description":"\r\n\r\n    Undefined = 0 \r\n    Good = 1 \r\n    NotMonitored = 2 \r\n    Poor = 3 \r\n    Snooze = 4 \r\n","type":"integer","format":"enum"},"FirewallHealth":{"description":"\r\n\r\n    Undefined = 0 \r\n    Good = 1 \r\n    NotMonitored = 2 \r\n    Poor = 3 \r\n    Snooze = 4 \r\n","type":"integer","format":"enum"},"InternetSettingsHealth":{"description":"\r\n\r\n    Undefined = 0 \r\n    Good = 1 \r\n    NotMonitored = 2 \r\n    Poor = 3 \r\n    Snooze = 4 \r\n","type":"integer","format":"enum"},"AutoUpdateHealth":{"description":"\r\n\r\n    Undefined = 0 \r\n    Good = 1 \r\n    NotMonitored = 2 \r\n    Poor = 3 \r\n    Snooze = 4 \r\n","type":"integer","format":"enum"},"UacHealth":{"description":"\r\n\r\n    Undefined = 0 \r\n    Good = 1 \r\n    NotMonitored = 2 \r\n    Poor = 3 \r\n    Snooze = 4 \r\n","type":"integer","format":"enum"},"ServiceHealth":{"description":"\r\n\r\n    Undefined = 0 \r\n    Good = 1 \r\n    NotMonitored = 2 \r\n    Poor = 3 \r\n    Snooze = 4 \r\n","type":"integer","format":"enum"}},"type":"object","format":"WindowsSecurityCenterHealth"},"WindowsUpdateConfiguration":{"properties":{"UseWUServer":{"type":"boolean"},"WUServer":{"type":"string"},"WUStatusServer":{"type":"string"},"WUServerAlternate":{"type":"string"},"DoNotConnectInternetLocations":{"type":"boolean"}},"type":"object","format":"WindowsUpdateConfiguration"},"WindowsUpdateInfo":{"properties":{"MissingCriticalFixes":{"type":"array","items":{"$ref":"#/definitions/WindowsUpdatePerioInfo"}},"MissingImportantFixes":{"type":"array","items":{"$ref":"#/definitions/WindowsUpdatePerioInfo"}},"LastUpdateTime":{"type":"string","format":"date-time"}},"type":"object","format":"WindowsUpdateInfo"},"WindowsUpdatePerioInfo":{"properties":{"WindowsUpdatePolicyPeriod":{"description":"\r\n\r\n    PeriodRecent = 0 \r\n    Period24 = 1 \r\n    Period48 = 2 \r\n    Period72 = 3 \r\n    Period120 = 4 \r\n    Period240 = 5 \r\n    Period720 = 6 \r\n    Period1440 = 7 \r\n    Period2160 = 8 \r\n","type":"integer","format":"enum"},"Count":{"type":"integer","format":"int32"}},"type":"object","format":"WindowsUpdatePerioInfo"}},"securityDefinitions":{"basicAuth":{"type":"basic"},"apiKey":{"type":"apiKey","name":"Authorization","in":"header"}}}