NAV
PrimeXM DMCC
bash php python

Introduction

Our HTTP REST API allows you to manage vital details of your account and services in client portal. JSON is used for all API returns

Use left menu to browse trough available methods, use right menu to check required parameters, data to post and code samples in various languages.

Swagger Doc: You can download or display the JSON to generate documentation in Swagger.

Authentication

JSON Web Token Authentication

curl 'https://hosting.primexm.com/api/login' \
    -d username="username"\
    -d password="password"

# grab authentication token from the response and pass it in Authorization header
curl 'https://hosting.primexm.com/api/details' \
    -H "Authorization: Bearer $token"
$resp = $client->post('login', [
    'form_params' => [
        'username' => 'username',
        'password' => 'password'
    ]
]);

$token = $resp->json()['token'];

$resp = $client->get('details', [
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

echo $resp->getBody();
payload = username
resp = requests.post('https://hosting.primexm.com/api/login', data=payload)

headers = {
    'Authorization': 'Bearer ' + req.json().token
}
resp = requests.get('https://hosting.primexm.com/api/details', headers=headers)
print(resp)

Make sure to replace username and password with your client area details.

To authenticate, you need to send a JSON Web Token (JWT) in the authorization header of the HTTP request.

To obtain the authorization token you need to submit a request with your username and password to POST https://hosting.primexm.com/api/login API method

All API calls that require authentication expect HTTP header in the form of Authorization: Bearer <token>.

For example:
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc...

Clientarea

Login

Generate new authorization token

POST_DATA="{
    \"username\": \"user@example.com\",
    \"password\": \"secret\"
}"

curl -X POST "https://hosting.primexm.com/api/login" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
]);

$options = [
    'json' => [
        "username" => "user@example.com",
        "password" => "secret"
    ]
]
$resp = $client->post('login', $options);
echo $resp->getBody();
payload = {
    'username': "user@example.com",
    'password': "secret"
}


req = requests.post('https://hosting.primexm.com/api/login', json=payload)
print(req.json())
Example Response:
{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRw(...)5lZ9T79ft9uwOkqRRmIBbtR51_w",
    "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzMD(...)ChwIAb3zvxBu6kvULa2AwAt9U-I"
}

HTTP Request

POST /login

Query Parameters

Parameter Type Description
username string

Your acount email address

password string

Account password

Logout

Invalidate authorization token


curl -X POST "https://hosting.primexm.com/api/logout" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->post('logout');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://hosting.primexm.com/api/logout', headers=headers)
print(req.json())
Example Response:
{
    "status": true
}

HTTP Request

POST /logout

Refresh Token

Generate new authorization token using refresh token

POST_DATA="{
    \"refresh_token\": \"refresh_tokenValue\"
}"

curl -X POST "https://hosting.primexm.com/api/token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
]);

$options = [
    'json' => [
        "refresh_token" => "refresh_tokenValue"
    ]
]
$resp = $client->post('token', $options);
echo $resp->getBody();
payload = {
    'refresh_token': "refresh_tokenValue"
}


req = requests.post('https://hosting.primexm.com/api/token', json=payload)
print(req.json())
Example Response:
{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHR(...)vY2xlYiHGvauCWZD9B0VwXgHEzXDllqY",
    "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJBQ(...)Rmivc_u3YA_kgDqOPtUuGNXOzueXYtZw"
}

HTTP Request

POST /token

Query Parameters

Parameter Type Description
refresh_token string

Refresh token previously obtained from POST /login

Revoke Token

Invalidate authorization and refresh token. Pass refresh token or call this method with valid access token

POST_DATA="{
    \"refresh_token\": \"refresh_tokenValue\"
}"

curl -X POST "https://hosting.primexm.com/api/revoke" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
]);

$options = [
    'json' => [
        "refresh_token" => "refresh_tokenValue"
    ]
]
$resp = $client->post('revoke', $options);
echo $resp->getBody();
payload = {
    'refresh_token': "refresh_tokenValue"
}


req = requests.post('https://hosting.primexm.com/api/revoke', json=payload)
print(req.json())
Example Response:
{
    "status": true
}

HTTP Request

POST /revoke

Query Parameters

Parameter Type Description
refresh_token string

User Logs

