Skip to content

Blacklists

Our service allows you to manage your blacklists in other applications by using REST API.


Create

To create a blacklist you need to send a request to the REST API by following instructions.

Body parameters
  • value string required
    Blacklist value (HWID or IP)
  • type HWID, IP required
    Blacklist type (HWID or IP)
Codes
Status codeDescription
401You don't have permission to create blacklist.
409Blacklist with this value and type already exists.
423You don't have any plan assigned or you have reached the limit of blacklists.
201Blacklist created.

Sample request

http
curl -X PUT https://api.mlicense.net/api/v1/blacklists \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: {API_KEY}' \
  -d '{
    "value": "127.0.0.1",
    "type": "IP"
  }'

Sample token

text
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Sample response

json
{
  "id": 0,
  "value": "string",
  "type": "IP"
}

Update

To update a blacklist you need to send a request to the REST API by following instructions.

Body parameters
  • id long required
    Unique identifier for the blacklist.
  • value string
    Blacklist value (HWID or IP)
  • type HWID, IP
    Blacklist type (HWID or IP)
Codes
Status codeDescription
401You don't have permission to update blacklist.
404Product with this name not exists.
201Blacklist updated.

Sample request

http
curl -X POST https://api.mlicense.net/api/v1/blacklists \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: {API_KEY}' \
  -d '{
    "id": 1,
    "value": "127.0.0.2",
  }'

Sample token

text
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Sample response

json
{
  "id": 0,
  "value": "string",
  "type": "IP"
}

Get

To get a blacklist you need to send a request to the REST API by following instructions.
Remember get all return JsonArray with all products objects.

Request parameter
  • id long required for (blacklists/id)
    Unique identifier for the blacklist.
Codes
Status CodeDescription
401You don't have permission to view this blacklist.
404Blacklist not found.
200Return blacklist.

Sample request for ALL

http
curl -X GET https://api.mlicense.net/api/v1/blacklists/all \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: {API_KEY}'

Sample request for ID

http
curl -X GET https://api.mlicense.net/api/v1/blacklists/id?id=BLACKLIST_ID \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: {API_KEY}'

Sample token

text
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Sample response

json
{
  "id": 0,
  "value": "string",
  "type": "IP"
}

Delete

To delete a blacklist you need to send a request to the REST API by following instructions.

Request parameter
  • id long required
    Unique identifier for the product.
Codes
Status CodeDescription
401You don't have permission to delete this blacklist.
404Product not found.
204Blacklist successfully deleted.

Sample request

http
curl -X DELETE https://api.mlicense.net/api/v1/blacklists?id=BLACKLIST_ID \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: {API_KEY}'

Sample token

text
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c