Download OpenAPI specification:Download
This guide describes list of API services that are provided by OT Rainbow search portal system. Services are used to manage OT Rainbow searches.
REST interface is used for sending/receiving OT rainbow API messages.
HTTP request GET and POST are used. Standard HTTP responses are used to provide requested information or error status. There is no session notion in OT Rainbow system, so requests could be issued according stateless model, without transport conservation between them.
JSON is used as a main format for data encoding in message body part. Each request is started with the following pattern /{module}/{version}/ where {module} is a portal module name to address and {version} is a version of used API, par example, “v1.0”.
Each request should contain some credential information to authenticate itself. Standard HTTP authentication with basic/bearer modes is used. JSON Web Token mechanism is used to provide authentication information. JWT has a expire timeout that is controlled by OT Rainbow portal to prevent very long token usage. Also authentication with application token is used. The token must be provided in the request HTTP header, using a custom header: APIKey. At server side, token is verified, and if it doesn’t match, 403 Not Allowed response is sent. TLS is used as a transport protocol to support message exchanges between OT Rainbow portal and an application.
For accessing the API a valid JWT token or a valid OAuth access token must be passed in all the queries in the 'Authorization' header.
Security Scheme Type | API Key |
---|---|
Header parameter name: | Authorization |
This API checks a CSV UTF-8 content for mass-provisioning. Caution: To use the comment character ('%' by default) in a field value, surround this value with double quotes.
{- "data": {
- "reqId": "af013f8cb6128d4636823c8ced4f4be9fe3dcde5cbe681ddfe3a3dcda86038c7",
- "mode": "device",
- "actions": {
- "attach": 1,
- "force_attach": 1,
- "detach": 1
}, - "columns": 6,
- "delimiter": ";"
}
}
This API checks a CSV UTF-8 content for mass-provisioning for useranddevice mode. Caution: To use the comment character ('%' by default) in a field value, surround this value with double quotes.
<message id="8413b42e-563c-4437-9a53-06f638b5ab69_0" type="management"
from="pcloud_enduser_1@openrainbow.com/172440802160413612281463752830017532"
to="5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com"
xmlns="jabber:client">
<command_ended commandId="xyz" xmlns="jabber:iq:configuration"/>
</message>
{- "data": {
- "reqId": "af013f8cb6128d4636823c8ced4f4be9fe3dcde5cbe681ddfe3a3dcda8603845",
- "mode": "user",
- "actions": {
- "sync": 0,
- "upsert": 0,
- "delete": 1,
- "detach": 0
}, - "columns": 10,
- "delimiter": ";",
- "profiles": [
- {
- "name": "InvalidLicense",
- "valid": false
}, - {
- "name": "Enterprise Demo",
- "valid": true,
- "assignedBefore": 3,
- "assignedAfter": 3
}, - {
- "name": "Business Demo",
- "valid": true,
- "assignedBefore": 1,
- "assignedAfter": 2,
- "max": 10
}
]
}
}
This API allows to delete the report of an import identified by its reqId.
reqId required | string the import request id |
{- "data": {
- "reqId": "7d3d56ab5cc1d1d819f4854f3314e3bc69f1a020de9788153af100fd18219b0c",
- "status": "Deleted"
}
}
This API allows to access the report of an import identified by its reqId.
reqId required | string the import request id |
format | string Default: "full" Enum: "small" "full" Allows to retrieve more or less report details.
|
accept required | string application/json |
{- "data": {
- "reqId": "049d2d44ea6edc90db64bbe2453a8cd38afa58ee83b519b18afa0b54095fd90e",
- "status": "Terminated",
- "report": {
- "lupin01@ejo.company.com": {
- "status": "succeeded",
- "action": "upsert",
- "_user": "create",
- "userId": "60338c5edade211e79c14f59",
- "profiles": {
- "Enterprise Demo": true,
- "Voice Enterprise 3-Year prepaid": true
}, - "_subscriber": "attach",
- "subscriberReport": {
- "action": "attach",
- "userId": "60338c5edade211e79c14f59",
- "shortNumber": "81011",
- "companyId": "5ccbef76399f03bc106f9a80",
- "pbxId": "PBX4954-92a6-15e4-486e-a158-2734-da92-157e",
- "systemId": "5de6a632c21aa17bab337347",
- "origin": {
- "shortNumber": "81011",
- "state": "unassigned"
}, - "status": "done"
}
}, - "lupin02@ejo.company.com": {
- "status": "succeeded",
- "action": "upsert",
- "_user": "create",
- "userId": "60338c5ddade211e79c14f57",
- "profiles": {
- "Enterprise Demo": true,
- "Voice Enterprise 3-Year prepaid": true
}, - "_subscriber": "attach",
- "subscriberReport": {
- "action": "attach",
- "userId": "60338c5ddade211e79c14f57",
- "shortNumber": "81012",
- "companyId": "5ccbef76399f03bc106f9a80",
- "pbxId": "PBX4954-92a6-15e4-486e-a158-2734-da92-157e",
- "systemId": "5de6a632c21aa17bab337347",
- "origin": {
- "shortNumber": "81012",
- "state": "unassigned"
}, - "status": "done"
}, - "_sipDevice": "attach",
- "sipDeviceReport": {
- "action": "attach",
- "userId": "60338c5ddade211e79c14f57",
- "companyId": "5ccbef76399f03bc106f9a80",
- "macAddress": "aabbccddee02",
- "deviceTypeId": 3,
- "origin": {
- "macAddress": "aabbccddee02",
- "state": "unassigned"
}, - "status": "done"
}
}, - "lupin05@ejo.company.com": {
- "status": "failed",
- "action": "upsert",
- "_user": "create",
- "userId": "60338c60dade211e79c14f85",
- "profiles": {
- "Enterprise Demo": true,
- "Voice Enterprise 3-Year prepaid": true
}, - "_sipDevice": "attach",
- "sipDeviceReport": {
- "action": "attach",
- "userId": "60338c60dade211e79c14f85",
- "companyId": "5ccbef76399f03bc106f9a80",
- "macAddress": "aabbccddee05",
- "deviceTypeId": 9,
- "origin": {
- "macAddress": "aabbccddee05",
- "state": "unassigned"
}, - "status": "failed",
- "error": {
- "code": 2011,
- "message": "cannot assign a Sip device to this user 60338c60dade211e79c14f85 ; he is not yet a subscriber"
}
}, - "line": 7
}, - "lupin00@ejo.company.com": {
- "status": "succeeded",
- "action": "upsert",
- "_user": "create",
- "userId": "60338c5ddade211e79c14f52",
- "profiles": {
- "Enterprise Demo": true,
- "Voice Enterprise 3-Year prepaid": true
}
}, - "lupin03@ejo.company.com": {
- "status": "succeeded",
- "action": "upsert",
- "_user": "create",
- "userId": "60338c5ddade211e79c14f54",
- "profiles": {
- "Enterprise Demo": true,
- "Voice Enterprise 3-Year prepaid": true
}, - "_subscriber": "attach",
- "subscriberReport": {
- "action": "attach",
- "userId": "60338c5ddade211e79c14f54",
- "shortNumber": "81013",
- "companyId": "5ccbef76399f03bc106f9a80",
- "pbxId": "PBX4954-92a6-15e4-486e-a158-2734-da92-157e",
- "systemId": "5de6a632c21aa17bab337347",
- "origin": {
- "shortNumber": "81013",
- "state": "unassigned"
}, - "status": "done"
}, - "_ddi": "attach",
- "ddiReport": {
- "action": "attach",
- "userId": "60338c5ddade211e79c14f54",
- "companyId": "5ccbef76399f03bc106f9a80",
- "ddiE164Number": "33298300503",
- "ddiPhoneNumberId": "602eba96649cdf496b2e9b6e",
- "systemId": "5de6a632c21aa17bab337347",
- "origin": {
- "ddiE164Number": "+33298300503",
- "state": "unassigned"
}, - "status": "done"
}
}, - "lupin04@ejo.company.com": {
- "status": "succeeded",
- "action": "upsert",
- "_user": "create",
- "userId": "60338c5ddade211e79c14f50",
- "profiles": {
- "Enterprise Demo": true,
- "Voice Enterprise 3-Year prepaid": true
}, - "_subscriber": "attach",
- "subscriberReport": {
- "action": "attach",
- "userId": "60338c5ddade211e79c14f50",
- "shortNumber": "81014",
- "companyId": "5ccbef76399f03bc106f9a80",
- "pbxId": "PBX4954-92a6-15e4-486e-a158-2734-da92-157e",
- "systemId": "5de6a632c21aa17bab337347",
- "origin": {
- "shortNumber": "81014",
- "state": "unassigned"
}, - "status": "done"
}, - "_sipDevice": "attach",
- "sipDeviceReport": {
- "action": "attach",
- "userId": "60338c5ddade211e79c14f50",
- "companyId": "5ccbef76399f03bc106f9a80",
- "macAddress": "aabbccddee04",
- "deviceTypeId": 7,
- "origin": {
- "macAddress": "aabbccddee04",
- "state": "unassigned"
}, - "status": "done"
}, - "_ddi": "attach",
- "ddiReport": {
- "action": "attach",
- "userId": "60338c5ddade211e79c14f50",
- "companyId": "5ccbef76399f03bc106f9a80",
- "ddiE164Number": "33298300504",
- "ddiPhoneNumberId": "602eba96649cdf496b2e9b71",
- "systemId": "5de6a632c21aa17bab337347",
- "origin": {
- "ddiE164Number": "+33298300504",
- "state": "unassigned"
}, - "status": "done"
}
}
}, - "counters": {
- "succeeded": 5,
- "failed": 1,
- "warnings": 0,
- "total": 6
}, - "failingLines": [
- "upsert;lupin05@ejo.company.com;;aa:bb:cc:dd:ee:05;33298300505;Password_123;Mr;Arsene05;Lupin;fr;Enterprise Demo;Voice Enterprise 3-Year prepaid"
], - "startTime": "2021-02-22T10:49:48.249Z",
- "mode": "rainbowvoice",
- "userId": "5cd13616d9736d8431b5c15e",
- "displayName": "Philip Mortimer",
- "companyId": "5ccbef76399f03bc106f9a80",
- "endTime": "2021-02-22T10:50:06.141Z",
- "label": ""
}
}
This API retrieves the last checks CSV UTF-8 content for mass-provisioning for useranddevice mode, performed by an admin (using a commandId).
commandId required | string commandId used in the check csv request which came from connector on behalf of admin command |
accept required | string application/json |
{- "status": "success",
- "report": {
- "reqId": "af013f8cb6128d4636823c8ced4f4be9fe3dcde5cbe681ddfe3a3dcda8603845",
- "mode": "user",
- "actions": {
- "sync": 0,
- "upsert": 0,
- "delete": 1,
- "detach": 0
}, - "columns": 10,
- "delimiter": ";",
- "profiles": [
- {
- "name": "InvalidLicense",
- "valid": false
}, - {
- "name": "Enterprise Demo",
- "valid": true,
- "assignedBefore": 3,
- "assignedAfter": 3
}, - {
- "name": "Business Demo",
- "valid": true,
- "assignedBefore": 1,
- "assignedAfter": 2,
- "max": 10
}
]
}
}
This API provides information on all imports of the administrator's company.
companyId required | string companyId to list imports of |
{- "data": [
- {
- "reqId": "fa1bf763cc52bd131e70c0e6696af88ff777ea82bdc032e44cb23a80a81498e7",
- "status": "Terminated",
- "userId": "598961a9558463457017d76c",
- "displayName": "Admin MyCompany",
- "label": "mon import",
- "mode": "user",
- "startTime": "2017-09-01T10:15:09.076Z",
- "endTime": "2017-09-01T10:15:09.164Z",
- "counters": {
- "succeeded": 1,
- "failed": 0,
- "warnings": 0,
- "total": 1
}
}, - {
- "reqId": "DC1bf763cc52bd131e70c0e6696af88ff777ea82bdc032e44cb23a8643238e7",
- "status": "Terminated",
- "displayName": "Other Admin MyCompany",
- "userId": "598961a9558463457015433",
- "label": "Customer Care import",
- "mode": "user",
- "startTime": "2017-09-01T11:15:09.076Z",
- "endTime": "2017-09-01T11:15:09.164Z",
- "counters": {
- "succeeded": 3,
- "failed": 1,
- "warnings": 2,
- "total": 4
}
}
]
}
This API allows to manage Rainbow users or devices through a CSV UTF-8 encoded file.
The first line of the CSV data describes the content format.
Most of the field names are the field names of the admin createUser API.
Caution: To avoid multiple imports of same CSV data, the reqId returned to access the import status is a hash of the CSV data. If you really need to apply same CSV data again, you will have to delete its associated import report first.
Supported fields for "user" management are:
Supported fields for "device" management are:
Caution: To use the comment character ('%' by default) in a field value, surround this value with double quotes.
Error codes
{- "data": {
- "reqId": "fa1bf763cc52bd131e70c0e6696af88ff777ea82bdc032e44cb23a80a81498e7",
- "status": "Pending",
- "label": "mon import",
- "mode": "user",
- "displayName": "Admin MyCompany",
- "userId": "598961a9558463457017d76c",
- "startTime": "2017-09-01T12:17:44.439Z"
}
}
This API retrieves the last import CSV UTF-8 content for mass-provisioning for useranddevice mode, performed by an admin (using a commandId).
commandId required | string commandId used in the import csv request which came from connector on behalf of admin command |
accept required | string application/json |
{- "status": "success",
- "report": {
- "reqId": "fa1bf763cc52bd131e70c0e6696af88ff777ea82bdc032e44cb23a80a81498e7",
- "status": "Terminated",
- "userId": "598961a9558463457017d76c",
- "displayName": "Admin MyCompany",
- "label": "mon import",
- "mode": "user",
- "startTime": "2017-09-01T10:15:09.076Z",
- "endTime": "2017-09-01T10:15:09.164Z"
}
}
This API allows to create a report for a commandId in case no other API is called (no action to be performed, error, ...).
commandId required | string commandId used in the import csv request which came from connector on behalf of admin command |
details required | string details that can be provided about the command execution |
status required | string Enum: "success" "failure" status for the execution of the command |
{- "details": "string",
- "status": "success"
}
{- "status": "success",
- "report": {
- "details": "no update since last synchronisation"
}
}
This API allows to synchronize Rainbow users or devices through a CSV UTF-8 encoded file. it is a merge from user mode and device mode
The first line of the CSV data describes the content format.
Most of the field names are the field names of the admin createUser API.
Supported fields for "user" management are:
Supported fields for "device" management are:
detach: allows to detach an PBX extension from a user. delete: allows to delete a user. upsert: allows to modify user (update or create if doesn't exists) and device (force attach if filled) with filled fields. Remark: empty fields are not taken into account. sync: allows to modify user (update or create if doesn't exists) and device (force attach if filled, detach if empty) with filled fields. Remark: empty fields are taken into account (if a field is empty we will try to update it with empty value).
Caution: To use the comment character ('%' by default) in a field value, surround this value with double quotes. Caution: for sync action:
Error codes
<message id="8413b42e-563c-4437-9a53-06f638b5ab69_0" type="management"
from="pcloud_enduser_1@openrainbow.com/172440802160413612281463752830017532"
to="5abb735b2d3c4e50adde276c50ec489c@@openrainbow.com"
xmlns="jabber:client">
<command_ended commandId="xyz" xmlns="jabber:iq:configuration"/>
</message>
{- "data": {
- "reqId": "fa1bf763cc52bd131e70c0e6696af88ff777ea82bdc032e44cb23a80a81498e7",
- "status": "Pending",
- "label": "mon import",
- "mode": "user and device",
- "displayName": "Admin MyCompany",
- "userId": "598961a9558463457017d76c",
- "startTime": "2017-09-01T12:17:44.439Z"
}
}
This API provides a CSV template.
companyId | string companyId to generate a template for, default to admin's companyId |
mode | string Default: "user" Enum: "user" "device" "useranddevice" "rainbowvoice" Select template to return.
|
comment | string Default: "false" Only the template comment. |
accept required | string application/json |
{- "Content-Type": "text/csv",
- "Content-disposition": "string",
- "CSV": [
- {
- "__action__": "create",
- "businessPhone0": "string",
- "country": "string",
- "customSipHeader_1": "string",
- "customSipHeader_2": "string",
- "ddiE164Number": "string",
- "department": "string",
- "email0": "string",
- "firstName": "string",
- "jobTitle": "string",
- "language": "string",
- "lastName": "string",
- "loginEmail": "string",
- "macAddress": "string",
- "mobilePhone0": "string",
- "nickName": "string",
- "password": "string",
- "pbxInternalNumber": "string",
- "pbxShortNumber": 0,
- "selectedAppCustomisationTemplateName": "Full",
- "shortNumber": "string",
- "timezone": "string",
- "title": "string"
}
]
}