1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "operation": "generate",
12 "valueFormat": "standard",
13 "identifierType": "uuid_v4",
14 "count": 1536,
15 "names": [
16 "example.com",
17 "user-{{index}}"
18 ],
19 "nameTemplate": "item-{{index}}",
20 "namespace": "dns",
21 "customNamespace": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
22 "alphanumericLength": 16,
23 "sequentialStart": 1,
24 "sequentialStep": 1,
25 "sequentialPadding": 6,
26 "includeTimestampPrefix": false,
27 "uuids": [
28 "550e8400-e29b-41d4-a716-446655440000",
29 "urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8",
30 "550e8400-e29b-41d4-a716-446655440000"
31 ]
32};
33
34
35const run = await client.actor("maximedupre/uuid-generator").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45