> For the complete documentation index, see [llms.txt](https://learn.netmaker.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.netmaker.io/api-spec/users.md).

# Users

## GET /api/users

> Get all users

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.ReturnUser"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get all users","tags":["Users"]}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/users/{username}

> Get an individual user

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Username of the user to fetch","in":"path","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReturnUser"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get an individual user","tags":["Users"]}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/users/{username}

> Create a user

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Username of the user to create","in":"path","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReturnUser"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Create a user","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.User"}}},"description":"User details","required":true}}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.User":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"description":"deprecated","type":"boolean"},"issuperadmin":{"description":"deprecated","type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"password":{"minLength":5,"type":"string"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"totp_secret":{"type":"string"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"minLength":3,"type":"string"}},"required":["password"],"type":"object"}}}}
```

## PUT /api/users/{username}

> Update a user

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}":{"put":{"parameters":[{"schema":{"type":"string"},"description":"Username of the user to update","in":"path","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReturnUser"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Update a user","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.User"}}},"description":"User details","required":true}}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.User":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"description":"deprecated","type":"boolean"},"issuperadmin":{"description":"deprecated","type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"password":{"minLength":5,"type":"string"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"totp_secret":{"type":"string"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"minLength":3,"type":"string"}},"required":["password"],"type":"object"}}}}
```

## DELETE /api/users/{username}

> Delete a user

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}":{"delete":{"parameters":[{"schema":{"type":"string"},"description":"Username of the user to delete","in":"path","name":"username","required":true},{"schema":{"type":"string"},"description":"Force delete configs","in":"query","name":"force_delete_configs"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete a user","tags":["Users"]}}},"components":{"schemas":{"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/users/{username}/disable

> Disable a user's account

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}/disable":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Username of the user to disable","in":"path","name":"username","required":true},{"schema":{"type":"string"},"description":"Force disable configs","in":"query","name":"force_disable_configs"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Disable a user's account","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/users/{username}/enable

> Enable a user's account

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}/enable":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Username of the user to enable","in":"path","name":"username","required":true},{"schema":{"type":"string"},"description":"Force enable configs","in":"query","name":"force_enable_configs"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Enable a user's account","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/users/{username}/remote\_access\_gw

> Get user remote access gateways

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}/remote_access_gw":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Username to fetch all the gateways with access","in":"path","name":"username","required":true},{"schema":{"type":"string"},"description":"Device ID","in":"query","name":"device_id"},{"schema":{"type":"string"},"description":"Remote access client ID","in":"query","name":"remote_access_clientid"},{"schema":{"type":"string"},"description":"If 'true', returns array format","in":"query","name":"from_mobile"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get user remote access gateways","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/users/{username}/remote\_access\_gw/{remote\_access\_gateway\_id}

> Attach user to a remote access gateway

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}/remote_access_gw/{remote_access_gateway_id}":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Username","in":"path","name":"username","required":true},{"schema":{"type":"string"},"description":"Remote Access Gateway ID","in":"path","name":"remote_access_gateway_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReturnUser"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Attach user to a remote access gateway","tags":["Users"]}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## DELETE /api/users/{username}/remote\_access\_gw/{remote\_access\_gateway\_id}

> Remove user from a remote access gateway

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}/remote_access_gw/{remote_access_gateway_id}":{"delete":{"parameters":[{"schema":{"type":"string"},"description":"Username","in":"path","name":"username","required":true},{"schema":{"type":"string"},"description":"Remote Access Gateway ID","in":"path","name":"remote_access_gateway_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReturnUser"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Remove user from a remote access gateway","tags":["Users"]}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/users/{username}/settings

