Rainbow Application Portal (1.236.0)

Download OpenAPI specification:Download

Rainbow application portal API guide

Preamble

Download Postman collection

Introduction

This guide describes list of API services that are provided by OT Rainbow Application portal. This portal is dedicated to app features.

Protocol

REST interface is used for sending/receiving OT rainbow API messages. HTTP requests GET, DELETE, POST, UPDATE 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. Additional data could be provided in message body. 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”.

Security considerations

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.

Authentication

Bearer

For accessing the API a valid JWT token or a valid OAuth has to be provided access token must be passed in all the queries in the 'Authorization' header.

  • JWT
    • A valid JWT token is generated by the API and returned as answer of a call to the route GET /api/rainbow/authentication/v1.0/login giving a valid user & password.
    • The following syntax must be used in the 'Authorization' header:
      Bearer xxxxxx.yyyyyyy.zzzzzz
  • OAuth access token
    • A valid OAuth access token is generated and returned as answer of the OAuth 2.0 workflow with authorization code grant. This is done by calling the route GET /api/rainbow/authentication/v1.0/oauth/authorize to get an authorization code and then POST /api/rainbow/authentication/v1.0/oauth/token to exchange it agains an access token and a refresh token.
    • The following syntax must be used in the 'Authorization' header:
      Bearer xxxxxx.yyyyyyy.zzzzzz
Security Scheme Type API Key
Header parameter name: Authorization

Bearer-x-rainbow-api-key

For accessing the API a valid API_KEY can be provided instead of Authorization Bearer JWT header

Security Scheme Type API Key
Header parameter name: x-rainbow-api-key

Applications

Get all applications created (in deployment or deployed) by the user.

This API can be used to retrieve the list of applications created by the user.
User with only bp_finance role can only retrieve applications:

  • owned by an app_admin belonging to his BP company
  • with kpi=appconnect
  • with env=deployed
query Parameters
name
string

Allows to filter applications by name.

env
string

Allows to filter applications by environment (Allowed values: not_deployed, in_deployment, deployed).

state
string

Allows to filter applications by state. (Allowed values: new, active, blocked, deleted, stopped). Can be a comma separated string.

types
string

Allows to filter applications by type (Allowed values: web, mobile, desktop, server, bot, iot, admin).Can be a comma separated string. By default all of the types are taken

activities
string

Allows to filter applications by activity (Allowed values: A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U). Can be a comma separated string. By default all of the activities are taken

ownerId
string

Allows to filter applications by ownerId.
superadmin, app_superadmin, app_support or support can get applications from any ownerId, otherwise the ownerId (or list of ownerId) must be in the same company than the logged in user.

subscriptionStatus
string

Allows to filter applications by subscription status. (Allowed values: creating, active, alerting, hold, terminating, terminated, failed, unknown). Can be a comma separated string.

fromDate
string <date>

Allows to filter applications from provided date.

toDate
string <date>

Allows to filter applications until provided date.

dateType
string
Default: "dateOfCreation"
Enum: "dateOfCreation" "dateOfDeploymentRequest" "dateOfDeployment"

Allows to filter applications from provided dateType.

kpi
string

Allows to filter applications by kpi (Allowed values: internal, business, payasyougo).

format
string
Default: "small"
Enum: "small" "medium" "full"

Allows to retrieve more or less application details in response.
- small: id, name, state, type, ownerId
- medium: id, name, state, type, origin, dateOfCreation, env, activity, ownerId
- full: id, name, ownerId, appSecret, ssoAuthenticationRedirectUrl, backchannelAuthenticationRedirectUrl, oauthRedirectUris, enableOAuthImplicitGrant, enableOAuthRefreshTokenRotation, enableOAuthAllowSeveralRefreshTokens, termsOfServiceUrl, privacyPoliciesUrl, state, env, type, kpi, activity, origin, dateOfCreation, dateOfLastTokenWhenRenew, dateOfDeploymentRequest, dateOfDeployment, deployReason, deployedByUserId, isRainbowClientDefault, isNoIdApplication, profileId, platform, subscriptions, appSuperadminComment, appSuperadminStatus, pushNotificationSettings

