Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to delete nodeSecret value via RESTful API #30

Closed
r-brown opened this issue Apr 26, 2021 · 1 comment
Closed

How to delete nodeSecret value via RESTful API #30

r-brown opened this issue Apr 26, 2021 · 1 comment
Labels
question Further information is requested

Comments

@r-brown
Copy link
Member

r-brown commented Apr 26, 2021

Question

How to remove nodeSecret from license of node module with API request? I found only Netlicensing UI Customers tab where all node secrets for license listed.

@r-brown r-brown added the question Further information is requested label Apr 26, 2021
@r-brown
Copy link
Member Author

r-brown commented Apr 26, 2021

To be able to remove particular nodeSecret value (e.g. de-register locking) while using Node-Locked or Floating model, you need to obtain a list of assigned nodeSecrets using LicenseService.get() method.

sample request

curl -X GET \
  --header 'Accept: application/xml \
   --header 'Authorization: Basic ...' \
  'https://go.netlicensing.io/core/v2/rest/license/LQZ2KXKC5'

sample response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:netlicensing xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:ns2="http://netlicensing.labs64.com/schema/context">
  <ns2:infos/>
  <ns2:items>
    <ns2:item type="License">
      <ns2:property name="number">LQZ2KXKC5</ns2:property>
      <ns2:property name="active">true</ns2:property>
      <ns2:property name="name">5 units</ns2:property>
      <ns2:property name="price">30.00</ns2:property>
      <ns2:property name="currency">EUR</ns2:property>
      <ns2:property name="hidden">false</ns2:property>
      <ns2:property name="licenseeNumber">IE8Z4H8YY-DEMO</ns2:property>
      <ns2:property name="licenseTemplateNumber">EATTHWH5J-DEMO</ns2:property>
      <ns2:property name="quantity">5</ns2:property>
      <ns2:property name="nodeSecret4">d</ns2:property>
      <ns2:property name="nodeSecret5">e</ns2:property>
      <ns2:property name="nodeSecret2">a</ns2:property>
      <ns2:property name="nodeSecret3">c</ns2:property>
      <ns2:property name="nodeSecret1">b</ns2:property>
    </ns2:item>
  </ns2:items>
</ns2:netlicensing>

The XML or JSON response contains License entity representation incl. all associated nodeSecrets, where each value given with the property name; e.g. nodeSecret1, nodeSecret2 and so on.

To delete / deregister particular nodeSecret you need to send an empty nodeSecretN in the LicenseService.update()

e.g.
nodeSecret4=d&nodeSecret5=e&nodeSecret2=a&nodeSecret3=&nodeSecret1=b
...where nodeSecret3 is a property to be deleted

@r-brown r-brown closed this as completed May 1, 2021
@Labs64 Labs64 locked and limited conversation to collaborators Oct 29, 2023
@r-brown r-brown converted this issue into discussion #92 Oct 29, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Further information is requested
Development

No branches or pull requests

1 participant