License API
License Activation/Deactivatio...
Deactivate License (Online Method)
10 min
{ "tab" "examples", "url" "/api/v4/deactivate license", "name" "/api/v4/deactivate license", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "kind" "required", "name" "date", "type" "string", "children" \[], "description" "in rfc7231 format (see \\"license api authorization\\"), eg thu, 17 nov 2022 20 51 35 gmt" }, { "kind" "required", "name" "authorization", "type" "string", "children" \[], "description" "see \\"license api authorization\\" article" } ], "bodydataparameters" \[ { "kind" "required", "name" "hardware id", "type" "string", "children" \[], "description" "unique hardware id generated for the client device" }, { "kind" "required", "name" "product", "type" "string", "children" \[], "description" "product short code" }, { "kind" "optional", "name" "license key", "type" "string", "children" \[], "description" "required if product is key based (see section below)" }, { "kind" "optional", "name" "username", "type" "string", "children" \[], "description" "required if product is user based (see section below)" }, { "kind" "optional", "name" "id token", "type" "string", "children" \[], "description" "required if using sso (see section below) this is the id token received from the sso if implicit grant authorization method is being used " }, { "kind" "optional", "name" "code", "type" "string", "children" \[], "description" "required if using sso (see section below) this is the code received from the sso if authorization code grant method is being used " }, { "kind" "optional", "name" "customer account code", "type" "string", "children" \[], "description" "required if using sso (see section below) this is the customer account code to which sso provider is configured " }, { "name" "license id", "kind" "optional", "type" "number", "description" "ensures that the action affects only the license with the specified id this is useful if e g you have multiple licenses for the same product assigned to the same user for obtaining a list of licenses assigned to a user, see \\"user licenses\\"", "children" \[] }, { "kind" "optional", "name" "sdk ver", "type" "string", "description" "version of the sdk used", "" "version of the sdk used" }, { "name" "consumptions", "kind" "optional", "type" "number", "description" "increases/decreases total consumptions", "" "increases/decreases total consumptions" } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "es8g1cukjmbnpiivt9vof", "code" "license deactivated", "language" "200", "customlabel" "" }, { "id" "7eyilksv2qgjcowesdz 2", "code" "{\n \\"unknown product\\" \\"provided product was not found\\",\n \\"license not found\\" \\"license with the provided license user not found\\",\n \\"license not enabled\\" \\"the license is not enabled\\",\n \\"vm not allowed\\" \\"virtual machine not allowed\\",\n \\"offline floating cloud not supported\\" \\" floating cloud licenses cannot be activated offline \\",\n \\"license start date error\\" \\"this license cannot be activated before start date {date}\\",\n \\"blacklisted\\" \\"this device is blacklisted\\",\n \\"license activated max times\\" \\"this license has already been activated the maximum number of times\\",\n \\"license user activated max times\\" \\"license user has activated this license max times\\",\n \\"license expired\\" \\"license validity period has expired \\",\n \\"license transferred max times\\" \\"this license has already been transferred the maximum number of times\\",\n \\"license device exists\\" \\"a device matching this hardware id is already created on the license\\"\n}", "language" "400", "customlabel" "" } ], "selectedlanguageid" "7eyilksv2qgjcowesdz 2" }, "examples" { "languages" \[ { "id" "xgx5uw4vq7bjnbqvq ia0", "language" "curl", "code" "curl location request post '/api/v4/deactivate license' \\\\\n header 'accept application/json' \\\\\n header 'date string' \\\\\n header 'authorization string' \\\\\n data raw '{\\"hardware id\\" \\"string\\",\\"product\\" \\"string\\",\\"license key\\" \\"string\\",\\"username\\" \\"string\\",\\"password\\" \\"string\\",\\"id token\\" \\"string\\",\\"code\\" \\"string\\",\\"customer account code\\" \\"string\\",\\"is vm\\" \\"boolean\\",\\"vm info\\" \\"string\\",\\"os ver\\" \\"string\\",\\"hostname\\" \\"string\\",\\"os hostname\\" \\"string\\",\\"ip\\" \\"string\\",\\"ip local\\" \\"string\\",\\"app ver\\" \\"string\\",\\"sdk ver\\" \\"string\\",\\"mac address\\" \\"string\\"}'", "customlabel" "" }, { "id" "3fz0q qaza0rnhg5k5r w", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' '/api/v4/deactivate license',\n 'headers' {\n 'accept' 'application/json',\n 'date' 'string',\n 'authorization' 'string'\n },\n body '{\\"hardware id\\" \\"string\\",\\"product\\" \\"string\\",\\"license key\\" \\"string\\",\\"username\\" \\"string\\",\\"password\\" \\"string\\",\\"id token\\" \\"string\\",\\"code\\" \\"string\\",\\"customer account code\\" \\"string\\",\\"is vm\\" \\"boolean\\",\\"vm info\\" \\"string\\",\\"os ver\\" \\"string\\",\\"hostname\\" \\"string\\",\\"os hostname\\" \\"string\\",\\"ip\\" \\"string\\",\\"ip local\\" \\"string\\",\\"app ver\\" \\"string\\",\\"sdk ver\\" \\"string\\",\\"mac address\\" \\"string\\"}'\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "ujvcs wf1caibtuqkjtug", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"date\\", \\"string\\");\nmyheaders append(\\"authorization\\", \\"string\\");\n\nvar raw = \\"{\\\\\\"hardware id\\\\\\" \\\\\\"string\\\\\\",\\\\\\"product\\\\\\" \\\\\\"string\\\\\\",\\\\\\"license key\\\\\\" \\\\\\"string\\\\\\",\\\\\\"username\\\\\\" \\\\\\"string\\\\\\",\\\\\\"password\\\\\\" \\\\\\"string\\\\\\",\\\\\\"id token\\\\\\" \\\\\\"string\\\\\\",\\\\\\"code\\\\\\" \\\\\\"string\\\\\\",\\\\\\"customer account code\\\\\\" \\\\\\"string\\\\\\",\\\\\\"is vm\\\\\\" \\\\\\"boolean\\\\\\",\\\\\\"vm info\\\\\\" \\\\\\"string\\\\\\",\\\\\\"os ver\\\\\\" \\\\\\"string\\\\\\",\\\\\\"hostname\\\\\\" \\\\\\"string\\\\\\",\\\\\\"os hostname\\\\\\" \\\\\\"string\\\\\\",\\\\\\"ip\\\\\\" \\\\\\"string\\\\\\",\\\\\\"ip local\\\\\\" \\\\\\"string\\\\\\",\\\\\\"app ver\\\\\\" \\\\\\"string\\\\\\",\\\\\\"sdk ver\\\\\\" \\\\\\"string\\\\\\",\\\\\\"mac address\\\\\\" \\\\\\"string\\\\\\"}\\";\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"/api/v4/deactivate license\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "ohvg2 kc9raafj9m1quof", "language" "python", "code" "import requests\n\nurl = \\"/api/v4/deactivate license\\"\n\npayload = \\"{\\\\\\"hardware id\\\\\\" \\\\\\"string\\\\\\",\\\\\\"product\\\\\\" \\\\\\"string\\\\\\",\\\\\\"license key\\\\\\" \\\\\\"string\\\\\\",\\\\\\"username\\\\\\" \\\\\\"string\\\\\\",\\\\\\"password\\\\\\" \\\\\\"string\\\\\\",\\\\\\"id token\\\\\\" \\\\\\"string\\\\\\",\\\\\\"code\\\\\\" \\\\\\"string\\\\\\",\\\\\\"customer account code\\\\\\" \\\\\\"string\\\\\\",\\\\\\"is vm\\\\\\" \\\\\\"boolean\\\\\\",\\\\\\"vm info\\\\\\" \\\\\\"string\\\\\\",\\\\\\"os ver\\\\\\" \\\\\\"string\\\\\\",\\\\\\"hostname\\\\\\" \\\\\\"string\\\\\\",\\\\\\"os hostname\\\\\\" \\\\\\"string\\\\\\",\\\\\\"ip\\\\\\" \\\\\\"string\\\\\\",\\\\\\"ip local\\\\\\" \\\\\\"string\\\\\\",\\\\\\"app ver\\\\\\" \\\\\\"string\\\\\\",\\\\\\"sdk ver\\\\\\" \\\\\\"string\\\\\\",\\\\\\"mac address\\\\\\" \\\\\\"string\\\\\\"}\\"\nheaders = {\n 'accept' 'application/json',\n 'date' 'string',\n 'authorization' 'string'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "urxe dggnxfjeo27hugsl", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"/api/v4/deactivate license\\")\n\nhttp = net http new(url host, url port);\nrequest = net http post new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"date\\"] = \\"string\\"\nrequest\[\\"authorization\\"] = \\"string\\"\nrequest body = \\"{\\\\\\"hardware id\\\\\\" \\\\\\"string\\\\\\",\\\\\\"product\\\\\\" \\\\\\"string\\\\\\",\\\\\\"license key\\\\\\" \\\\\\"string\\\\\\",\\\\\\"username\\\\\\" \\\\\\"string\\\\\\",\\\\\\"password\\\\\\" \\\\\\"string\\\\\\",\\\\\\"id token\\\\\\" \\\\\\"string\\\\\\",\\\\\\"code\\\\\\" \\\\\\"string\\\\\\",\\\\\\"customer account code\\\\\\" \\\\\\"string\\\\\\",\\\\\\"is vm\\\\\\" \\\\\\"boolean\\\\\\",\\\\\\"vm info\\\\\\" \\\\\\"string\\\\\\",\\\\\\"os ver\\\\\\" \\\\\\"string\\\\\\",\\\\\\"hostname\\\\\\" \\\\\\"string\\\\\\",\\\\\\"os hostname\\\\\\" \\\\\\"string\\\\\\",\\\\\\"ip\\\\\\" \\\\\\"string\\\\\\",\\\\\\"ip local\\\\\\" \\\\\\"string\\\\\\",\\\\\\"app ver\\\\\\" \\\\\\"string\\\\\\",\\\\\\"sdk ver\\\\\\" \\\\\\"string\\\\\\",\\\\\\"mac address\\\\\\" \\\\\\"string\\\\\\"}\\"\n\nresponse = http request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "ujvcs wf1caibtuqkjtug" }, "description" "dectivate a license for a product\n", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } } schema request body type licenseactivationrequestbody = ({ // for key based licenses license key string } | { // for user based licenses username string password string } | { // for user based licenses using single sign on implicit grant id token string customer account code string } | { // for user based licenses using single sign on authorization code grant code string customer account code string }) & { // required properties hardware id string product string // optional properties bundle code? string | undefined license id? number | undefined sdk ver? string | undefined } json schema { "$schema" "https //json schema org/draft/2020 12/schema", "type" "object", "allof" \[ { "oneof" \[ { "type" "object", "properties" { "license key" { "type" "string" } }, "required" \["license key"], "additionalproperties" false }, { "type" "object", "properties" { "username" { "type" "string" }, "password" { "type" "string" } }, "required" \["username", "password"], "additionalproperties" false }, { "type" "object", "properties" { "id token" { "type" "string" }, "customer account code" { "type" "string" } }, "required" \["id token", "code", "customer account code"], "additionalproperties" false }, { "type" "object", "properties" { "code" { "type" "string" }, "customer account code" { "type" "string" } }, "required" \["id token", "code", "customer account code"], "additionalproperties" false } ] }, { "type" "object", "properties" { "hardware id" { "type" "string" }, "product" { "type" "string" }, "bundle code" { "type" "string" }, "license id" { "type" "number" }, "sdk ver" { "type" "string" } }, "required" \["hardware id", "product"], "additionalproperties" false } ] } response body if the request succeeds, the endpoint responds with the http code 200 and the string license deactivated license authorization method there are two types of product licenses based on how the client application authorizes itself to interact with a license key based product licenses each license assigned to the product requires the client to provide a license key in order to activate, check or deactivate the license (property license key in the request body) the license response object will contain the license key property, and the property product details authorization method will be the string license key user based product licenses each license assigned to the product has a corresponding "license user" instead of a license key there are multiple ways a user based product license can be accessed when making a request by providing the values for username and password for the license user by providing the values for id token and customer account code if using single sign on authentication using implicit grant by providing the values for code and customer account code if using single sign on authentication using authorization code grant in the license response object, product details authorization method will have the string value user and the response object will contain the user object with information on the license user errors if an error occurs, the response will have an http status code of 400 or higher, and the response body will contain an error description in the following format { status number, code string, message string } json schema { "$schema" "https //json schema org/draft/2020 12/schema", "type" "object", "properties" { "status" { "type" "number" }, "code" { "type" "string" }, "message" { "type" "string" } }, "required" \[ "status", "code", "message" ], "additionalproperties" false } list of exceptions unknown product (400) provided product was not found license not found (400) license with the provided license user not found license not active (400) the license is not active device not found (400) an active device matching the hardware id not found missing headers (400) some headers are missing