> Get a user's preferences and settings

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}/settings":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Username of the user","in":"path","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserSettings"}}}}},"summary":"Get a user's preferences and settings","tags":["Users"]}}},"components":{"schemas":{"models.UserSettings":{"properties":{"reduced_motion":{"type":"boolean"},"text_size":{"type":"string"},"theme":{"$ref":"#/components/schemas/models.Theme"}},"type":"object"},"models.Theme":{"enum":["dark","light","system"],"type":"string"}}}}
```

## PUT /api/users/{username}/settings

> Update a user's preferences and settings

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}/settings":{"put":{"parameters":[{"schema":{"type":"string"},"description":"Username of the user","in":"path","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserSettings"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Update a user's preferences and settings","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserSettings"}}},"description":"User settings","required":true}}}},"components":{"schemas":{"models.UserSettings":{"properties":{"reduced_motion":{"type":"boolean"},"text_size":{"type":"string"},"theme":{"$ref":"#/components/schemas/models.Theme"}},"type":"object"},"models.Theme":{"enum":["dark","light","system"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/users/{username}/validate-identity

> Validate a user's identity

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/{username}/validate-identity":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Username","in":"path","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserIdentityValidationResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Validate a user's identity","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserIdentityValidationRequest"}}},"description":"User Identity Validation Request","required":true}}}},"components":{"schemas":{"models.UserIdentityValidationResponse":{"properties":{"identity_validated":{"type":"boolean"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.UserIdentityValidationRequest":{"properties":{"password":{"type":"string"}},"type":"object"}}}}
```

## POST /api/users/adm/createsuperadmin

> Create a super admin

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"paths":{"/api/users/adm/createsuperadmin":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReturnUser"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Create a super admin","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.User"}}},"description":"User details","required":true}}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.User":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"description":"deprecated","type":"boolean"},"issuperadmin":{"description":"deprecated","type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"password":{"minLength":5,"type":"string"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"totp_secret":{"type":"string"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"minLength":3,"type":"string"}},"required":["password"],"type":"object"}}}}
```

## GET /api/users/adm/hassuperadmin

> Check if the server has a super admin

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"paths":{"/api/users/adm/hassuperadmin":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"boolean"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Check if the server has a super admin","tags":["Users"]}}},"components":{"schemas":{"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/users/adm/transfersuperadmin/{username}

> Transfer super admin role to another admin user

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/adm/transfersuperadmin/{username}":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Username of the user to transfer super admin role","in":"path","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReturnUser"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Transfer super admin role to another admin user","tags":["Users"]}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/users/ingress/{ingress\_id}

> List users attached to a remote access gateway

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users/ingress/{ingress_id}":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Ingress Gateway ID","in":"path","name":"ingress_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.IngressGwUsers"},"type":"array"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"List users attached to a remote access gateway","tags":["Users"]}}},"components":{"schemas":{"models.IngressGwUsers":{"properties":{"network":{"type":"string"},"node_id":{"type":"string"},"users":{"items":{"$ref":"#/components/schemas/models.ReturnUser"},"type":"array"}},"type":"object"},"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/users\_pending

> Get all pending users

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users_pending":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.ReturnUser"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get all pending users","tags":["Users"]}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## DELETE /api/users\_pending

> Delete all pending users

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users_pending":{"delete":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete all pending users","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/users\_pending/user/{username}

> Approve a pending user

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users_pending/user/{username}":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Username of the pending user to approve","in":"path","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Approve a pending user","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## DELETE /api/users\_pending/user/{username}

> Delete a pending user

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/users_pending/user/{username}":{"delete":{"parameters":[{"schema":{"type":"string"},"description":"Username of the pending user to delete","in":"path","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete a pending user","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/users

> Get an individual user with role info

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Username","in":"query","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ReturnUserWithRolesAndGroups"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get an individual user with role info","tags":["Users"]}}},"components":{"schemas":{"models.ReturnUserWithRolesAndGroups":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role":{"$ref":"#/components/schemas/models.UserRolePermissionTemplate"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"$ref":"#/components/schemas/models.UserGroup"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRolePermissionTemplate":{"properties":{"default":{"type":"boolean"},"deny_dashboard_access":{"type":"boolean"},"full_access":{"type":"boolean"},"global_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"},"id":{"$ref":"#/components/schemas/models.UserRoleID"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_id":{"$ref":"#/components/schemas/models.NetworkID"},"network_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"}},"type":"object"},"models.RsrcPermissionScope":{"properties":{"create":{"type":"boolean"},"delete":{"type":"boolean"},"read":{"type":"boolean"},"self_only":{"type":"boolean"},"update":{"type":"boolean"},"vpn_access":{"type":"boolean"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.NetworkID":{"enum":["all_networks"],"type":"string"},"models.UserGroup":{"properties":{"color_code":{"type":"string"},"default":{"type":"boolean"},"external_identity_provider_id":{"type":"string"},"id":{"type":"string"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/users/access\_token

> Get user access tokens

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/access_token":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Username","in":"query","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/schema.UserAccessToken"},"type":"array"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get user access tokens","tags":["Users"]}}},"components":{"schemas":{"schema.UserAccessToken":{"properties":{"created_at":{"type":"string"},"created_by":{"type":"string"},"expires_at":{"type":"string"},"id":{"type":"string"},"last_used":{"type":"string"},"name":{"type":"string"},"user_name":{"type":"string"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/v1/users/access\_token

> Create a user API access token

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/access_token":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessfulUserLoginResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Create a user API access token","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/schema.UserAccessToken"}}},"description":"Access token request","required":true}}}},"components":{"schemas":{"models.SuccessfulUserLoginResponse":{"properties":{"authToken":{"type":"string"},"userName":{"type":"string"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"schema.UserAccessToken":{"properties":{"created_at":{"type":"string"},"created_by":{"type":"string"},"expires_at":{"type":"string"},"id":{"type":"string"},"last_used":{"type":"string"},"name":{"type":"string"},"user_name":{"type":"string"}},"type":"object"}}}}
```

