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
valuestring required
Blacklist value (HWID or IP)typeHWID, IP required
Blacklist type (HWID or IP)
Codes
| Status code | Description |
|---|---|
401 | You don't have permission to create blacklist. |
409 | Blacklist with this value and type already exists. |
423 | You don't have any plan assigned or you have reached the limit of blacklists. |
201 | Blacklist 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_adQssw5cSample 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
idlong required
Unique identifier for the blacklist.valuestring
Blacklist value (HWID or IP)typeHWID, IP
Blacklist type (HWID or IP)
Codes
| Status code | Description |
|---|---|
401 | You don't have permission to update blacklist. |
404 | Product with this name not exists. |
201 | Blacklist 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_adQssw5cSample 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
idlong required for (blacklists/id)
Unique identifier for the blacklist.
Codes
| Status Code | Description |
|---|---|
401 | You don't have permission to view this blacklist. |
404 | Blacklist not found. |
200 | Return 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_adQssw5cSample 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
idlong required
Unique identifier for the product.
Codes
| Status Code | Description |
|---|---|
401 | You don't have permission to delete this blacklist. |
404 | Product not found. |
204 | Blacklist 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