limit
number
Default: 100

Allow to specify the number of applications to retrieve.

offset
number

Allow to specify the position of first application to retrieve (first app if not specified). Warning: if offset > total, no results are returned.

sortField
string
Default: "name"

Sort applications list based on the given field.

sortOrder
number
Default: 1
Enum: -1 1

Specify order when sorting applications list.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "limit": 100,
  • "offset": 0,
  • "total": 2
}

Create an application.

Rainbow users can create their own applications.

Request Body schema: application/json
activity
required
string
Enum: "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U"

Application activity domain.

  • A: AGRICULTURE, FORESTRY AND FISHING
  • B: MINING AND QUARRYING
  • C: MANUFACTURING
  • D: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY
  • E: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES
  • F: CONSTRUCTION
  • G: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES
  • H: TRANSPORTATION AND STORAGE
  • I: ACCOMMODATION AND FOOD SERVICE ACTIVITIES
  • J: INFORMATION AND COMMUNICATION
  • K: FINANCIAL AND INSURANCE ACTIVITIES
  • L: REAL ESTATE ACTIVITIES
  • M: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES
  • N: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES
  • O: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY
  • P: EDUCATION
  • Q: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES
  • R: ARTS, ENTERTAINMENT AND RECREATION
  • S: OTHER SERVICE ACTIVITIES
  • T: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE
  • U: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES
allowSendingSms
boolean

Indicates if application could send sms. Only superadmin and app_superadmin can set this field.

appSecret
string

app_superadmin is allowed to set application appSecret, otherwise it is automatically generated

appSuperadminComment
string [ 0 .. 1024 ] characters

Comment regarding the application (free data).
Can only be set by users with superadmin/app_superadmin roles.

appSuperadminStatus
string [ 0 .. 64 ] characters

Application status (free data).
Can only be set by users with superadmin/app_superadmin roles.

backchannelAuthenticationRedirectUrl
string

