# (c) cavaliba.com - apikey
      




# -- permission

- classname: _permission
  keyname: p_apikey_admin
  is_builtin: True
  description: "Built-in APIKEY admin permission"
  displayname: "p_apikey_admin"

- classname: _permission
  keyname: p_apikey_create
  is_builtin: True
  description: "Built-in APIKEY create permission"
  displayname: p_apikey_create

- classname: _permission
  keyname: p_apikey_read
  is_builtin: True
  description: "Built-in APIKEY read permission"
  displayname: p_apikey_read

- classname: _permission
  keyname: p_apikey_update
  is_builtin: True
  description: "Built-in APIKEY update permission"
  displayname: p_apikey_update
      
- classname: _permission
  keyname: p_apikey_delete
  is_builtin: True
  description: "Built-in APIKEY delete permission"
  displayname: p_apikey_delete

- classname: _permission
  keyname: p_apikey_import
  is_builtin: True
  description: "Built-in APIKEY import permission"
  displayname: p_apikey_import

- classname: _permission
  keyname: p_apikey_export
  is_builtin: True
  description: "Built-in APIKEY export permission"
  displayname: p_apikey_export



# -- schema


- classname: _schema
  keyname: _apikey
  #_action: init
  displayname: API Keys
  is_enabled: yes
  icon: fa-key
  order: 820
  page: Admin
  handle_method: md5
  p_admin: p_apikey_admin
  p_create: p_apikey_create
  p_read: p_apikey_read
  p_update: p_apikey_update
  p_delete: p_apikey_delete
  p_import: p_apikey_import
  p_export: p_apikey_export
  keyvalue:
        displayname: Secret
        order: 50
        dataformat: string
  description:
        displayname: Description
        order: 60
        dataformat: string
        default : "API Key"
  is_readonly:
        displayname: Read-Only
        dataformat: boolean
        order: 70
        default: true
  permissions:
        order: 80
        displayname: Permissions
        dataformat: text
  not_after:
        displayname: Not After
        description: format YYYY-MM-DD
        dataformat: date
  time_filter:
        displayname: Time Filter
        dataformat: text
  ip_filter:
        displayname: IP Filter
        dataformat: text
        default : "*"
  acl_filter:
        displayname: ACL Filter
        cardinal_max: 0
        dataformat: text
  last_success:
        displayname: Last Success
        description: format YYYY-MM-DD
        dataformat: date
  last_error:
        displayname: Last Error
        description: format YYYY-MM-DD
        dataformat: date
  success_count:
        displayname: Success Count
        dataformat: int
  error_count:
        displayname: Error Count
        dataformat: int



      


