To retrieve all product templates for a given product ID, use the following request:

GET /products/product_id/product-templates

where:

  • product_id (integer) is the product ID.

Example request

GET /products/1/product-templates HTTP/1.1
Authorization: Bearer f794846b7c26621688e1e06164975b4eae8ce2f6

Response

The LAC REST API returns the standard HTTP response codes described in the following table.

Status CodeDescription
200 OKProduct template list.
403 ForbiddenInvalid or expired token provided.
404 Not FoundProduct ID does not exist.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json

[
	{
		"id": "1",
		"name": "Default",
		"license_filename": "license_%TIME%.lic",
		"license_type": "local",
		"licensee_type": "not_specified",
		"licensee": null,
		"activations_allowed": "1",
		"deactivations_allowed": "0",
		"description": null,
		"hostid_match_rate": "100",
		"min_hostids": "1",
		"Hostids": [
			{
				"name": "Not Locked",
				"min_amount": "1",
				"max_amount": "1"
			}
		],
		"Features": [
			{
				"name": "licstat",
				"version": "1.0",
				"expiration_type": "no_expiration",
				"expiration_date": null,
				"issued_type": "not_issued",
				"issued_date": null,
				"options": null,
				"additional_settings": null,
				"enabled": true,
				"days_from_activation": null,
				"count": null,
				"maintenance_type": "no_maintenance",
				"maintenance_date": null,
				"maintenance_days_from_activation": null,
				"comment": null
			}
		]
	 },
	{
		"id": "2",
		"name": "Basic",
		"license_filename": "license_%TIME%.lic",
		"license_type": "network",
		"licensee_type": "fixed",
		"licensee": "licensee",
		"activations_allowed": "1",
		"deactivations_allowed": "0",
		"description": "",
		"hostid_match_rate": "100",
		"min_hostids": "1",
		"Hostids": [
			{
				"name": "Not Locked",
				"min_amount": "1",
				"max_amount": "1"
			}
		],
		"Features": [
			{
				"name": "licstat",
				"version": "2.0",
				"expiration_type": "fixed",
				"expiration_date": "2030-01-01",
				"issued_type": "not_issued",
				"issued_date": null,
				"options": "",
				"additional_settings": "",
				"enabled": true,
				"days_from_activation": null,
				"count": "5",
				"maintenance_type": "days_from_activation",
				"maintenance_date": null,
				"maintenance_days_from_activation": "180",
				"comment": ""
			}
		]
	}
]
  • No labels