URL which can be used by the application (especially Desktop applications) as callback URL for backchannel authentication mechanism (currently implemented only for Single Sign On (OIDC, SAML)). Used when useBackchannelAuthenticationRedirectUrl is enabled by the application in the SSO loginUrl (SSO flow run inside user's browser and redirection to the Desktop application with the Rainbow JWT token once user is successfully authenticated).
If this setting is not set, ssoAuthenticationRedirectUrl setting is used instead.
See GET /api/rainbow/authentication/v1.0/oidc-client/login for more information regarding the Single Sign On method using OIDC.

description
string

application description

disableOAuthConsentScreen
boolean
Default: false

If set to true, the consent screen will not be presented to the users during the OAuth 2.0 authentication for this application.

This setting is disabled by default (i.e. the consent screen IS displayed). It should be enabled only for specific trusted applications developed by ALE (Teams connector, Desk Booking, ...).
Can only be set by users with superadmin/app_superadmin roles.

enableOAuthAllowSeveralRefreshTokens
boolean
Default: true

If set to true, allow to generate several OAuth 2.0 refresh_token per user for this application.
When this setting is enabled, each time a user authenticate using OAuth 2.0 authorization code grant, a new refresh_token is generated and previous refresh_tokens this user could have obtained from login using the same application on other device are preserved (enable a kind of multiple OAuth sessions per user).
If this setting is disabled, each time a user authenticate using OAuth 2.0 authorization code grant, a new refresh_token is generated and if a refresh_token existed from a previous login of this user for this application, this refresh_token and all access_tokens obtained using it are revoked to keep only the new access_token / refresh_token generated during this new login.
This setting is enabled by default.

enableOAuthImplicitGrant
boolean
Default: false

If set to true, allow the application to use OAuth 2.0 implicit grant.
This setting is disabled by default, as implicit flow is less secure than authorize code grant.

enableOAuthRefreshTokenRotation
boolean
Default: true

If set to true, enable the OAuth 2.0 refresh_token rotation for this application.
When refresh_token rotation is enabled, each time the application uses a refresh_token to retrieve a new access_token, a new refresh_token is also returned and the previous refresh_token is revoked.
refresh_token rotation reduces the threat if the refresh_token would be compromised, as it will be revoked the next time the application refreshed its access_token.
This setting is enabled by default, as refresh_token rotation is more secure. It is not recommended to disable this setting.

kpi
string
Enum: "business" "payasyougo" "rainbowstore" "appconnect"

superadmin/app_superadmin is allowed to set application kpi

name
required
string [ 1 .. 255 ] characters

Application title

oauthRedirectUris
Array of strings

URI(s) used by the application as callback URL for OAuth 2.0.
Mandatory parameter to use OAuth 2.0 login method. To ensure the authentication security, Rainbow only sends OAuth authentication tokens to URLs that are set in oauthRedirectUris.
Max 20 URIs.

origin
string [ 0 .. 255 ] characters

Origin

ownerId
string

Owner unique identifier (like 578bb08dc0d8c107725ef8c4).
Can only be set by users with superadmin/app_superadmin roles.
ownerId must correspond to a user with the role app_admin.
When an app_admin user (without the roles superadmin/app_superadmin) creates an application, ownerId is automatically set to his user id.

privacyPoliciesUrl
Array of strings

URL of the application's website explaining the application's privacy policy for the end user.
This URL will be displayed as a link in the OAuth 2.0 consent form presented to the user (the page allowing the user to allow the application to access his data).
This parameter is optional, if not provided no link will be displayed in the consent form.

ssoAuthenticationRedirectUrl
string

URL which can be used by the application as callback URL for authentication using Single Sign On (OIDC, SAML).
If this setting is not set, by default the SSO authentication methods redirect the obtained JWT on the URL https://web.openrainbow.com/#/?tkn=
See GET /api/rainbow/authentication/v1.0/oidc-client/login for more information regarding the Single Sign On method using OIDC.

termsOfServiceUrl
Array of strings

URL of the application's website explaining the application's terms of services for the end user.
This URL will be displayed as a link in the OAuth 2.0 consent form presented to the user (the page allowing the user to allow the application to access his data).
This parameter is optional, if not provided no link will be displayed in the consent form.

type
required
string
Enum: "web" "mobile" "desktop" "server" "bot" "iot" "admin"

Application type.

Responses

Request samples

Content type
application/json
{
  • "activity": "A",
  • "allowSendingSms": true,
  • "appSecret": "string",
  • "appSuperadminComment": "string",
  • "appSuperadminStatus": "string",
  • "backchannelAuthenticationRedirectUrl": "string",
  • "description": "string",
  • "disableOAuthConsentScreen": false,
  • "enableOAuthAllowSeveralRefreshTokens": true,
  • "enableOAuthImplicitGrant": false,
  • "enableOAuthRefreshTokenRotation": true,
  • "kpi": "business",
  • "name": "string",
  • "oauthRedirectUris": [
    ],
  • "origin": "string",
  • "ownerId": "string",
  • "privacyPoliciesUrl": [
    ],
  • "ssoAuthenticationRedirectUrl": "string",
  • "termsOfServiceUrl": [
    ],
  • "type": "web"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Restart an application.


Rainbow developers can restart their own applications.

If application's kpi is "rainbowstore", then "restart" should use rainbowstore APIs.

path Parameters
appId
required
string

Application unique identifier (like 78e98ee09bad11e8b8edebb50d679df6)

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Stop an application.


Rainbow users can stop their own applications.

If application's kpi is "rainbowstore", then "stop" should use rainbowstore APIs.

path Parameters
appId
required
string

Application unique identifier (like 78e98ee09bad11e8b8edebb50d679df6)

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete an application.


Rainbow developers can delete their own applications.

If application's kpi is "rainbowstore", then deletion should use rainbowstore APIs.

path Parameters
appId
required
string

Application unique identifier (like 78e98ee09bad11e8b8edebb50d679df6)

Responses

Response samples

Content type
application/json
{
  • "status": "Application (with id : 78e98ee09bad11e8b8edebb50d679df6) successfully deleted",
  • "data": [ ]
}

Get an application data.

app_admin can see their own applications and applications belonging to other developers of their company.

path Parameters
appId
required
string

Application unique identifier (like 78e98ee09bad11e8b8edebb50d679df6)

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update an application.

Rainbow users can update their own applications.

path Parameters
appId
required
string

Application unique identifier (like 78e98ee09bad11e8b8edebb50d679df6)

Request Body schema: application/json
activity
string
Enum: "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U"

Application activity domain.

  • A: AGRICULTURE, FORESTRY AND FISHING
  • B: MINING AND QUARRYING
  • C: MANUFACTURING
  • D: ELECTRICITY, GAS, STEAM AND AIR CONDITIONING SUPPLY
  • E: WATER SUPPLY; SEWERAGE, WASTE MANAGEMENT AND REMEDIATION ACTIVITIES
  • F: CONSTRUCTION
  • G: WHOLESALE AND RETAIL TRADE; REPAIR OF MOTOR VEHICLES AND MOTORCYCLES
  • H: TRANSPORTATION AND STORAGE
  • I: ACCOMMODATION AND FOOD SERVICE ACTIVITIES
  • J: INFORMATION AND COMMUNICATION
  • K: FINANCIAL AND INSURANCE ACTIVITIES
  • L: REAL ESTATE ACTIVITIES
  • M: PROFESSIONAL, SCIENTIFIC AND TECHNICAL ACTIVITIES
  • N: ADMINISTRATIVE AND SUPPORT SERVICE ACTIVITIES
  • O: PUBLIC ADMINISTRATION AND DEFENCE; COMPULSORY SOCIAL SECURITY
  • P: EDUCATION
  • Q: HUMAN HEALTH AND SOCIAL WORK ACTIVITIES
  • R: ARTS, ENTERTAINMENT AND RECREATION
  • S: OTHER SERVICE ACTIVITIES
  • T: ACTIVITIES OF HOUSEHOLDS AS EMPLOYERS; UNDIFFERENTIATED GOODS- AND SERVICES-PRODUCING ACTIVITIES OF HOUSEHOLDS FOR OWN USE
  • U: ACTIVITIES OF EXTRATERRITORIAL ORGANISATIONS AND BODIES
allowSendingSms
boolean

Indicates if application could send sms. Only superadmin and app_superadmin can set this field.

appSuperadminComment
string [ 0 .. 1024 ] characters

Comment regarding the application (free data).
Can only be set by users with superadmin/app_superadmin roles.

appSuperadminStatus
string [ 0 .. 64 ] characters

Application status (free data).
Can only be set by users with superadmin/app_superadmin roles.

backchannelAuthenticationRedirectUrl
string

URL which can be used by the application (especially Desktop applications) as callback URL for backchannel authentication mechanism (currently implemented only for Single Sign On (OIDC, SAML)). Used when useBackchannelAuthenticationRedirectUrl is enabled by the application in the SSO loginUrl (SSO flow run inside user's browser and redirection to the Desktop application with the Rainbow JWT token once user is successfully authenticated).
If this setting is not set, ssoAuthenticationRedirectUrl setting is used instead.
See GET /api/rainbow/authentication/v1.0/oidc-client/login for more information regarding the Single Sign On method using OIDC.

deployReason
string [ 1 .. 255 ] characters

Reason of deployment
Can only be updated by users with role superadmin or app_superadmin.
The update of deployReason is only allowed if the application env is deployed.

description
string

application description

disableOAuthConsentScreen
boolean
Default: false

If set to true, the consent screen will not be presented to the users during the OAuth 2.0 authentication for this application.

This setting is disabled by default (i.e. the consent screen IS displayed). It should be enabled only for specific trusted applications developed by ALE (Teams connector, Desk Booking, ...).
Can only be set by users with superadmin/app_superadmin roles.

enableOAuthAllowSeveralRefreshTokens
boolean
Default: true

If set to true, allow to generate several OAuth 2.0 refresh_token per user for this application.
When this setting is enabled, each time a user authenticate using OAuth 2.0 authorization code grant, a new refresh_token is generated and previous refresh_tokens this user could have obtained from login using the same application on other device are preserved (enable a kind of multiple OAuth sessions per user).
If this setting is disabled, each time a user authenticate using OAuth 2.0 authorization code grant, a new refresh_token is generated and if a refresh_token existed from a previous login of this user for this application, this refresh_token and all access_tokens obtained using it are revoked to keep only the new access_token / refresh_token generated during this new login.
This setting is enabled by default.

enableOAuthImplicitGrant
boolean
Default: false

If set to true, allow the application to use OAuth 2.0 implicit grant.
This setting is disabled by default, as implicit flow is less secure than authorize code grant.

enableOAuthRefreshTokenRotation
boolean
Default: true

If set to true, enable the OAuth 2.0 refresh_token rotation for this application.
When refresh_token rotation is enabled, each time the application uses a refresh_token to retrieve a new access_token, a new refresh_token is also returned and the previous refresh_token is revoked.
refresh_token rotation reduces the threat if the refresh_token would be compromised, as it will be revoked the next time the application refreshed its access_token.
This setting is enabled by default, as refresh_token rotation is more secure. It is not recommended to disable this setting.

kpi
string
Enum: "business" "payasyougo" "rainbowstore" "appconnect"

superadmin/app_superadmin is allowed to set application kpi

name
string [ 1 .. 255 ] characters

Application title

oauthRedirectUris
Array of strings

URI(s) used by the application as callback URL for OAuth 2.0.
Mandatory parameter to use OAuth 2.0 login method. To ensure the authentication security, Rainbow only sends OAuth authentication tokens to URLs that are set in oauthRedirectUris.
Max 20 URIs.

origin
string [ 0 .. 255 ] characters

Origin

ownerId
string

Change application's owner unique identifier (like 578bb08dc0d8c107725ef8c4).
The new requested ownerId must be a user with role the app_admin.
superadmin or app_superadmin can set any new ownerId, otherwise the previous ownerId and the new ownerId must be in the same company than the logged in user (if the logged in user is not the ownerId of the application, ownerId is the only field he can update - all the other fields are ignored).
The ownerId can not be changed if the application has the kpi payasyougo.

privacyPoliciesUrl
Array of strings

URL of the application's website explaining the application's privacy policy for the end user.
This URL will be displayed as a link in the OAuth 2.0 consent form presented to the user (the page allowing the user to allow the application to access his data).
This parameter is optional, if not provided no link will be displayed in the consent form.

refreshAppSecret
boolean

If set to true, refresh appSecret by setting a new random value

ssoAuthenticationRedirectUrl
string

URL which can be used by the application as callback URL for authentication using Single Sign On (OIDC, SAML).
If this setting is not set, by default the SSO authentication methods redirect the obtained JWT on the URL https://web.openrainbow.com/#/?tkn=
See GET /api/rainbow/authentication/v1.0/oidc-client/login for more information regarding the Single Sign On method using OIDC.

termsOfServiceUrl
Array of strings

URL of the application's website explaining the application's terms of services for the end user.
This URL will be displayed as a link in the OAuth 2.0 consent form presented to the user (the page allowing the user to allow the application to access his data).
This parameter is optional, if not provided no link will be displayed in the consent form.

type
string
Enum: "web" "mobile" "desktop" "server" "bot" "iot" "admin"

Application type.

Responses

Request samples

Content type
application/json
{
  • "activity": "A",
  • "allowSendingSms": true,
  • "appSuperadminComment": "string",
  • "appSuperadminStatus": "string",
  • "backchannelAuthenticationRedirectUrl": "string",
  • "deployReason": "string",
  • "description": "string",
  • "disableOAuthConsentScreen": false,
  • "enableOAuthAllowSeveralRefreshTokens": true,
  • "enableOAuthImplicitGrant": false,
  • "enableOAuthRefreshTokenRotation": true,
  • "kpi": "business",
  • "name": "string",
  • "oauthRedirectUris": [
    ],
  • "origin": "string",
  • "ownerId": "string",
  • "privacyPoliciesUrl": [
    ],
  • "refreshAppSecret": true,
  • "ssoAuthenticationRedirectUrl": "string",
  • "termsOfServiceUrl": [
    ],
  • "type": "web"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Request the deployment of an application.


Rainbow users can update their own applications.

If application's kpi is "rainbowstore", then the deployment should use rainbowstore APIs.
If application's kpi is "appconnect", then description should be filled on application.

path Parameters
appId
required
string

Application unique identifier (like 78e98ee09bad11e8b8edebb50d679df6)

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Applications Pushnotificationsettings

Create an application push notification settings.

This API allows to create application push notification settings.

path Parameters
appId
required
string

Application unique identifier (like a7c99c70c91a11e7b5c6732f5816ea89)

Request Body schema: application/json
apiKey
string [ 1 .. 255 ] characters

String containing your Android App apiKey as defined in https://push.baidu.com/doc/guide/manufacturer, , this field is required if 'type' is baidu

appBundleId
string [ 1 .. 255 ] characters

String containing your Apple App Bundle ID as defined in https://developer.apple.com/documentation/appstoreconnectapi/bundle_ids, , this field is required if 'type' is apns_v2

authorizationKey
string [ 1 .. 255 ] characters

String containing a authorization key, this field is required if 'type' is fcm or fcm_xmpp

certificateFile
string

String containing APNS certificate in a PEM format, this field is required if 'type' is apns

certificateType
string
Enum: "im" "voip"

Certificate type, this field is required if 'type' is apns

client_email
string

String containing client_email of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

isEnabled
boolean
Default: false

Boolean indicating if setting is enabled/disabled

private_key
string

String containing private_key of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

private_key_id
string

String containing private_key_id of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

project_id
string

String containing project_id of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

secretKey
string [ 1 .. 255 ] characters

String containing your Android App secretKey as defined in https://push.baidu.com/doc/guide/manufacturer, this field is required if 'type' is baidu

senderId
string [ 1 .. 255 ] characters

String containing senderId of your Application available in firebase ( available in https://console.firebase.google.com/u/0/project/[Your project]/settings/cloudmessaging/) , this field is required if 'type' is fcm_xmpp

token_uri
string

String containing token_uri of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

type
required
string
Enum: "apns" "apns_v2fcm" "fcm_xmpp" "baidu" "fcm_v1"

Push notification type

Responses

Request samples

Content type
application/json
{
  • "apiKey": "string",
  • "appBundleId": "string",
  • "authorizationKey": "string",
  • "certificateFile": "string",
  • "certificateType": "im",
  • "client_email": "string",
  • "isEnabled": false,
  • "private_key": "string",
  • "private_key_id": "string",
  • "project_id": "string",
  • "secretKey": "string",
  • "senderId": "string",
  • "token_uri": "string",
  • "type": "apns"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get all application push notification settings data.

This API allows to get all application push notification settings.

path Parameters
appId
required
string

Application unique identifier (like a7c99c70c91a11e7b5c6732f5816ea89)

query Parameters
type
string
Enum: "apns" "fcm" "apns_v2" "fcm_xmpp" "baidu" "fcm_v1"

Allows to filter application push certificates list of the type(s) provided in this option.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "total": 7
}

Delete an application push notification settings

This API allows to delete an application push notification settings.

path Parameters
appId
required
string

Application unique identifier (like a7c99c70c91a11e7b5c6732f5816ea89)

id
required
string

Push notification settings unique identifier (like 5a686144554d365925db8796)

Responses

Response samples

Content type
application/json
{
  • "errorCode": 500,
  • "errorMsg": "Internal Server Error",
  • "errorDetails": "",
  • "errorDetailsCode": -1,
  • "errorDetailsData": {
    }
}

Get an application push notification settings data.

This API allows to get an application push notification settings.

path Parameters
appId
required
string

Application unique identifier (like a7c99c70c91a11e7b5c6732f5816ea89)

id
required
string

Push notification settings unique identifier (like 5a686144554d365925db8796)

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update an application push notification settings

This API allows to update an application push notification settings.

path Parameters
appId
required
string

Application unique identifier (like a7c99c70c91a11e7b5c6732f5816ea89)

id
required
string

Push notification settings unique identifier (like 5a686144554d365925db8796)

Request Body schema: application/json
apiKey
string [ 1 .. 255 ] characters

String containing your Android App apiKey as defined in https://push.baidu.com/doc/guide/manufacturer, , this field is required if 'type' is baidu

authorizationKey
string [ 1 .. 255 ] characters

String containing a authorization key, this field is required if updated push notification settings type is fcm or fcm_xmpp

certificateFile
string

String containing APNS certificates in a PEM format, this field is required if updated push notification settings type is apns

client_email
string

String containing client_email of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

isEnabled
boolean
Default: false

Boolean indicating if setting is enabled/disabled

private_key
string

String containing private_key of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

private_key_id
string

String containing private_key_id of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

project_id
string

String containing project_id of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

secretKey
string [ 1 .. 255 ] characters

String containing your Android App secretKey as defined in https://push.baidu.com/doc/guide/manufacturer, , this field is required if 'type' is baidu

token_uri
string

String containing token_uri of your Application available in firebase (See https://console.firebase.google.com/u/0/project/[Your project]/settings/serviceaccounts/adminsdk for explanation), this field is required if 'type' is fcm_v1

Responses

Request samples

Content type
application/json
{
  • "apiKey": "string",
  • "authorizationKey": "string",
  • "certificateFile": "string",
  • "client_email": "string",
  • "isEnabled": false,
  • "private_key": "string",
  • "private_key_id": "string",
  • "project_id": "string",
  • "secretKey": "string",
  • "token_uri": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Developers

Confirm that a user has requested a developer account creation.

This API can be used to confirm that a user has requested a developer account creation. Used only in the 2 steps onboarding scenario. See (#applications/developers:applications/developers/PostRegister). To confirm the user has the role app_admin, an email is sent to the user. The email contains this url, and the user must used it to confirm it's registration.

Request Body schema: application/json
token
string

Confirmation token (Token provided in confirmation email).

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "status": "Email successfully sent",
  • "data": {
    }
}

Allows a developer to send feedback.

This API allows a developer to send a feedback.

Authorizations:
query Parameters
x-rainbow-app-auth
string

Application authentication

It has to be computed as follow: <base64encode(appId:sha256(appSecretchallenge))> (concatenation of appSecret and challenge, hashed with sha256).

The challenge used to compute the x-rainbow-app-auth value must be the same than the one provided in query parameter challenge.

Application authentication is mandatory. In the case the parameter x-rainbow-app-auth could not be provided in the headers, it can be provided in the query string parameters.

challenge
required
string

challenge for application authentication.

Should be randomly generated by the application (the challenge should be unique for each request for security reasons).

header Parameters
content-length
required
string

<calculated>

x-rainbow-app-auth
string

Application authentication

Basic <base64encode(appId:sha256(appSecret``challenge))> (Concatenation of appSecret and provided challenge, hashed with sha256).

Application authentication is mandatory, if x-rainbow-app-auth can't be set set in header it must be set in query parameters.

Request Body schema: multipart/form-data; boundary=\<calculated\>
string <binary> (applicationsDevelopersSendFeedback)

Attachment of the feedback (binary format)

Responses

Response samples

Content type
application/json
{
  • "errorCode": 401,
  • "errorMsg": "Unauthorized",
  • "errorDetails": "Unknown application or wrong token for application id 56adef25296bdca7652",
  • "errorDetailsCode": 401500
}

Allows a developer to choose offer by email.

This API allows a developer to choose.

query Parameters
subject
required
string [ 1 .. 255 ] characters

Subject of the offer mail

body
required
string [ 1 .. 4096 ] characters

Body of the offer mail

offer
required
string
Enum: "demo" "business" "appconnect"

Offer chosen

Responses

Response samples

Content type
application/json
{
  • "status": "Offer successfully sent"
}