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 can be passed in the 'Authorization' header.
Bearer xxxxxx.yyyyyyy.zzzzzzBearer xxxxxx.yyyyyyy.zzzzzz| Security Scheme Type | API Key |
|---|---|
| Header parameter name: | Authorization |
For accessing the API, a valid API Key can be provided instead of 'Authorization' Bearer JWT header
This authentication method is useful for some applications needing a permanent authentication or not able to expose an interface allowing the user to authenticate (scripts, bots, IOT devices, ...).
A valid API Key is obtained from the API POST /api/rainbow/authentication/v1.0/apikeys.
When API Key authentication is used, the header x-rainbow-app-auth is mandatory to authenticate the application accessing the API.
| Security Scheme Type | API Key |
|---|---|
| Header parameter name: | x-rainbow-api-key |
Challenge for application authentication.
Should be randomly generated by the application (the challenge should be unique for each request for security reasons).
This x-rainbow-challenge header is used for the computation of the header x-rainbow-app-auth.
Mandatory only for authentication with x-rainbow-api-key (not used for authentication with JWT).
| Security Scheme Type | API Key |
|---|---|
| Header parameter name: | x-rainbow-challenge |
Application authentication
Basic authentication format: Basic <base64encode(appId:sha256(appSecret``challenge))>
(Concatenation of appSecret and provided challenge, hashed with sha256).
Construction steps:
x-rainbow-challenge)The challenge used to compute the x-rainbow-app-auth value must be the same as the one provided in header x-rainbow-challenge.
Mandatory only for authentication with x-rainbow-api-key (not used for authentication with JWT).
| Security Scheme Type | API Key |
|---|---|
| Header parameter name: | x-rainbow-app-auth |
This API checks a CSV UTF-8 content for mass-provisioning for directory mode.
All the entries defined in the CSV data are relative to the same company directory .
In case a query parameter commandId is added, the following XMPP message is sent to the initiator of the command:
<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>
The first line of the CSV file describes the content format. Most of the field names are the same than the field names of the company directory API - Create a directory entry.
Supported fields are:
delete: allows to delete an entry. upsert: allows to modify an entry (update or create if doesn't exists) with filled fields. Remark: empty fields are not taken into account. sync: allows to modify an entry (update or create if doesn't exists) with filled fields. Remark: empty fields are taken into account (if a field is empty we will try to update it with empty value).
| delimiter | string CSV delimiter character (will be determined by analyzing the CSV file if not provided) |
| comment | string Default: "%" CSV comment start character |
| commandId | string commandId if the check csv request comes from connector on behalf of admin command, ity will generates a report |
| CSV required | string Content |
{- "data": {
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "okCount": 214,
- "errorCount": 2,
- "errorReport": {
- "entry99": {
- "csvSource": "Moi;Moche et Méchant;GRU;Supermechant;9 NullePart;NOVILLE;00000;;FR;333906-76790;;;SuperMechant;moi.moche@gru.com;info1;",
- "errors": [
- {
- "param": "country",
- "msg": "Invalid field country. Expected a string being one of the following values: [ 'ABW', 'AFG', 'AGO'... more items ]",
- "value": "FR"
}, - {
- "param": "workPhoneNumbers[0]",
- "msg": "Invalid country calling code",
- "value": "333906-76790"
}
]
}, - "entry203": {
- "csvSource": "Lautre;Moche et Méchant Aussi;GRU2;Supermechant;99 NullePart;NOVILLE;00000;;ZZZ;+333906-76790;;;SuperMechant;lautre.moche@gru.com;info1;",
- "errors": [
- {
- "param": "country",
- "msg": "Invalid field country. Expected a string being one of the following values: [ 'ABW', 'AFG', 'AGO'... more items ]",
- "value": "ZZZ"
}
]
}
}
}
}This API allows to delete the last not pending import report of a company directory.
superadmin can delete the last report of the import of the directory of any company.
bp_admin can only delete the last report of the import of the directory of their own companies or their End Customer companies.
organization_admin can only delete the last report of the import of the directory of the companies under their organization.
company_admin and directory_admin can only delete the last report of the import of the directory of their onw companies.
| companyId required | string Id of the company to delete the directory import report. |
| ldapConfigId | string Allows to delete reports on the ldapConfigId of the ldap domain. |
{- "data": {
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "label": "Import Mai 2019",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "startTime": "2019-05-14T13:32:36.500Z",
- "state": "Deleted",
- "created": 3,
- "failed": 1
}
}This API provides a short status of the last import (completed or pending) of a company directory.
superadmin can get the status of the import of the directory of any company.
bp_admin can only get the status of the import of the directory of their own companies or their End Customer companies.
organization_admin can only get the status of the import of the directory of the companies under their organization.
company_admin and directory_admin can only get the status of the import of the directory of their onw companies.
| companyId required | string Id of the company to get the directory import status. |
| ldapConfigId | string Allows to filter reports on the ldapConfigId of the ldap domain. |
{- "data": {
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "label": "Import Mai 2019",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "startTime": "2019-05-14T13:32:36.500Z",
- "state": "Completed with failure",
- "created": 3,
- "failed": 1
}
}This API allows to delete the last not pending import report of a personal directory.
{- "data": {
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "label": "Import Mai 2019",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "startTime": "2019-05-14T13:32:36.500Z",
- "state": "Deleted",
- "created": 3,
- "failed": 1
}
}This API provides a short status of the last import (completed or pending) of a personal directory.
{- "data": {
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "label": "Import Mai 2019",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "startTime": "2019-05-14T13:32:36.500Z",
- "state": "Completed with failure",
- "created": 3,
- "failed": 1
}
}This API retrieves the last checks CSV UTF-8 content for mass-provisioning for directory 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 |
{- "status": "success",
- "report": {
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "okCount": 214,
- "errorCount": 2,
- "errorReport": {
- "entry99": {
- "csvSource": "Moi;Moche et Méchant;GRU;Supermechant;9 NullePart;NOVILLE;00000;;FR;333906-76790;;;SuperMechant;moi.moche@gru.com;info1;",
- "errors": [
- {
- "param": "country",
- "msg": "Invalid field country. Expected a string being one of the following values: [ 'ABW', 'AFG', 'AGO'... more items ]",
- "value": "FR"
}, - {
- "param": "workPhoneNumbers[0]",
- "msg": "Invalid country calling code",
- "value": "333906-76790"
}
]
}, - "entry203": {
- "csvSource": "Lautre;Moche et Méchant Aussi;GRU2;Supermechant;99 NullePart;NOVILLE;00000;;ZZZ;+333906-76790;;;SuperMechant;lautre.moche@gru.com;info1;",
- "errors": [
- {
- "param": "country",
- "msg": "Invalid field country. Expected a string being one of the following values: [ 'ABW', 'AFG', 'AGO'... more items ]",
- "value": "ZZZ"
}
]
}
}
}
}This API provides the detailed report of the last import (completed or pending) of a company directory.
superadmin can get the detailed report of the import of the directory of any company.
bp_admin can only get the detailed report of the import of the directory of their own companies or their End Customer companies.
organization_admin can only get the detailed report of the import of the directory of the companies under their organization.
company_admin and directory_admin can only get the detailed report of the import of the directory of their onw companies.
| companyId required | string Id of the company to get the directory import report. |
| ldapConfigId | string Allows to filter reports on the ldapConfigId of the ldap domain. |
{- "data": {
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "label": "Import Mai 2019",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "startTime": "2019-05-14T13:32:36.500Z",
- "state": "Completed with failure",
- "created": 3,
- "failed": 1,
- "report": {
- "entry1": {
- "status": 200,
- "data": {
- "firstName": "Augustin",
- "lastName": "Bouvet",
- "workPhoneNumbers": [
- "+33390676791"
], - "mobilePhoneNumbers": [ ],
- "otherPhoneNumbers": [ ],
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "companyName": "Big Mop",
- "department": "Paintry",
- "street": "15 rue de Belleville",
- "city": "Paris",
- "postalCode": "75019",
- "country": "FRA",
- "jobTitle": "House painter",
- "eMail": "augustin.bouvet@bigmop.com",
- "tags": [
- "sampleTag"
], - "custom1": "info2",
- "updateDate": "2019-08-30T15:43:47.353Z",
- "id": "5d6944332ced2954c434a057"
}
}, - "entry2": {
- "status": 200,
- "data": {
- "firstName": "Stanislas",
- "lastName": "Lefort",
- "workPhoneNumbers": [
- "+33390676792"
], - "mobilePhoneNumbers": [ ],
- "otherPhoneNumbers": [ ],
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "companyName": "Big Mop",
- "department": "Music",
- "street": "17 rue du Scribe",
- "city": "Paris",
- "postalCode": "75009",
- "country": "USA",
- "state": "AZ",
- "jobTitle": "Conductor",
- "eMail": "stanislas.lefort@bigmop.com",
- "custom1": "info1",
- "custom2": "info2",
- "updateDate": "2019-08-30T15:43:47.371Z",
- "id": "5d6944332ced2954c434a058"
}
}, - "entry3": {
- "status": 200,
- "data": {
- "firstName": "Juliette",
- "lastName": "Dubois",
- "workPhoneNumbers": [
- "+33390676790"
], - "mobilePhoneNumbers": [
- "+33690676790"
], - "otherPhoneNumbers": [
- "+33690676799"
], - "companyId": "5c6eb1d9528b837c4a8035c8",
- "companyName": "Big Mop",
- "department": "Puppet show",
- "street": "91 rue Vaugirard",
- "city": "Paris",
- "postalCode": "75015",
- "country": "FRA",
- "jobTitle": "Puppeteer",
- "eMail": "juliette.dubois@bigmop.com",
- "custom1": "info1",
- "updateDate": "2019-08-30T15:43:47.306Z",
- "id": "5d6944332ced2954c434a056"
}
}, - "entry4": {
- "status": 400,
- "errorDetailsCode": 400000,
- "errorDetails": {
- "param": "workPhoneNumbers[0]",
- "msg": "Invalid country calling code",
- "value": "333906-76790"
}, - "csvSource": "Moi;Moche et Méchant;GRU;Supermechant;9 NullePart;NOVILLE;00000;;FRA;333906-76790;;;SuperMechant;moi.moche@gru.com;info1;"
}
}
}
}This API provides the detailed report of the last import (completed or pending) of a personal directory.
{- "data": {
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "label": "Import Mai 2019",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "startTime": "2019-05-14T13:32:36.500Z",
- "state": "Completed with failure",
- "created": 3,
- "failed": 1,
- "report": {
- "entry1": {
- "status": 200,
- "data": {
- "firstName": "Augustin",
- "lastName": "Bouvet",
- "workPhoneNumbers": [
- "+33390676791"
], - "mobilePhoneNumbers": [ ],
- "otherPhoneNumbers": [ ],
- "companyName": "Big Mop",
- "department": "Paintry",
- "street": "15 rue de Belleville",
- "city": "Paris",
- "postalCode": "75019",
- "country": "FRA",
- "jobTitle": "House painter",
- "eMail": "augustin.bouvet@bigmop.com",
- "tags": [
- "sampleTag"
], - "custom1": "info2",
- "updateDate": "2019-08-30T15:43:47.353Z",
- "id": "5d6944332ced2954c434a057"
}
}, - "entry2": {
- "status": 200,
- "data": {
- "firstName": "Stanislas",
- "lastName": "Lefort",
- "workPhoneNumbers": [
- "+33390676792"
], - "mobilePhoneNumbers": [ ],
- "otherPhoneNumbers": [ ],
- "companyName": "Big Mop",
- "department": "Music",
- "street": "17 rue du Scribe",
- "city": "Paris",
- "postalCode": "75009",
- "country": "USA",
- "state": "AZ",
- "jobTitle": "Conductor",
- "eMail": "stanislas.lefort@bigmop.com",
- "custom1": "info1",
- "custom2": "info2",
- "updateDate": "2019-08-30T15:43:47.371Z",
- "id": "5d6944332ced2954c434a058"
}
}, - "entry3": {
- "status": 200,
- "data": {
- "firstName": "Juliette",
- "lastName": "Dubois",
- "workPhoneNumbers": [
- "+33390676790"
], - "mobilePhoneNumbers": [
- "+33690676790"
], - "otherPhoneNumbers": [
- "+33690676799"
], - "companyName": "Big Mop",
- "department": "Puppet show",
- "street": "91 rue Vaugirard",
- "city": "Paris",
- "postalCode": "75015",
- "country": "FRA",
- "jobTitle": "Puppeteer",
- "eMail": "juliette.dubois@bigmop.com",
- "custom1": "info1",
- "updateDate": "2019-08-30T15:43:47.306Z",
- "id": "5d6944332ced2954c434a056"
}
}, - "entry4": {
- "status": 400,
- "errorDetailsCode": 400000,
- "errorDetails": {
- "param": "workPhoneNumbers[0]",
- "msg": "Invalid country calling code",
- "value": "333906-76790"
}, - "csvSource": "Moi;Moche et Méchant;GRU;Supermechant;9 NullePart;NOVILLE;00000;;FRA;333906-76790;;;SuperMechant;moi.moche@gru.com;info1;"
}
}
}
}This API retrieves the last import CSV UTF-8 content for mass-provisioning for directory 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 |
{- "status": "success",
- "report": {
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "label": "Import Mai 2019",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "startTime": "2019-05-14T13:32:36.500Z",
- "state": "Creating",
- "created": 0,
- "updated": 0,
- "deleted": 0,
- "failed": 0
}
}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 check the entries of a company or user's personal directory with CSV UTF-8 encoded data.
All the entries defined in the CSV data are relative to the same company directory (the companyId, if it is given as parameter) or to the personal directory of the logged user.
The first line of the CSV file describes the content format. Most of the field names are the same as the field names of the company directory API - Create a directory entry.
Supported fields are:
superadmin can import directory entries for any company.
bp_admin can only import directory entries for their own companies or their End Customer companies.
organization_admin can only import directory entries for the companies under their organization.
company_admin and directory_admin can only import directory entries for their onw companies.
user can only import directory entries for their personal directory.
| companyId required | string Id of the company. All the CSV data will be created in the directory of this company. |
| delimiter | string CSV delimiter character (will be determined by analyzing the CSV file if not provided) |
| comment | string Default: "%" CSV comment start character |
| CSV required | string Content |
{- "data": {
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "okCount": 214,
- "errorCount": 2,
- "errorReport": {
- "entry99": {
- "csvSource": "Moi;Moche et Méchant;GRU;Supermechant;9 NullePart;NOVILLE;00000;;FR;333906-76790;;;SuperMechant;moi.moche@gru.com;info1;",
- "errors": [
- {
- "param": "country",
- "msg": "Invalid field country. Expected a string being one of the following values: [ 'ABW', 'AFG', 'AGO'... more items ]",
- "value": "FR"
}, - {
- "param": "workPhoneNumbers[0]",
- "msg": "Invalid country calling code",
- "value": "333906-76790"
}
]
}, - "entry203": {
- "csvSource": "Lautre;Moche et Méchant Aussi;GRU2;Supermechant;99 NullePart;NOVILLE;00000;;ZZZ;+333906-76790;;;SuperMechant;lautre.moche@gru.com;info1;",
- "errors": [
- {
- "param": "country",
- "msg": "Invalid field country. Expected a string being one of the following values: [ 'ABW', 'AFG', 'AGO'... more items ]",
- "value": "ZZZ"
}
]
}
}
}
}This API allows to import the entries of a company directory or user's personal directory with CSV UTF-8 encoded data.
All the entries defined in the CSV data are relative to the same company directory (the companyId, if it is given as parameter) or to the personal directory of the logged user.
NOTE If the directory is not empty, it is deleted before the import.
The first line of the CSV file describes the content format. Most of the field names are the same as the field names of the directory API - Create a directory entry.
Supported fields are:
superadmin can import directory entries for any company.
bp_admin can only import directory entries for their own companies or their End Customer companies.
organization_admin can only import directory entries for the companies under their organization.
company_admin and directory_admin can only import directory entries for their onw companies.
user can only import directory entries for their personal directory.
| companyId | string Id of the company. All the CSV data will be created in the directory of this company.
|
| delimiter | string CSV delimiter character (will be determined by analyzing the CSV file if not provided) |
| comment | string Default: "%" CSV comment start character |
| label | string Default: "none" A text description of this import |
| CSV required | string Content |
{- "data": {
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "label": "Import Mai 2019",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "startTime": "2019-05-14T13:32:36.500Z",
- "state": "Creating",
- "created": 0,
- "failed": 0
}
}This API allows to import the entries of a company directory with CSV UTF-8 encoded data.
All the entries defined in the CSV data are relative to the same company directory.
The first line of the CSV file describes the content format. Most of the field names are the same than the field names of the company directory API - Create a directory entry.
Supported fields are:
delete: allows to delete an entry. upsert: allows to modify an entry (update or create if doesn't exists) with filled fields. Remark: empty fields are not taken into account. sync: allows to modify an entry (update or create if doesn't exists) with filled fields. Remark1: empty fields are taken into account (if a field is empty we will try to update it with empty value). Remark2: existing entries not in the CSV file will be automatically deleted.
In case a query parameter commandId is added, the following XMPP message is sent to the initiator of the command:
<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>| ldapConfigId | string Allows to specify the ldap domain on which the command should be run (in case of multi domain). |
| delimiter | string CSV delimiter character (will be determined by analyzing the CSV file if not provided) |
| comment | string Default: "%" CSV comment start character |
| commandId | string commandId if the check csv request comes from connector on behalf of admin command, ity will generates a report |
| label | string Default: "none" A text description of this import |
| CSV required | string Content |
{- "data": {
- "companyId": "5c6eb1d9528b837c4a8035c8",
- "userId": "5cd44861a5f825bf1decc48c",
- "displayName": "André Dubois",
- "label": "Import Mai 2019",
- "csvHeaders": "firstName;lastName;companyName;department;street;city;postalCode;state;country;workPhoneNumber0;workPhoneNumber1;mobilePhoneNumber0;otherPhoneNumber0",
- "startTime": "2019-05-14T13:32:36.500Z",
- "state": "Creating",
- "ldapConfigId": "598961a9558463457017d76d",
- "created": 0,
- "updated": 0,
- "deleted": 0,
- "failed": 0
}
}This API generates a file describing all companies entries (csv or json format).
| companyId | string companyId from which to retrieve entries, default to admin's companyId |
| format | string Default: "json" Enum: "csv" "json" "all" Allows to retrieve more or less phone numbers details in response.
|
| ldap_id | boolean Default: true Allows to filter entries containing a ldap_id, if false all directories entries ar returned. |
{- "data": [
- {
- "firstName": "test2",
- "lastName": "test2",
- "jobTitle": "Product Manager",
- "eMail": "supermasspro8@ale.com",
- "country": "FRA",
- "companyId": "5f3ee5e3943aa34cbb388505",
- "ldap_id": "abc"
}
]
}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.
| companyId | string companyId of the users in the CSV file, default to admin's companyId |
| delimiter | string the CSV delimiter character (will be determined by analyzing the CSV file if not provided) |
| comment | string Default: "%" the CSV comment start character, use double quotes in field values to escape this character |
| CSV required | string Content |
{- "data": {
- "reqId": "af013f8cb6128d4636823c8ced4f4be9fe3dcde5cbe681ddfe3a3dcda86038c7",
- "mode": "device",
- "actions": {
- "attach": 1,
- "force_attach": 1,
- "detach": 1,
- "modify": 0
}, - "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>| companyId | string companyId of the users in the CSV file, default to admin's companyId |
| delimiter | string the CSV delimiter character (will be determined by analyzing the CSV file if not provided) |
| comment | string Default: "%" the CSV comment start character, use double quotes in field values to escape this character |
| commandId | string commandId if the check csv request comes from connector on behalf of admin command, ity will generates a report |
| CSV required | string Content |
{- "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.
|
{- "data": {
- "reqId": "049d2d44ea6edc90db64bbe2453a8cd38afa58ee83b519b18afa0b54095fd90e",
- "status": "Terminated",
- "report": {
- "lupin06@ejo.company.com": {
- "status": "succeeded",
- "action": "upsert",
- "_user": "create",
- "userId": "60338c5edade211e79c14f58",
- "profiles": {
- "Enterprise Demo": true
}, - "_device": "force_attach",
- "device": {
- "action": "force_attach",
- "shortNumber": "123"
}
}, - "lupin07@ejo.company.com": {
- "status": "succeeded",
- "action": "upsert",
- "_user": "create",
- "userId": "60338c5edade211e79c14f57",
- "profiles": {
- "Enterprise Demo": true
}, - "_device": "detach",
- "device": {
- "action": "detach",
- "pbxId": null,
- "shortNumber": null
}
}, - "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": 6,
- "failed": 1,
- "warnings": 0,
- "total": 7
}, - "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 exports the list of users as CSV UTF-8 data.
The first line of the CSV data describes the content format (column names).
Most of the field names are the field names of the admin createUser API.
| companyId required | string
|
| hasVoiceLicense | boolean Default: false
|
| hasHybridLicense | boolean Default: false
|
| mode | string Default: "user" Enum: "user" "device"
|
This API retrieves the last import CSV UTF-8 content for mass-provisioning for useranddevice mode, performed by an admin.
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.
| reqId required | string the import request id |
{- "CSV": [
- {
- "authenticationExternalUid": "string",
- "authenticationType": "string",
- "businessPhone0": "string",
- "country": "string",
- "department": "string",
- "email0": "string",
- "firstLoginDate": "string",
- "firstName": "string",
- "jobTitle": "string",
- "language": "string",
- "lastLoginDate": "string",
- "lastName": "string",
- "loginEmail": "string",
- "mobilePhone0": "string",
- "nickName": "string",
- "number": "string",
- "password": "string",
- "pbxInternalNumber": "string",
- "pbxShortNumber": 0,
- "selectedAppCustomisationTemplateName": "string",
- "service0": "string",
- "tag0": "string",
- "tag1": "string",
- "tag2": "string",
- "tag3": "string",
- "tag4": "string",
- "timezone": "string",
- "title": "string",
- "userInfo1": "string",
- "userInfo2": "string",
- "visibility": "string"
}
]
}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 |
{- "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 |
| ldapConfigId | string Allows to filter reports on the ldapConfigId of the ldap domain. |
{- "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
| companyId | string
|
| label | string Default: "none"
|
| noemails | boolean Default: false
|
| nostrict | boolean Default: false
|
| delimiter | string
|
| comment | string Default: "%" the CSV comment start character, use double quotes in field values to escape this character |
| CSV required | string Content |
{- "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 |
{- "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>| companyId | string
|
| label | string Default: "none"
|
| noemails | boolean Default: false
|
| nostrict | boolean Default: false
|
| delimiter | string
|
| comment | string Default: "%" the CSV comment start character, use double quotes in field values to escape this character |
| commandId | string commandId if the check csv request comes from connector on behalf of admin command, it will generates a report |
| ldapConfigId | string Allows to specify the ldap domain on which the import should be run (in case of multi domain). |
| CSV required | string Content |
{- "data": {
- "reqId": "fa1bf763cc52bd131e70c0e6696af88ff777ea82bdc032e44cb23a80a81498e7",
- "status": "Pending",
- "label": "mon import",
- "mode": "user and device",
- "displayName": "Admin MyCompany",
- "userId": "598961a9558463457017d76c",
- "startTime": "2017-09-01T12:17:44.439Z",
- "ldapConfigId": "598961a9558463457017d76d"
}
}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. |