Returns logs from history


curl -X GET "https://hosting.primexm.com/api/logs" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('logs');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/logs', headers=headers)
print(req.json())

HTTP Request

GET /logs

Returns a list of all statuses with specific status


curl -X GET "https://hosting.primexm.com/api/statuses" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('statuses');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/statuses', headers=headers)
print(req.json())

HTTP Request

GET /statuses

Query Parameters

Parameter Type Description
status string

Returns details of status


curl -X PUT "https://hosting.primexm.com/api/statuses/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->put('statuses/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.put('https://hosting.primexm.com/api/statuses/@id', headers=headers)
print(req.json())

HTTP Request

PUT /statuses/@id

Query Parameters

Parameter Type Description
id int

Billing

Account balance

Get current account balance(unpaid invoices total), account credit


curl -X GET "https://hosting.primexm.com/api/balance" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('balance');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/balance', headers=headers)
print(req.json())
Example Response:
{
    {
        "success": true,
        "details": {
            "currency": "USD",
            "acc_balance": "123456.55",
            "acc_credit": "0.00"
        }
    }
}

HTTP Request

GET /balance

List Invoices

List all invoices under my account


curl -X GET "https://hosting.primexm.com/api/invoice" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('invoice');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/invoice', headers=headers)
print(req.json())
Example Response:
{
    "invoices": [
        {
            "id": "308976",
            "date": "2016-12-30",
            "dateorig": "2016-12-30",
            "duedate": "2017-01-06",
            "paybefore": "2017-01-06",
            "total": "19.65",
            "datepaid": "2016-12-30 12:40:47",
            "status": "Paid",
            "merge_id": null,
            "number": "2016\/12\/1",
            "currency": "USD"
        }
    ]
}

HTTP Request

GET /invoice

Invoice Details

Get invoice details


curl -X GET "https://hosting.primexm.com/api/invoice/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('invoice/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/invoice/@id', headers=headers)
print(req.json())
Example Response:
{
    "invoice": {
        "id": "308976",
        "status": "Paid",
        "date": "2016-12-30",
        "duedate": "2017-01-06",
        "paybefore": "2017-01-06",
        "datepaid": "2016-12-30 12:40:47",
        "subtotal": 16.24,
        "credit": 0,
        "tax": 3.41,
        "taxrate": 21,
        "tax2": 0,
        "taxrate2": 0,
        "taxexempt": "0",
        "total": 19.65,
        "rate": 1,
        "rate2": 0,
        "rate3": 1,
        "notes": "",
        "items": [
            {
                "id": "12305",
                "invoice_id": "308976",
                "type": "Other",
                "item_id": "0",
                "description": "Example Service",
                "amount": "15.00",
                "taxed": "1",
                "qty": "1.00",
                "linetotal": "15.00"
            },
            {
                "id": "12309",
                "invoice_id": "308976",
                "type": "Other",
                "item_id": "-2",
                "description": "PayPal Payment Fee",
                "amount": "1.24",
                "taxed": "1",
                "qty": "1.00",
                "linetotal": "1.24"
            }
        ],
        "client": {
            "id": "26",
            "email": "api@example.com",
            "firstname": "Joe",
            "lastname": "Doe",
            "companyname": "",
            "address1": "Pretty View Lane",
            "address2": "3194",
            "city": "Santa Rosa",
            "state": "California",
            "postcode": "95401",
            "country": "US",
            "phonenumber": "+1.24123123"
        },
        "number": "2016\/12\/1",
        "currency": "USD"
    }
}

HTTP Request

GET /invoice/@id

Get Add Funds Information

Get add funds configuration: minimum and maximum deposit amounts and available payment gateways


curl -X GET "https://hosting.primexm.com/api/addfunds" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('addfunds');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/addfunds', headers=headers)
print(req.json())
Example Response:
{
 "min_amount": 10.00,
 "max_amount": 1000.00,
 "gateways": [
   {"id": 1, "name": "Bank Transfer"},
   {"id": 2, "name": "PayPal"}
 ]
}

HTTP Request

GET /addfunds

Add Funds

Generate add funds invoice

POST_DATA="{
    \"amount\": \"100.00\",
    \"gateway\": \"gatewayValue\"
}"

