This endpoint can be used to query single Generator record.
Endpoint
GET
/wp-json/dlm/v1/generators/{generator_id}
Responses
{
"success": true,
"data": {
"id": 1,
"name": "Games",
"charset": "ABCDWZ123590",
"chunks": 4,
"chunk_length": 4,
"activations_limit": "5",
"separator": "-",
"prefix": "",
"suffix": "",
"expires_in": "365",
"created_at": "2021-06-07 00:30:42",
"created_by": "1",
"updated_at": "2021-07-07 18:43:01",
"updated_by": "1"
}
}
{
"code": "data_error",
"message": "The generator could not be found.",
"data": {
"code": 404
}
}
Examples
Example
use IdeoLogix\DigitalLicenseManagerClient\Service;
$api = new Service( 'http://site.com', 'ck_XXXX', 'cs_XXXX' );
$response = $api->generators()->find(1);
print_r( $response->get_data() );
Response
Array
(
[id] => 1
[name] => Games
[charset] => ABCDWZ123590
[chunks] => 4
[chunk_length] => 4
[activations_limit] => 5
[separator] => -
[prefix] => NULL
[suffix] => NULL
[expires_in] => 365
[created_at] => 2021-06-07 00:30:42
[updated_at] => 2021-07-07 18:43:01
)
For more details please click here.