This endpoint can be used to list the generators based on specific query parameters. If not query parameters are provided, the defaults in the below table will be used.
Endpoint
GET
/wp-json/dlm/v1/licenses
Parameters
Name | Type | Default | Is required |
---|---|---|---|
per_page | string |
30 | No |
page | number |
1 | No |
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": "authentication_error",
"message": "Consumer key or secret is missing.",
"data": {
"status": 401
}
}
Examples
Example
use IdeoLogix\DigitalLicenseManagerClient\Service;
$api= new Service( 'http://site.com', 'ck_XXXX', 'cs_XXXX' );
$response = $api->generators()->get( ['per_page' => 10, 'page' => 1] );
print_r( $response->get_data() );
Response
Array
(
[0] => 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
)
[1] => Array
(
[id] => 4
[name] => test
[charset] => ABCD1234567
[chunks] => 2
[chunk_length] => 4
[activations_limit] => 2
[separator] => -
[prefix] => DG
[suffix] => EK
[expires_in] => 365
[created_at] => 2021-07-09 16:56:11
[updated_at] => 2021-07-09 16:59:34
)
)
For more details please click here.