curl -X POST "https://hosting.primexm.com/api/addfunds" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "amount" => "100.00",
        "gateway" => "gatewayValue"
    ]
]
$resp = $client->post('addfunds', $options);
echo $resp->getBody();
payload = {
    'amount': "100.00",
    'gateway': "gatewayValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://hosting.primexm.com/api/addfunds', json=payload, headers=headers)
print(req.json())
Example Response:
{
 "success": true,
 "invoice_id": 123
}

HTTP Request

POST /addfunds

Query Parameters

Parameter Type Description
amount number

Amount to add to account

gateway number

Payment gateway ID, use GET /addfunds to list available gateways

Invoice PDF

Get specific invoice PDF as base64 string


curl -X GET "https://hosting.primexm.com/api/invoice/@id/pdf" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('invoice/@id/pdf');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/invoice/@id/pdf', headers=headers)
print(req.json())

HTTP Request

GET /invoice/@id/pdf

Domains

Get registered nameservers

List registered private/glue nameservers for a domain. Note: Not all domain registrar modules support returning registered nameservers. If the module does not support this feature, an empty list may be returned.


curl -X GET "https://hosting.primexm.com/api/domain/@id/reg" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('domain/@id/reg');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/domain/@id/reg', headers=headers)
print(req.json())

HTTP Request

GET /domain/@id/reg

Query Parameters

Parameter Type Description
id int

Domain id

SSL Certificates

Certificate details

Return details for certificate @service_id


curl -X GET "https://hosting.primexm.com/api/certificate/@service_id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('certificate/@service_id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/certificate/@service_id', headers=headers)
print(req.json())
Example Response:
{
    "service": {
        "id": "300",
        "date_created": "2016-12-30",
        "domain": "examplename.com",
        "firstpayment": "27.85",
        "total": "27.85",
        "billingcycle": "Annually",
        "next_due": "2017-12-30",
        "next_invoice": "2017-10-31",
        "status": "Pending",
        "label": "",
        "name": "Comodo InstantSSL",
        "cert_status": "",
        "cert_expires": "2017-12-30 13:43:12",
        "csr": "-----BEGIN CERTIFICATE REQUEST----- ...",
        "contacts": {
            "admin": {
                "FName": "Mary",
                "LName": "Sue",
                "City": "Santa Rosa",
                "State": "California",
                "PostalCode": "95401",
                "EmailAddress": "mary@example.com",
                "Country": "US",
                "Address1": "Pretty View Lane",
                "Address2": "3194",
                "Phone": 24123223,
                "OrgName": "n\/a",
                "PreFix": 1,
                "JobTitle": "n\/a"
            },
            "billing": {
                (...)
            },
            "tech": {
                (...)
            }
        },
        "organization": {
            "state": "Texas",
            "country": "US",
            "name": "My Org name",
            "unit": "Dev",
            "locality": "SanAntonio",
            "postalcode": "n\/a",
            "address2": "n\/a",
            "address1": "n\/a",
        },
        "cert_email": "admin@example.com",
        "software": "1"
    }
}

HTTP Request

GET /certificate/@service_id

Query Parameters

Parameter Type Description
service_id int

Service id

Download certificate

Return X.509 certificate data


curl -X GET "https://hosting.primexm.com/api/certificate/@service_id/crt" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('certificate/@service_id/crt');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/certificate/@service_id/crt', headers=headers)
print(req.json())

HTTP Request

GET /certificate/@service_id/crt

Query Parameters

Parameter Type Description
service_id int

Service id

Services

List services

List all services under your account


curl -X GET "https://hosting.primexm.com/api/service" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('service');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/service', headers=headers)
print(req.json())
Example Response:
{
    "services": [
        {
            "id": "301",
            "domain": "examplename.com",
            "total": "9.99",
            "status": "Pending",
            "billingcycle": "Monthly",
            "next_due": "2017-12-30",
            "category": "Hosting",
            "category_url": "hosting",
            "name": "Starter Hosting"
        }
    ]
}

HTTP Request

GET /service

Service details

Return details for service @id


curl -X GET "https://hosting.primexm.com/api/service/@id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('service/@id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/service/@id', headers=headers)
print(req.json())
Example Response:
{
    "service": {
        "id": "301",
        "date_created": "2016-12-30",
        "domain": "examplename.com",
        "firstpayment": "9.99",
        "total": "9.99",
        "billingcycle": "Monthly",
        "next_due": "2017-12-30",
        "next_invoice": "2017-01-27",
        "status": "Active",
        "label": "",
        "username": "examplen",
        "password": "pdtzc",
        "name": "Starter Hosting"
    }
}

HTTP Request

GET /service/@id

Query Parameters

Parameter Type Description
id int

Service id

Manual Service Renew

Generate an invoice to renew the service.

POST_DATA="{
    \"id\": \"idValue\"
}"

