CoolCMS API

ApiClientKeyConfig
in package

FinalYes

Application key settings (`parameters.api.clientKey` in `config/Shared/api.neon`).

  • required: true makes an external call without a key end with 401 (except #[NoClientKey] actions). false lets a call without a key behave as before keys existed; a call with a key is still verified and capped by limits and the client role ceiling.
  • cacheTtl: how long (in seconds) the client record is cached. A change through ApiClientManager clears it at once; a manual DB edit shows up after this time at the latest.
  • default limits for clients that have none of their own (null in the column).

Table of Contents

Properties

$cacheTtl  : int
$ipLimitPerMinute  : int
$limitPerMinute  : int
$limitPerSecond  : int
$required  : bool
$userLimitPerMinute  : int

Methods

__construct()  : mixed
resolveIpLimitPerMinute()  : int
resolveLimitPerMinute()  : int
resolveLimitPerSecond()  : int
resolveUserLimitPerMinute()  : int

Properties

Methods

__construct()

public __construct([bool $required = true ][, int $cacheTtl = 60 ][, int $limitPerSecond = 20 ][, int $limitPerMinute = 600 ][, int $userLimitPerMinute = 120 ][, int $ipLimitPerMinute = 120 ]) : mixed
Parameters
$required : bool = true
$cacheTtl : int = 60
$limitPerSecond : int = 20
$limitPerMinute : int = 600
$userLimitPerMinute : int = 120
$ipLimitPerMinute : int = 120
On this page

Search results