License API
User Licenses
1min
This endpoint lets you list all licenses assigned to the specified user for thr specified product. Note that this list will only show user-based licenses, as key-based licenses are not tied to any specific user.
Get a list of licenses assigned to a user for a product
GET
Request
Query Parameters
product
required
String
Short code of the product
username
required
String
User's username
password
required
String
User's password
Header Parameters
Date
required
String
eg. Thu, 17 Nov 2022 20:51:35 GMT
Authorization
required
String
See "License API authorization" for details
JS
Curl
1const headers = new Headers();
2headers.append("Accept", "application/json");
3headers.append("Date", "DATE_STRING");
4headers.append("Authorization", "AUTHORIZATION_STRING");
5
6const requestOptions = {
7 method: 'GET',
8 headers: headers,
9 redirect: 'follow'
10};
11
12const queryParams = new URLSearchParams({
13 product: 'PRODUCT_STRING',
14 username: 'USERNAME_STRING',
15 password: 'PASSWORD_STRING',
16})
17.toString();
18
19fetch("/api/v4/user_licenses?" + queryParams, requestOptions)
20 .then(response => response.text())
21 .then(result => console.log(result))
22 .catch(error => console.log('error', error));
Responses
200
404
1[
2 {
3 "license": {
4 "id": 10003,
5 "order_store_id": "store_id_for_order_3",
6 "license_active": true,
7 "license_enabled": true,
8 "license_type": "perpetual",
9 "is_trial": false,
10 "max_license_users": 1,
11 "validity_period": null,
12 "enable_maintenance_period": false,
13 "maintenance_period": null,
14 "allow_grace_period": false,
15 "grace_period": 0,
16 "max_activations": 1,
17 "allow_unlimited_activations": false,
18 "times_activated": 1,
19 "start_date": null,
20 "transfer_count": 0,
21 "max_transfers": 0,
22 "allow_overages": false,
23 "max_overages": 0,
24 "is_floating_cloud": false,
25 "is_floating": false,
26 "floating_timeout": 120,
27 "can_borrow": false,
28 "max_borrow_time": 0,
29 "prevent_vm": false,
30 "custom_fields": [],
31 "product_features": [],
32 "customer": {
33 "email": "[email protected]",
34 "company_name": "Some Company",
35 "reference": "ref_for_customer_1",
36 "phone": "",
37 "first_name": "",
38 "last_name": "",
39 "city": "",
40 "postcode": "",
41 "state": "",
42 "country": "",
43 "address": "",
44 "customer_account": null,
45 "metadata": {}
46 },
47 "product_details": {
48 "product_id": 10006,
49 "product_name": "User Product",
50 "short_code": "up",
51 "authorization_method": "user",
52 "metadata": {}
53 },
54 "metadata": {},
55 "is_hardware_key_auth": false,
56 "is_air_gapped": false
57 },
58 "user": {
59 "id": 10003,
60 "email": "[email protected]",
61 "first_name": "Some",
62 "last_name": "User",
63 "phone_number": "",
64 "is_initial_password": true,
65 "max_activations": 1,
66 "allow_unlimited_activations": false,
67 "total_activations": 1
68 }
69 },
70 {
71 "license": {
72 "id": 1719215304208059,
73 "order_store_id": "trial_1719215304208039",
74 "license_active": true,
75 "license_enabled": true,
76 "license_type": "perpetual",
77 "is_trial": true,
78 "max_license_users": 1,
79 "validity_period": "2031-03-16",
80 "enable_maintenance_period": false,
81 "maintenance_period": null,
82 "allow_grace_period": false,
83 "grace_period": 0,
84 "max_activations": 1,
85 "allow_unlimited_activations": false,
86 "times_activated": 1,
87 "start_date": null,
88 "transfer_count": 3,
89 "max_transfers": 2,
90 "allow_overages": false,
91 "max_overages": 0,
92 "is_floating_cloud": false,
93 "is_floating": false,
94 "floating_timeout": 120,
95 "can_borrow": false,
96 "max_borrow_time": 0,
97 "prevent_vm": false,
98 "custom_fields": [],
99 "product_features": [],
100 "customer": {
101 "email": "[email protected]",
102 "company_name": "",
103 "reference": "",
104 "phone": "",
105 "first_name": "",
106 "last_name": "",
107 "city": "",
108 "postcode": "",
109 "state": "",
110 "country": "",
111 "address": "",
112 "customer_account": null,
113 "metadata": {}
114 },
115 "product_details": {
116 "product_id": 10006,
117 "product_name": "User Product",
118 "short_code": "up",
119 "authorization_method": "user",
120 "metadata": {}
121 },
122 "metadata": {},
123 "is_hardware_key_auth": false,
124 "is_air_gapped": false,
125 "trial_days": 15
126 },
127 "user": {
128 "id": 10003,
129 "email": "[email protected]",
130 "first_name": "Some",
131 "last_name": "User",
132 "phone_number": "",
133 "is_initial_password": true,
134 "max_activations": 1,
135 "allow_unlimited_activations": false,
136 "total_activations": 1
137 }
138 }
139]
Updated 25 Jul 2024
Did this page help you?