Client library for Elastic.io v2
PSR-4 compliant PHP client for ElasticIO's admin API Version 2
composer install
// Username and API Key needs to be defined.
define('USERNAME', '');
define('APIKEY', '');
// Retrieving an exsting flow.
$flowid = 'FLOWID_TO_RETRIEVE';
$json = Factory::get('flow')->retrieveByID($flowid)->getResponse();
// Creating a new workspace.
$json = Factory::get('workspace')->create(
[
'type' => 'workspace',
'attributes' => ['name' => 'New Workspace Name'],
'relationships' => [
'contract' => [
'data' => [
'id' => $contractid,
'type' => 'contract',
]
]
]
]
)->getResponse();