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
name
string required
Addon name.version
string required
Addon version.products
array required
Array of product ids.priority
int required
Priority of the addon.builtByBitResourceId
long BuiltByBit Integration
Resource ID of the built by Bit resource.mainClass
string Java ClassLoader
Main class of the addon.file
object Java ClassLoader
File object of the addon.file.id
long Java ClassLoader
File ID of the addon.file.name
string Java ClassLoader
File name of the addon.file.data
file 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_adQssw5c
Sample 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
id
long required
Unique identifier for the addon.name
string
Addon name.version
string
Addon version.products
array
Array of product ids.priority
int
Priority of the addon.builtByBitResourceId
long BuiltByBit Integration
Resource ID of the built by Bit resource.mainClass
string Java ClassLoader
Main class of the addon.file
object Java ClassLoader
File object of the addon.file.id
long Java ClassLoader
File ID of the addon.file.name
string Java ClassLoader
File name of the addon.file.data
file 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_adQssw5c
Sample 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
id
long required for (addons/id)
Unique identifier for the addon.name
string 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_adQssw5c
Sample 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
id
long 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