POST
/api/v1/license/bitninja/{vm_id}/node/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/license/bitninja/{vm_id}/node/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/license/bitninja/{vm_id}/node/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/license/bitninja/{vm_id}/node/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({}),});console.log(await response.json());Buys a BitNinja security license for a node — the Node Security tab’s Buy action, shown when the node has no active license.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”vm_id
required
string
Path parameter vm_id.
Query Parameters
Section titled “Query Parameters”project_id
required
integer
Identifier of the project to scope the request to. Required integer project ID.
Example
<PROJECT_ID>apikey
required
string
API key used to authenticate the Activate Bitninja request
Example
<API_KEY>location
required
string
Specifies the target location for the activation request.
Example
<LOCATION>Request Body
Section titled “Request Body”Media typeapplication/json
object
Example generated
{}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
code
HTTP status code of the activation response
integer
data
object
command_to_execute
Shell command to execute for activating Bitninja
string
errors
object
message
Status message indicating the result of the activation request
string
Example
{ "code": 200, "data": { "command_to_execute": "curl https://get.bitninja.io/install.sh | /bin/bash -s - --license_key=RSK__216_48_190_175__XUN9DS1FBLKEPIL7OBXR0HOPWYJTCNE4" }, "message": "Success"}