## DELETE /api/v1/users/access\_token

> Delete user access tokens

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/access_token":{"delete":{"parameters":[{"schema":{"type":"string"},"description":"Token ID","in":"query","name":"id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete user access tokens","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## PUT /api/v1/users/add\_network\_user

> Add user to network

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/add_network_user":{"put":{"parameters":[{"schema":{"type":"string"},"description":"Username","in":"query","name":"username","required":true},{"schema":{"type":"string"},"description":"Network ID","in":"query","name":"network_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.User"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Add user to network","tags":["Users"]}}},"components":{"schemas":{"models.User":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"description":"deprecated","type":"boolean"},"issuperadmin":{"description":"deprecated","type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"password":{"minLength":5,"type":"string"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"totp_secret":{"type":"string"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"minLength":3,"type":"string"}},"required":["password"],"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/users/group

> Get a user group

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/group":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Group ID","in":"query","name":"group_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserGroup"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get a user group","tags":["Users"]}}},"components":{"schemas":{"models.UserGroup":{"properties":{"color_code":{"type":"string"},"default":{"type":"boolean"},"external_identity_provider_id":{"type":"string"},"id":{"type":"string"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/v1/users/group

> Create a user group

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/group":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserGroup"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Create a user group","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.CreateGroupReq"}}},"description":"Create group request","required":true}}}},"components":{"schemas":{"models.UserGroup":{"properties":{"color_code":{"type":"string"},"default":{"type":"boolean"},"external_identity_provider_id":{"type":"string"},"id":{"type":"string"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.CreateGroupReq":{"properties":{"members":{"items":{"type":"string"},"type":"array"},"user_group":{"$ref":"#/components/schemas/models.UserGroup"}},"type":"object"}}}}
```

## PUT /api/v1/users/group

> Update a user group

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/group":{"put":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserGroup"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Update a user group","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserGroup"}}},"description":"User group update data","required":true}}}},"components":{"schemas":{"models.UserGroup":{"properties":{"color_code":{"type":"string"},"default":{"type":"boolean"},"external_identity_provider_id":{"type":"string"},"id":{"type":"string"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## DELETE /api/v1/users/group

> Delete user group

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/group":{"delete":{"parameters":[{"schema":{"type":"string"},"description":"Group ID required to delete the group","in":"query","name":"group_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete user group","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/users/groups

> List all user groups

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/groups":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.UserGroup"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"List all user groups","tags":["Users"]}}},"components":{"schemas":{"models.UserGroup":{"properties":{"color_code":{"type":"string"},"default":{"type":"boolean"},"external_identity_provider_id":{"type":"string"},"id":{"type":"string"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/users/invite

> Verify user invite

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"paths":{"/api/v1/users/invite":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Invitee email","in":"query","name":"email","required":true},{"schema":{"type":"string"},"description":"Invite code","in":"query","name":"invite_code","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Verify user invite","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/v1/users/invite

> Invite users

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/invite":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Invite users","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.InviteUsersReq"}}},"description":"Invite users request","required":true}}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.InviteUsersReq":{"properties":{"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"platform_role_id":{"type":"string"},"user_emails":{"items":{"type":"string"},"type":"array"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"}}}}
```

