{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"License API","type":"basic","slug":"license-api","excerpt":"","body":"The License API provides methods for your application to query properties of the installed license.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"License API Endpoint\",\n  \"body\": \"The License API is part of the [Integration API](doc:integration-api-reference).  To discover the Integration API base endpoint, query the `REPLICATED_INTEGRATIONAPI` environment variable from inside your container.\"\n}\n[/block]\nAll methods return result as JSON.  If `Accept` header is included in the request, it must contain `*/*` or `application/json`.  If neither of these values is present, the request will fail with status 400.\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/license/v1/license\"\n}\n[/block]\nReturns current license information.\n[block:parameters]\n{\n  \"data\": {\n    \"3-0\": \"fields\",\n    \"h-0\": \"Name\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"3-1\": \"Array\",\n    \"3-2\": \"Always returned.  This is the array of field names and their values.\",\n    \"4-0\": \"expiration_time\",\n    \"5-0\": \"billing_frequency\",\n    \"4-1\": \"String (optional)\",\n    \"5-1\": \"String (optional)\",\n    \"4-2\": \"License expiration time in `RFC 3339` format.  Will be omitted if license does not expire.\",\n    \"5-2\": \"Optional billing frequency as defined in vendor portal.\",\n    \"0-0\": \"license_id\",\n    \"0-1\": \"String\",\n    \"0-2\": \"License ID of this installation.  Multiple installations can use the same license.\",\n    \"1-0\": \"installation_id\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Unique ID of this installation.\",\n    \"6-0\": \"billing_begin\",\n    \"6-1\": \"String (optional)\",\n    \"6-2\": \"Billing start time in `RFC 3339` format.  Will be omitted if billing is not set for this license.\",\n    \"7-0\": \"billing_end\",\n    \"7-1\": \"String (optional)\",\n    \"7-2\": \"Billing end time in `RFC 3339` format.  Will be omitted if billing is not set for this license or if billing is indefinite.\",\n    \"2-0\": \"release_channel\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Release channel name.  Available in Replicated API 1.3.5 and later\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]\n### Example request:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k $REPLICATED_INTEGRATIONAPI/license/v1/license\",\n      \"language\": \"curl\",\n      \"name\": \"Example Request\"\n    }\n  ]\n}\n[/block]\n### Example response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json; charset=utf-8\\nDate: Tue, 16 Jun 2015 18:05:35 GMT\\nContent-Length: 214\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"license_id\\\": \\\"f49b290abf39b945c6f519ee6ca1c4ad\\\",\\n    \\\"installation_id\\\": \\\"44e8188e6fec84ac425829cde0eeee8e\\\",\\n    \\\"release_channel\\\": \\\"Unstable\\\",\\n    \\\"fields\\\": [\\n        {\\n            \\\"field\\\": \\\"max_hosts\\\",\\n            \\\"title\\\": \\\"Maximum Number of Hosts\\\",\\n            \\\"type\\\": \\\"Integer\\\",\\n            \\\"value\\\": 1,\\n            \\\"hide_from_customer\\\": false\\n        },\\n        {\\n            \\\"field\\\": \\\"min_hosts\\\",\\n            \\\"title\\\": \\\"Minimum Number of Hosts\\\",\\n            \\\"type\\\": \\\"Integer\\\",\\n            \\\"value\\\": 1,\\n            \\\"hide_from_customer\\\": false\\n        },\\n        {\\n            \\\"field\\\": \\\"account\\\",\\n            \\\"title\\\": \\\"Account Name\\\",\\n            \\\"type\\\": \\\"String\\\",\\n            \\\"value\\\": \\\"Replicated, Inc\\\",\\n            \\\"hide_from_customer\\\": false\\n        }\\n    ],\\n    \\\"expiration_time\\\": \\\"2016-01-01T00:00:00Z\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Example Response\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/license/v1/field/<field_name>\"\n}\n[/block]\nReturns license field.\n\n### Example request:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -k $REPLICATED_INTEGRATIONAPI/license/v1/field/max_queues\",\n      \"language\": \"curl\",\n      \"name\": \"Example Request\"\n    }\n  ]\n}\n[/block]\n### Example response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json; charset=utf-8\\nDate: Tue, 16 Jun 2015 18:14:23 GMT\\nContent-Length: 36\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"field\\\": \\\"max_queues\\\",\\n    \\\"value\\\": \\\"99\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Example Response\"\n    }\n  ]\n}\n[/block]","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5702deb796fc8d2b001a663c","user":"550f1e3161d9d30d00af9dc8","version":{"version":"2.0","version_clean":"2.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5702deb696fc8d2b001a6616","5702deb696fc8d2b001a6617","5702deb696fc8d2b001a6618","5702deb696fc8d2b001a6619","5702deb696fc8d2b001a661a","5702deb696fc8d2b001a661b","5702deb696fc8d2b001a661c","5702deb696fc8d2b001a661d","5702deb696fc8d2b001a661e"],"_id":"5702deb696fc8d2b001a6615","createdAt":"2016-04-04T21:37:58.778Z","hasReference":true,"releaseDate":"2016-04-04T21:37:58.778Z","__v":1,"project":"550f1e4021de720d005b8cbb","hasDoc":true},"parentDoc":null,"__v":5,"githubsync":"","createdAt":"2015-03-22T21:25:51.984Z","project":"550f1e4021de720d005b8cbb","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Integration API","slug":"integration-api","order":7,"from_sync":false,"reference":false,"_id":"5702deb696fc8d2b001a661d","project":"550f1e4021de720d005b8cbb","version":"5702deb696fc8d2b001a6615","createdAt":"2015-03-22T20:15:45.359Z","__v":0}}
The License API provides methods for your application to query properties of the installed license. [block:callout] { "type": "info", "title": "License API Endpoint", "body": "The License API is part of the [Integration API](doc:integration-api-reference). To discover the Integration API base endpoint, query the `REPLICATED_INTEGRATIONAPI` environment variable from inside your container." } [/block] All methods return result as JSON. If `Accept` header is included in the request, it must contain `*/*` or `application/json`. If neither of these values is present, the request will fail with status 400. [block:api-header] { "type": "get", "title": "/license/v1/license" } [/block] Returns current license information. [block:parameters] { "data": { "3-0": "fields", "h-0": "Name", "h-1": "Type", "h-2": "Description", "3-1": "Array", "3-2": "Always returned. This is the array of field names and their values.", "4-0": "expiration_time", "5-0": "billing_frequency", "4-1": "String (optional)", "5-1": "String (optional)", "4-2": "License expiration time in `RFC 3339` format. Will be omitted if license does not expire.", "5-2": "Optional billing frequency as defined in vendor portal.", "0-0": "license_id", "0-1": "String", "0-2": "License ID of this installation. Multiple installations can use the same license.", "1-0": "installation_id", "1-1": "String", "1-2": "Unique ID of this installation.", "6-0": "billing_begin", "6-1": "String (optional)", "6-2": "Billing start time in `RFC 3339` format. Will be omitted if billing is not set for this license.", "7-0": "billing_end", "7-1": "String (optional)", "7-2": "Billing end time in `RFC 3339` format. Will be omitted if billing is not set for this license or if billing is indefinite.", "2-0": "release_channel", "2-1": "String", "2-2": "Release channel name. Available in Replicated API 1.3.5 and later" }, "cols": 3, "rows": 8 } [/block] ### Example request: [block:code] { "codes": [ { "code": "curl -k $REPLICATED_INTEGRATIONAPI/license/v1/license", "language": "curl", "name": "Example Request" } ] } [/block] ### Example response: [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\nDate: Tue, 16 Jun 2015 18:05:35 GMT\nContent-Length: 214", "language": "http" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"license_id\": \"f49b290abf39b945c6f519ee6ca1c4ad\",\n \"installation_id\": \"44e8188e6fec84ac425829cde0eeee8e\",\n \"release_channel\": \"Unstable\",\n \"fields\": [\n {\n \"field\": \"max_hosts\",\n \"title\": \"Maximum Number of Hosts\",\n \"type\": \"Integer\",\n \"value\": 1,\n \"hide_from_customer\": false\n },\n {\n \"field\": \"min_hosts\",\n \"title\": \"Minimum Number of Hosts\",\n \"type\": \"Integer\",\n \"value\": 1,\n \"hide_from_customer\": false\n },\n {\n \"field\": \"account\",\n \"title\": \"Account Name\",\n \"type\": \"String\",\n \"value\": \"Replicated, Inc\",\n \"hide_from_customer\": false\n }\n ],\n \"expiration_time\": \"2016-01-01T00:00:00Z\"\n}", "language": "json", "name": "Example Response" } ] } [/block] [block:api-header] { "type": "get", "title": "/license/v1/field/<field_name>" } [/block] Returns license field. ### Example request: [block:code] { "codes": [ { "code": "curl -k $REPLICATED_INTEGRATIONAPI/license/v1/field/max_queues", "language": "curl", "name": "Example Request" } ] } [/block] ### Example response: [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\nDate: Tue, 16 Jun 2015 18:14:23 GMT\nContent-Length: 36", "language": "http" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"field\": \"max_queues\",\n \"value\": \"99\"\n}", "language": "json", "name": "Example Response" } ] } [/block]