Meilisearch PHP | Documentation

UpdateKeyQuery
in package

FinalYes

Table of Contents

Properties

$keyOrUid  : string
$description  : string|null
$name  : string|null

Methods

__construct()  : mixed
toArray()  : array{name: non-empty-string|null, description: non-empty-string|null}

Properties

Methods

__construct()

public __construct(non-empty-string $keyOrUid[, non-empty-string|null $name = null ][, non-empty-string|null $description = null ]) : mixed
Parameters
$keyOrUid : non-empty-string

the uid or key field of an existing API key

$name : non-empty-string|null = null

A new human-readable name for the API key. Pass null to remove the existing name. Use this to identify keys by purpose, such as "Production Search Key" or "CI/CD Indexing Key".

$description : non-empty-string|null = null

A new description for the API key. Pass null to remove the existing description. Useful for documenting the purpose or usage of the key.

toArray()

public toArray() : array{name: non-empty-string|null, description: non-empty-string|null}
Return values
array{name: non-empty-string|null, description: non-empty-string|null}

        
On this page

Search results