Erstellen Sie PBX #
Erstellt ein neues PbxConnectionProfile, das einem Kunden-Tenant zugewiesen wird.
POST /v1.0/customers/{CUSTOMER_TENANT_ID}/pbxs
Beispiel #
Diese Anfrage erstellt eine neue ~.pbx.kazoo.name.~ PbxConnectionProfile mit folgenden Details:
- Kunde: Im Kunden-Tenant mit der ID {CUSTOMER_TENANT_ID}
- Name: "Kunden ~.pbx.kazoo.name.~ Pbx"
- Moderator Ruhe: "https://rest.example.com"
- Host Websocket: "wss://ws.example.com"
- Konto-ID: "12345"
- API Schlüssel: "ABCDEF"
Anfrage #
POST <https://api.uk.myreports.cloud/api/v1.0/customers/{CUSTOMER_TENANT_ID}/pbxs> HTTP/1.1
Inhaltstyp: application/json
Akzeptanz-Gebühren: Wahr
Autorisierung: Inhaber {TOKEN}
Verbindung: am Leben bleiben
{
"name": "Kunden ~.pbx.kazoo.name.~ Pbx",
"hostRest": "<https://rest.example.com">,
"hostWebsocket": "wss://ws.example.com",
"accountId": "12345",
"apiKey": "ABCDEF",
"\_type": "KazooPbxConnectionProfile"
}Reaktion #
HTTP/1.1 201 erstellt
Inhaltstyp: application/json; charset=utf-8
Inhalt-Länge: xx
Standort: <https://api.uk.myreports.cloud/api/v1.0/customers/{CUSTOMER_TENANT_ID}/pbxs/{PBX_ID}>
{
"data": {
"hostRest": "<https://rest.example.com">,
"hostWebsocket": "wss://ws.example.com",
"accountId": "12345",
"apiKey": "ABCDEF",
"\_type": "KazooPbxConnectionProfile",
"id": "{PBX_ID}",
"name":" Kunden ~.pbx.kazoo.name.~ Pbx",
"tenantId": "{CUSTOMER_TENANT_ID}",
"countryCode": "US",
"aktiviert": falsch
},
"Status": "Erfolg",
"Zeitstempel": "2019-11-29T16:03:23.9251680Z"
}Beispiel #
Diese Anfrage erstellt eine neue 3CX PbxConnectionProfile mit folgenden Details:
Anfrage #
POST <https://api.uk.myreports.cloud/api/v1.0/customers/{CUSTOMER_TENANT_ID}/pbxs> HTTP/1.1
Inhaltstyp: application/json
Akzeptanz-Gebühren: Wahr
Autorisierung: Inhaber {TOKEN}
Verbindung: am Leben bleiben
{
"\_type": "ThreeCxConnectionProfile",
"name": "3CX Connection",
"licenseKey": "licenseKey-licenseKey-licenseKey",
"Benutzername": "Benutzername-Benutzername-Benutzername",
"Passwort": "Passwort Passwort Passwort",
"enableRecordingArchive": "true",
"recordingArchiveFrequency": "00:20:00"
}Reaktion #
HTTP/1.1 201 erstellt
Inhaltstyp: application/json; charset=utf-8
Inhalt-Länge: xx
Standort: <https://api.uk.myreports.cloud/api/v1.0/customers/{CUSTOMER_TENANT_ID}/pbxs/{PBX_ID}>
{
"data": {
"\_type": "ThreeCxConnectionProfile",
"name": "3CX Connection",
"licenseKey": "licenseKey-licenseKey-licenseKey",
"Benutzername": "Benutzername-Benutzername-Benutzername",
"Passwort": "Passwort Passwort Passwort",
"enableRecordingArchive": "true",
"recordingArchiveFrequency": "00:20:00"
},
"Status": "Erfolg",
"Zeitstempel": "2019-11-29T16:03:23.9251680Z"
}Fehler #
Unautorisiert #
Wenn der Token nicht bereitgestellt wird, ungültig oder abgelaufen ist
HTTP/1.1 401 UnautorisiertSchlechte Anfrage #
Wenn die angegebene Mieter-ID nicht im richtigen Format ist
HTTP/1.1 400 Bad Request
Datum: Do, 06. Feb 2020 12:45:27 GMT
Inhaltstyp: application/json; charset=utf-8
Inhalt-Länge: 149
{
"Fehler": 400,
"Nachricht": "Der Wert '<tenant id>'ist nicht gültig.",
"status": "fehler",
"Zeitstempel": "2020-02-06T12:45:27.5903465Z"
}Nicht gefunden #
Wenn es keine Kunden gibt, die eine passende Mieter-ID haben
HTTP/1.1 404 Nicht gefunden
Datum: Do, 06. Feb 2020 12:46:58 GMT
Inhaltstyp: application/json; charset=utf-8
Inhalt-Länge: 95
{
"error": 404,
"Nachricht": "Nicht gefunden",
"status": "fehler",
"Zeitstempel": "2020-02-06T12:46:58.7669535Z"
}