PHP SDK Reference

Vault

Table of Contents

$apiendpoint  : mixed
$apikey  : mixed
addImage()  : array<string|int, mixed>
Delete a single or multiple vault entries
delete()  : bool
Delete a single or multiple vault entries
deleteImage()  : bool
Delete an image from vault
get()  : array<string|int, mixed>
Get a single vault entry
init()  : null
Initialize Vault API with an API key, and optional region (US, EU)
list()  : array<string|int, mixed>
List multiple vault entries with optional filter, sorting and paging arguments
searchFace()  : array<string|int, mixed>
Search vault using a person's face image
trainFace()  : bool
Train vault for face search
trainingStatus()  : array<string|int, mixed>
Get vault training status
update()  : bool
List multiple vault entries with optional filter, sorting and paging arguments
callAPI()  : mixed

Properties

$apiendpoint

private mixed $apiendpoint = ""

$apikey

private mixed $apikey

Methods

addImage()

Delete a single or multiple vault entries

public addImage(string $id, string $image, int $type) : array<string|int, mixed>
Parameters
$id : string

Vault entry ID or array of IDs

$image : string

Image file path or URL

$type : int

Type of image: 0 = document, 1 = person

Tags
throws
Exception
Return values
array<string|int, mixed>

New image information array

delete()

Delete a single or multiple vault entries

public delete(mixed $id) : bool
Parameters
$id : mixed

Vault entry ID or array of IDs

Tags
throws
Exception
Return values
bool

deleteImage()

Delete an image from vault

public deleteImage(string $vaultId, string $imageId) : bool
Parameters
$vaultId : string

Vault entry ID

$imageId : string

Image ID

Tags
throws
Exception
Return values
bool

get()

Get a single vault entry

public get(string $id) : array<string|int, mixed>
Parameters
$id : string

Vault entry ID

Tags
throws
Exception
Return values
array<string|int, mixed>

init()

Initialize Vault API with an API key, and optional region (US, EU)

public init(string $apikey[, string $region = "US" ]) : null
Parameters
$apikey : string

You API key

$region : string = "US"

US/EU

Return values
null

list()

List multiple vault entries with optional filter, sorting and paging arguments

public list([array<string|int, mixed> $filter = array() ][, string $orderby = "createtime" ][, string $sort = "DESC" ][, int $limit = 10 ], int $offset) : array<string|int, mixed>
Parameters
$filter : array<string|int, mixed> = array()

Array of filter statements, refer to https://developer.idanalyzer.com/vaultapi.html for filter construction

$orderby : string = "createtime"

Field name used to order the results, refer to https://developer.idanalyzer.com/vaultapi.html for available fields

$sort : string = "DESC"

Sort results by ASC = Ascending, DESC = DESCENDING

$limit : int = 10

Number of results to return

$offset : int

Offset the first result using specified index

Tags
throws
Exception
Return values
array<string|int, mixed>

searchFace()

Search vault using a person's face image

public searchFace(string $image[, int $maxEntry = 10 ][, float $threshold = 0.5 ]) : array<string|int, mixed>
Parameters
$image : string

Face image file path or URL

$maxEntry : int = 10

Number of entries to return, 1 to 10.

$threshold : float = 0.5

Minimum confidence score required for face matching

Tags
throws
Exception
Return values
array<string|int, mixed>

List of vault entries

trainFace()

Train vault for face search

public trainFace() : bool
Tags
throws
Exception
Return values
bool

trainingStatus()

Get vault training status

public trainingStatus() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

update()

List multiple vault entries with optional filter, sorting and paging arguments

public update(string $id[, array<string|int, mixed> $data = array() ]) : bool
Parameters
$id : string

Vault entry ID

$data : array<string|int, mixed> = array()

Key-value pairs of the field name and its value

Tags
throws
Exception
Return values
bool

callAPI()

private callAPI(mixed $action[, mixed $payload = array() ]) : mixed
Parameters
$action : mixed
$payload : mixed = array()
Return values
mixed

Search results