Get PBX Instance

Get PBX PBX Instance #

This endpoint is used to check if the target PBX is already associated with a customer tenant somewhere on the system.

GET /v1.0/pbxs?instanceId={PBX_INSTANCE_ID}

Depending on the Pbx type, the following values need to be passed as the {PBX_Instance_ID}:

  • ~.pbx.kazoo.name.~ => ~.pbx.kazoo.name.~ Account Id
  • Teams => Microsoft Tenant Id
  • 3CX => 3CX License Key

Example #

This request will get the specific PbxConnectionProfiles within the Customer tenant.

Request #

GET https://api.na.myreports.cloud/api/v1.0/pbxs?instanceId={PBX_INSTANCE_ID} HTTP/1.1
Authorization: Bearer {TOKEN}

Response (Exists) #

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: xx
{
	"data": {
        "exists": true,
        "instanceId": "{PBX_INSTANCE_ID}",
        "id": "{PBX_ID}",
        "tenantId": "{CUSTOMER_TENANT_ID}"
    },
    "status": "success",
    "timestamp": "2025-02-20T14:57:51.2818600Z"
}

Response (Doesn't Exist) #

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: xx
{
	"data": {
        "exists": false,
        "instanceId": "{PBX_INSTANCE_ID}"
    },
    "status": "success",
    "timestamp": "2025-02-20T14:57:51.2818600Z"
}

Errors #

Unauthorized #

When the token is not provided, invalid or expired

HTTP/1.1 401 Unauthorized

Bad Request #

When the provided tenant id is not in the correct format

HTTP/1.1 400 Bad Request
Date: Thu, 06 Feb 2020 12:45:27 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 149
{
	"error":400,
	"message":"The value '<tenant id>' is not valid.",
	"status":"error",
	"timestamp":"2020-02-06T12:45:27.5903465Z"
}

Not Found #

When there are no Customers that have a matching tenant id or Users with the user Id

HTTP/1.1 404 Not Found
Date: Thu, 06 Feb 2020 12:46:58 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 95
{
	"error":404,
	"message":"Not Found",
	"status":"error",
	"timestamp":"2020-02-06T12:46:58.7669535Z"
}