Addons
Our service allows you to manage your addons in other applications by using REST API.
Create
To create a addon you need to send a request to the REST API by following instructions.
Body parameters
namestring required
Addon name.versionstring required
Addon version.productsarray required
Array of product ids.priorityint required
Priority of the addon.builtByBitResourceIdlong BuiltByBit Integration
Resource ID of the built by Bit resource.mainClassstring Java ClassLoader
Main class of the addon.fileobject Java ClassLoader
File object of the addon.file.idlong Java ClassLoader
File ID of the addon.file.namestring Java ClassLoader
File name of the addon.file.datafile byte array as base64 Java ClassLoader
File data of the addon.
Codes
| Status Code | Description |
|---|---|
401 | You don't have permission to create addons. |
409 | Addon with thisn name already exists. |
423 | You don't have any plan assigned or you have reached the limit of addons. |
201 | Addon created successfully. |
Sample request
curl -X PUT https://api.mlicense.net/api/v1/addons \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {API_KEY}' \
-d '{
"name": "mLicense",
"version": "1.0.0",
"products": [1, 2],
"priority": 1
}'Sample token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cSample response
{
"id": 0,
"name": "string",
"version": "string",
"products": [1, 2],
"priority": 1,
"builtByBitResourceId": 0,
"mainClass": "string",
"binaryFileId": 0
}Update
To update a addon you need to send a request to the REST API by following instructions.
Body parameters
idlong required
Unique identifier for the addon.namestring
Addon name.versionstring
Addon version.productsarray
Array of product ids.priorityint
Priority of the addon.builtByBitResourceIdlong BuiltByBit Integration
Resource ID of the built by Bit resource.mainClassstring Java ClassLoader
Main class of the addon.fileobject Java ClassLoader
File object of the addon.file.idlong Java ClassLoader
File ID of the addon.file.namestring Java ClassLoader
File name of the addon.file.datafile byte array as base64 Java ClassLoader
File data of the addon.
Codes
| Status Code | Description |
|---|---|
401 | You don't have permission to create addons. |
404 | Addon not found. |
423 | You don't have any plan assigned or you have reached the limit of addons. |
201 | Addon updated successfully. |
Sample request
curl -X POST https://api.mlicense.net/api/v1/addons \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {API_KEY}' \
-d '{
"id": 1,
"priority": 2,
}'Sample token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cSample response
{
"id": 0,
"name": "string",
"version": "string",
"products": [1, 2],
"priority": 1,
"builtByBitResourceId": 0,
"mainClass": "string",
"binaryFileId": 0
}Get
To get a addon 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 (addons/id)
Unique identifier for the addon.namestring required for (addons/name)
Addon name.
Codes
| Status Code | Description |
|---|---|
401 | You don't have permission to view this addons. |
404 | Addon not found. |
200 | Return addon. |
Sample request for ALL
curl -X GET https://api.mlicense.net/api/v1/addons/all \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {API_KEY}'Sample request for ID
curl -X GET https://api.mlicense.net/api/v1/addons/id?id=ADDON_ID \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {API_KEY}'Sample request for NAME
curl -X GET https://api.mlicense.net/api/v1/addons/name?name=ADDON_NAME \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {API_KEY}'Sample token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5cSample response
{
"id": 0,
"name": "string",
"version": "string",
"products": [1, 2],
"priority": 1,
"builtByBitResourceId": 0,
"mainClass": "string",
"binaryFileId": 0
}Delete
To delete an addon you need to send a request to the REST API by following instructions.
Request parameter
idlong required
Unique identifier for the addon.
Codes
| Status Code | Description |
|---|---|
401 | You don't have permission to delete this addons. |
404 | Addon not found. |
204 | Addon successfully deleted. |
Sample request
curl -X DELETE https://api.mlicense.net/api/v1/addons?id=ADDON_ID \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: {API_KEY}'Sample token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c