Library for accessing PLEIADES API.
Requires PHP 7.4 and above.
$api = new \PleiadesDecom\PhpApiClient\Client([
"clientId" => "", // your app's client ID
"clientSecret" => "", // your app's client secret
"userName" => "", // name of the user to authenticate
"userPassword" => "", // password of the user to authenticate
"iamTokenEndpoint" => "", // OIDC endpoint address of IAM server
"apiEndpoint" => "", // API server endpoint address
]);
$api->getAccessToken();
$api->setDatabase("testDatabase");
$records = $api->getRecords(["class" => "Database.Information"]);
$createdRecordId = $api->createRecord([
"class" => "Any.Valid.Class.Name",
"content" => ["AnyValidContent" => "AnyValidValue"]
]);
$api->updateRecord(
$recordId,
[
"class" => "Any.Valid.Class.Name",
"content" => ["AnyValidContent" => "AnyValidValue"]
]
);
$api->deleteRecord($recordId);
$record = $api->getRecord($recordId);
$records = $api->getRecords(["class" => "Any.Valid.Class.Name"]);