## DELETE /api/v1/users/invite

> Delete a pending user invite

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/invite":{"delete":{"parameters":[{"schema":{"type":"string"},"description":"Invitee email to delete","in":"query","name":"invitee_email","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete a pending user invite","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/v1/users/invite-signup

> User signup via invite

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"paths":{"/api/v1/users/invite-signup":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Invitee email","in":"query","name":"email","required":true},{"schema":{"type":"string"},"description":"Invite code","in":"query","name":"invite_code","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"User signup via invite","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.User"}}},"description":"User signup data","required":true}}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.User":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"description":"deprecated","type":"boolean"},"issuperadmin":{"description":"deprecated","type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"password":{"minLength":5,"type":"string"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"totp_secret":{"type":"string"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"minLength":3,"type":"string"}},"required":["password"],"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"}}}}
```

## GET /api/v1/users/invites

> List all pending user invites

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/invites":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.UserInvite"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"List all pending user invites","tags":["Users"]}}},"components":{"schemas":{"models.UserInvite":{"properties":{"email":{"type":"string"},"invite_code":{"type":"string"},"invite_url":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"platform_role_id":{"type":"string"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## DELETE /api/v1/users/invites

> Delete all pending user invites

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/invites":{"delete":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete all pending user invites","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/v1/users/logout

> Log out a user

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/logout":{"post":{"parameters":[{"schema":{"type":"string"},"description":"Username","in":"query","name":"username","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Log out a user","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/users/network\_ip

> List users network IP mappings

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/network_ip":{"get":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserIPMap"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"List users network IP mappings","tags":["Users"]}}},"components":{"schemas":{"models.UserIPMap":{"properties":{"mappings":{"additionalProperties":{"$ref":"#/components/schemas/models.UserMapping"},"type":"object"}},"type":"object"},"models.UserMapping":{"properties":{"groups":{"items":{"type":"string"},"type":"array"},"user":{"type":"string"}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## PUT /api/v1/users/remove\_network\_user

> Remove user from network

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/remove_network_user":{"put":{"parameters":[{"schema":{"type":"string"},"description":"Username","in":"query","name":"username","required":true},{"schema":{"type":"string"},"description":"Network ID","in":"query","name":"network_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.User"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Remove user from network","tags":["Users"]}}},"components":{"schemas":{"models.User":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"description":"deprecated","type":"boolean"},"issuperadmin":{"description":"deprecated","type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"password":{"minLength":5,"type":"string"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"totp_secret":{"type":"string"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"minLength":3,"type":"string"}},"required":["password"],"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/users/role

> Get user role permission template

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/role":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Role ID required to get the role details","in":"query","name":"role_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserRolePermissionTemplate"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Get user role permission template","tags":["Users"]}}},"components":{"schemas":{"models.UserRolePermissionTemplate":{"properties":{"default":{"type":"boolean"},"deny_dashboard_access":{"type":"boolean"},"full_access":{"type":"boolean"},"global_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"},"id":{"$ref":"#/components/schemas/models.UserRoleID"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_id":{"$ref":"#/components/schemas/models.NetworkID"},"network_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"}},"type":"object"},"models.RsrcPermissionScope":{"properties":{"create":{"type":"boolean"},"delete":{"type":"boolean"},"read":{"type":"boolean"},"self_only":{"type":"boolean"},"update":{"type":"boolean"},"vpn_access":{"type":"boolean"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.NetworkID":{"enum":["all_networks"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## POST /api/v1/users/role

> Create user role permission template

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/role":{"post":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserRolePermissionTemplate"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Create user role permission template","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserRolePermissionTemplate"}}},"description":"User role template","required":true}}}},"components":{"schemas":{"models.UserRolePermissionTemplate":{"properties":{"default":{"type":"boolean"},"deny_dashboard_access":{"type":"boolean"},"full_access":{"type":"boolean"},"global_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"},"id":{"$ref":"#/components/schemas/models.UserRoleID"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_id":{"$ref":"#/components/schemas/models.NetworkID"},"network_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"}},"type":"object"},"models.RsrcPermissionScope":{"properties":{"create":{"type":"boolean"},"delete":{"type":"boolean"},"read":{"type":"boolean"},"self_only":{"type":"boolean"},"update":{"type":"boolean"},"vpn_access":{"type":"boolean"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.NetworkID":{"enum":["all_networks"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## PUT /api/v1/users/role

> Update user role permission template

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/role":{"put":{"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserRolePermissionTemplate"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Update user role permission template","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.UserRolePermissionTemplate"}}},"description":"User role template","required":true}}}},"components":{"schemas":{"models.UserRolePermissionTemplate":{"properties":{"default":{"type":"boolean"},"deny_dashboard_access":{"type":"boolean"},"full_access":{"type":"boolean"},"global_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"},"id":{"$ref":"#/components/schemas/models.UserRoleID"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_id":{"$ref":"#/components/schemas/models.NetworkID"},"network_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"}},"type":"object"},"models.RsrcPermissionScope":{"properties":{"create":{"type":"boolean"},"delete":{"type":"boolean"},"read":{"type":"boolean"},"self_only":{"type":"boolean"},"update":{"type":"boolean"},"vpn_access":{"type":"boolean"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.NetworkID":{"enum":["all_networks"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## DELETE /api/v1/users/role

> Delete user role permission template

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/role":{"delete":{"parameters":[{"schema":{"type":"string"},"description":"Role ID required to delete the role","in":"query","name":"role_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.SuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"Delete user role permission template","tags":["Users"]}}},"components":{"schemas":{"models.SuccessResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/users/roles

> List all user roles

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/roles":{"get":{"parameters":[{"schema":{"type":"string"},"description":"If true, lists platform roles. Otherwise, lists network roles.","in":"query","name":"platform"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.UserRolePermissionTemplate"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"List all user roles","tags":["Users"]}}},"components":{"schemas":{"models.UserRolePermissionTemplate":{"properties":{"default":{"type":"boolean"},"deny_dashboard_access":{"type":"boolean"},"full_access":{"type":"boolean"},"global_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"},"id":{"$ref":"#/components/schemas/models.UserRoleID"},"meta_data":{"type":"string"},"name":{"type":"string"},"network_id":{"$ref":"#/components/schemas/models.NetworkID"},"network_level_access":{"additionalProperties":{"additionalProperties":{"$ref":"#/components/schemas/models.RsrcPermissionScope"},"type":"object"},"type":"object"}},"type":"object"},"models.RsrcPermissionScope":{"properties":{"create":{"type":"boolean"},"delete":{"type":"boolean"},"read":{"type":"boolean"},"self_only":{"type":"boolean"},"update":{"type":"boolean"},"vpn_access":{"type":"boolean"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.NetworkID":{"enum":["all_networks"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```