curl -X POST "https://hosting.primexm.com/api/service/@id/renew" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "id" => "idValue"
    ]
]
$resp = $client->post('service/@id/renew', $options);
echo $resp->getBody();
payload = {
    'id': "idValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://hosting.primexm.com/api/service/@id/renew', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "status": true,
    "invoice_id": "504426",
    "info": [
        "manualrenew_ok"
    ]
}

HTTP Request

POST /service/@id/renew

Query Parameters

Parameter Type Description
id int

Service id

List Billing Cycle

Get recurring billing cycle options


curl -X GET "https://hosting.primexm.com/api/service/@id/cycle" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('service/@id/cycle');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/service/@id/cycle', headers=headers)
print(req.json())
Example Response:
{
    "current": "m",
    "cycles": {
        "m": "14.95",
        "a": "179.40",
        "b": "358.80"
    }
}

HTTP Request

GET /service/@id/cycle

Query Parameters

Parameter Type Description
id int

Service id

Change Billing Cycle

Change recurring billing cycle for the service

POST_DATA="{
    \"id\": \"idValue\",
    \"cycle\": \"cycleValue\"
}"

curl -X POST "https://hosting.primexm.com/api/service/@id/cycle" \
   -H "Authorization: Bearer $token" \
   -H "Content-Type: application/json" \
   -d "${POST_DATA}"
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);

$options = [
    'json' => [
        "id" => "idValue",
        "cycle" => "cycleValue"
    ]
]
$resp = $client->post('service/@id/cycle', $options);
echo $resp->getBody();
payload = {
    'id': "idValue",
    'cycle': "cycleValue"
}

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.post('https://hosting.primexm.com/api/service/@id/cycle', json=payload, headers=headers)
print(req.json())
Example Response:
{
    "success": true,
    "info": [
        "changebillingcycle_ok"
    ]
}

HTTP Request

POST /service/@id/cycle

Query Parameters

Parameter Type Description
id int

Service id

cycle string

New billing cycle

Support

List News

List News


curl -X GET "https://hosting.primexm.com/api/news" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('news');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/news', headers=headers)
print(req.json())

HTTP Request

GET /news

Get news item

Returns details of the news item


curl -X GET "https://hosting.primexm.com/api/news/@news_id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('news/@news_id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/news/@news_id', headers=headers)
print(req.json())

HTTP Request

GET /news/@news_id

List all knowledgebase categories

Returns list all knowledgebase categories


curl -X GET "https://hosting.primexm.com/api/knowledgebase" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('knowledgebase');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/knowledgebase', headers=headers)
print(req.json())

HTTP Request

GET /knowledgebase

Get knowledgebase category details

Returns subcategories and articles of the knowledgebase category


curl -X GET "https://hosting.primexm.com/api/knowledgebase/@category_id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('knowledgebase/@category_id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/knowledgebase/@category_id', headers=headers)
print(req.json())

HTTP Request

GET /knowledgebase/@category_id

Get knowledgebase article

Returns an article details


curl -X GET "https://hosting.primexm.com/api/knowledgebase/article/@article_id" \
   -H "Authorization: Bearer $token" 
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://hosting.primexm.com/api/',
    'headers' => [
        'Authorization' => 'Bearer ' . $token
    ]
]);


$resp = $client->get('knowledgebase/article/@article_id');
echo $resp->getBody();

headers = {
    'Authorization': 'Bearer ' + token
}

req = requests.get('https://hosting.primexm.com/api/knowledgebase/article/@article_id', headers=headers)
print(req.json())

HTTP Request

GET /knowledgebase/article/@article_id