Last Modified January 26, 2021

Licenses Delete Device

  1. API Request
  2. API Response
  3. Request Examples
  4. Response Examples

 

Use the Licenses Delete Device API to delete a device from a License.

HTTP Verb Element Syntax
DELETE URL https://api.softworkz.com/v1/Licenses/<productId>/<licenseId>/<deviceId>
Body
{
    "UserIp":"<userIp>",
    "Test":<Test>
}
                                    

Delete the specified device from the License

Where:

Parameter Type Value Required Default
<productId> string the DNA ProductID Yes  
<licenseId> string the License Activation Code Yes  
<deviceId> string the <deviceId> (i.e. <machineId>) of the device to be deleted. The <deviceId> should be one returned by the Licenses Detail API. Yes  
<UserIp> string the User's IP Address, for protection against end-user abuse Yes  
<Test> bool if true, this is a Test Event No false

 

API Response

Success HTTP Status Code Description
204 No Content The specified device was deleted from the License
Error HTTP Status Code Description
400 Bad Request one of the parameters was invalid or missing - check error message in Response for details
401 Unauthorized Basic Authentication failed - verify that you are using the correct <clientId> and <apiKey> information in the Basic Authentication Header
404 Not Found The <productId> and/or the <licenseId> and/or the <deviceId> was not found
409 Conflict A Test Event for an ACTIVE Product was received succesfully - the device was not removed as Product is ACTIVE
429 Too Many Requests You have exceeded the allowed maximum of API Requests in the period - check "X-RateLimit-Reset" for the number of seconds remaining before reset
500 Internal Error An error occured on the DNA Server - try again later. Tech Support has been notified

 

Examples of API Requests

DELETE Licenses Delete Device example

curl -v -X DELETE https://api.softworkz.com/v1/licenses/<productId>/TEST12345/B76B991F0181CE9FD58BFAD22D45DEDC
-H "Accept: application/json"
-u "<clientId>:<API Key>"
-d ’{"UserIp":"0.0.0.0","Test":true}’
                

 

Example of API Response with License Delete Device

No Response body provided

 

Example of API Error Response

{
  "Message": "Invalid ProductId format"
}