## GET /api/v1/users/unassigned\_network\_users

> List unassigned network users

```json
{"openapi":"3.1.1","info":{"title":"NetMaker","version":"1.4.0"},"tags":[],"servers":[{"url":"http://api.demo.netmaker.io"}],"security":[{"oauth":[]}],"paths":{"/api/v1/users/unassigned_network_users":{"get":{"parameters":[{"schema":{"type":"string"},"description":"Network ID","in":"query","name":"network_id","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/models.ReturnUser"},"type":"array"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/models.ErrorResponse"}}}}},"summary":"List unassigned network users","tags":["Users"]}}},"components":{"schemas":{"models.ReturnUser":{"properties":{"account_disabled":{"type":"boolean"},"auth_type":{"type":"string"},"display_name":{"type":"string"},"external_identity_provider_id":{"type":"string"},"is_mfa_enabled":{"type":"boolean"},"isadmin":{"type":"boolean"},"issuperadmin":{"type":"boolean"},"last_login_time":{"type":"string"},"network_roles":{"additionalProperties":{"additionalProperties":{"type":"object"},"type":"object"},"type":"object"},"num_access_tokens":{"type":"integer"},"platform_role_id":{"$ref":"#/components/schemas/models.UserRoleID"},"remote_gw_ids":{"additionalProperties":{"type":"object"},"description":"deprecated","type":"object"},"user_group_ids":{"additionalProperties":{"type":"object"},"type":"object"},"username":{"type":"string"}},"type":"object"},"models.UserRoleID":{"enum":["super-admin","admin","service-user","platform-user","auditor","network-admin","network-user"],"type":"string"},"models.ErrorResponse":{"properties":{"code":{"type":"integer"},"message":{"type":"string"},"response":{}},"type":"object"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://learn.netmaker.io/api-spec/users.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
