@datafire/ritc v6.0.0
@datafire/ritc
Client library for Ritc
Installation and Usage
npm install --save @datafire/ritc
let ritc = require('@datafire/ritc').create({
Authorization: ""
});
.then(data => {
console.log(data);
});
Description
Rules in the Cloud
Actions
listActions
List actions
ritc.listActions(null, context)
Input
This action has no parameters
Output
- output
array
- items ActionShortResponse
addAction
Create a new action
ritc.addAction({
"Action Object": {
"name": "",
"channelId": 0,
"functionId": ""
}
}, context)
Input
- input
object
- Action Object required Action59
Output
- output ActionShortResponse
removeAction
Delete an action
ritc.removeAction({
"action_id": ""
}, context)
Input
- input
object
- action_id required
string
: Id of action
- action_id required
Output
Output schema unknown
getAction
Get an action
ritc.getAction({
"action_id": ""
}, context)
Input
- input
object
- action_id required
string
: Id of action_id
- action_id required
Output
- output
array
- items ActionFullResponse
updateAction
Update information about a specific action
ritc.updateAction({
"action_id": "",
"Action Object": {
"name": "",
"channelId": 0,
"functionId": ""
}
}, context)
Input
- input
object
- action_id required
string
: Id of user - Action Object required Action59
- action_id required
Output
- output ActionShortResponse
admin
Ping the server
ritc.admin(null, context)
Input
This action has no parameters
Output
- output
object
logInRitc
Log a message
ritc.logInRitc({
"message": {}
}, context)
Input
- input
object
- message required
object
- message required
Output
- output
object
pingRitc
Ping the server
ritc.pingRitc(null, context)
Input
This action has no parameters
Output
- output
object
listApps
Get apps information
ritc.listApps(null, context)
Input
This action has no parameters
Output
- output
array
- items AppResponse
addApp
Create a new app
ritc.addApp({
"App Object": {}
}, context)
Input
- input
object
- App Object required App
Output
- output AppResponse
listAppChannels
Get app channels
ritc.listAppChannels(null, context)
Input
This action has no parameters
Output
- output
array
- items AppChannelResponse
listAppChannelUsers
Get users of a specified channel
ritc.listAppChannelUsers({
"channel_id": ""
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel
- channel_id required
Output
- output
array
- items AppChannelResponse
getAppChannelUser
Get user of a specified channel
ritc.getAppChannelUser({
"channel_id": "",
"user_id": ""
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel - user_id required
string
: Id of User
- channel_id required
Output
- output
array
- items AppChannelResponse
addAppChannelUser
Create user channel
ritc.addAppChannelUser({
"channel_id": "",
"user_id": ""
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel - user_id required
string
: Id of User
- channel_id required
Output
- output AppChannelResponse
listChannelExternalCredentials
Get external credentials
ritc.listChannelExternalCredentials(null, context)
Input
This action has no parameters
Output
- output
array
addChannelExternalCredentials
Create new external credentials
ritc.addChannelExternalCredentials({
"App_External_Credentials Object": {}
}, context)
Input
- input
object
- App_External_Credentials Object required AppExternalCredentials
Output
removeChannelExternalCredentials
Delete credentials for a channel
ritc.removeChannelExternalCredentials({
"channel_id": ""
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel
- channel_id required
Output
Output schema unknown
getChannelExternalCredentials
Get credentials for a channel in an app
ritc.getChannelExternalCredentials({
"channel_id": ""
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel
- channel_id required
Output
- output
array
updateChannelExternalCredentials
Update credentials for a channel
ritc.updateChannelExternalCredentials({
"channel_id": "",
"App_External_Credentials Object": {}
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel - App_External_Credentials Object required AppExternalCredentials
- channel_id required
Output
runRuleGroup
Run specified rule group in the app
ritc.runRuleGroup({
"rule_id_list": ""
}, context)
Input
- input
object
- rule_id_list required
string
: Ids of rules in the group, separated by commas, no spaces - initial_data
object
- break_when_rule_fires
boolean
: Do not continue with remaining rules after a rule fires
- rule_id_list required
Output
- output
array
- items RuleResults
runApp
Run active app rules
ritc.runApp({}, context)
Input
- input
object
- initial_data
object
- break_when_rule_fires
boolean
: Do not continue with remaining rules after a rule fires
- initial_data
Output
- output
array
- items RuleResults
removeApp
Delete an app
ritc.removeApp({
"app_id": ""
}, context)
Input
- input
object
- app_id required
string
: Id of App
- app_id required
Output
Output schema unknown
getApp
Get app information
ritc.getApp({
"app_id": ""
}, context)
Input
- input
object
- app_id required
string
: Id of App
- app_id required
Output
- output
array
- items AppResponse
updateApp
Update an app
ritc.updateApp({
"app_id": "",
"App Object": {}
}, context)
Input
- input
object
- app_id required
string
: Id of app - App Object required App
- app_id required
Output
- output AppResponse
listChannels
Retrieve Channels
ritc.listChannels(null, context)
Input
This action has no parameters
Output
- output
array
- items ChannelResponse
addChannel
Create a channel
ritc.addChannel({
"Channel Object": {}
}, context)
Input
- input
object
- Channel Object required Channel
Output
- output ChannelResponse
listAnonymousChannels
Retrieve Channels anonymously
ritc.listAnonymousChannels(null, context)
Input
This action has no parameters
Output
- output
array
- items ChannelResponse
removeChannel
Delete a channel
ritc.removeChannel({
"channel_id": ""
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel
- channel_id required
Output
Output schema unknown
getChannel
Get channel information
ritc.getChannel({
"channel_id": ""
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel
- channel_id required
Output
- output
array
- items ChannelResponse
updateChannel
Update a channel
ritc.updateChannel({
"channel_id": "",
"Channel Object": {}
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel - Channel Object required Rule
- channel_id required
Output
- output ChannelResponse
listChannelFunctions
Retrieve Channel Functions
ritc.listChannelFunctions({
"channel_id": ""
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel
- channel_id required
Output
- output
array
- items FunctionResponse
addChannelFunction
Create a channel function
ritc.addChannelFunction({
"channel_id": "",
"Channel Function Object": {}
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel - Channel Function Object required Function7
- channel_id required
Output
- output FunctionResponse
getChannelFunction
Get channel function information
ritc.getChannelFunction({
"channel_id": "",
"function_id": ""
}, context)
Input
- input
object
- channel_id required
string
: Id of Channel - function_id required
string
: Id of Channel Function
- channel_id required
Output
- output
array
- items FunctionResponse
addOrganization
Create an org
ritc.addOrganization({
"Org Object": {
"name": ""
}
}, context)
Input
- input
object
- Org Object required Org
Output
- output
array
- items OrgResponse
getMyOrganization
Get org information
ritc.getMyOrganization(null, context)
Input
This action has no parameters
Output
- output
array
- items OrgResponse
listRules
List rules
ritc.listRules(null, context)
Input
This action has no parameters
Output
- output
array
- items RuleShortResponse
addRule
Create a new rule
ritc.addRule({
"Rule Object": {}
}, context)
Input
- input
object
- Rule Object required Rule
Output
- output RuleFullResponse
removeRule
Delete a rule
ritc.removeRule({
"rule_id": ""
}, context)
Input
- input
object
- rule_id required
string
: Id of rule
- rule_id required
Output
Output schema unknown
getRule
Get a rule
ritc.getRule({
"rule_id": ""
}, context)
Input
- input
object
- rule_id required
string
: Id of rule
- rule_id required
Output
- output
array
- items RuleFullResponse
updateRule
Update information about a specific rule
ritc.updateRule({
"rule_id": "",
"Rule Object": {}
}, context)
Input
- input
object
- rule_id required
string
: Id of user - Rule Object required Rule
- rule_id required
Output
- output RuleFullResponse
runRule
Run a rule
ritc.runRule({
"rule_id": ""
}, context)
Input
- input
object
- rule_id required
string
: Id of rule - initial_data
object
- rule_id required
Output
- output
object
listTriggers
Triggers in an app
ritc.listTriggers(null, context)
Input
This action has no parameters
Output
- output
array
- items TriggerShortResponse
addTrigger
Create a new trigger in an app
ritc.addTrigger({
"Trigger Object": {
"name": "",
"channelId": 0,
"functionId": ""
}
}, context)
Input
- input
object
- Trigger Object required Trigger54
Output
- output TriggerShortResponse
removeTrigger
Delete a trigger
ritc.removeTrigger({
"trigger_id": ""
}, context)
Input
- input
object
- trigger_id required
string
: Id of Trigger
- trigger_id required
Output
Output schema unknown
getTrigger
Get a trigger
ritc.getTrigger({
"trigger_id": ""
}, context)
Input
- input
object
- trigger_id required
string
: Id of Trigger
- trigger_id required
Output
- output
array
- items TriggerFullResponse
updateTrigger
Update a trigger
ritc.updateTrigger({
"trigger_id": "",
"Trigger Object": {
"name": "",
"channelId": 0,
"functionId": ""
}
}, context)
Input
- input
object
- trigger_id required
string
: Id of user - Trigger Object required Trigger54
- trigger_id required
Output
- output TriggerShortResponse
listAppUsers
Users
ritc.listAppUsers(null, context)
Input
This action has no parameters
Output
- output
array
- items AppUserResponse
addAppUser
Create a new App User
ritc.addAppUser({
"App User Object": {}
}, context)
Input
- input
object
- App User Object required AppUser
Output
- output AppUserResponse
listAdminUsers
Admin users
ritc.listAdminUsers(null, context)
Input
This action has no parameters
Output
- output
array
- items AdminUserResponse
addAdminUser
Create a new admin user
ritc.addAdminUser({
"Admin_User Object": {}
}, context)
Input
- input
object
- Admin_User Object required AdminUser
Output
- output AdminUserResponse
removeAdminUser
Remove an admin user
ritc.removeAdminUser({
"user_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of Admin_User
- user_id required
Output
Output schema unknown
getAdminUser
Get an admin user
ritc.getAdminUser({
"user_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of Admin_User
- user_id required
Output
- output
array
- items AdminUserResponse
updateAdminUser
Update information about an admin user
ritc.updateAdminUser({
"user_id": "",
"Admin_User Object": {}
}, context)
Input
- input
object
- user_id required
string
: Id of user - Admin_User Object required AdminUser
- user_id required
Output
- output AdminUserResponse
authenticateAppUserForChannel
Authenticate a user for a channel
ritc.authenticateAppUserForChannel({
"user_id": "",
"channel_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of User - channel_id required
string
: Id of Channel
- user_id required
Output
- output
array
- items AuthorizeUrlResponse
removeAppUser
Remove a user
ritc.removeAppUser({
"user_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of user
- user_id required
Output
Output schema unknown
getAppUser
Get an App User
ritc.getAppUser({
"user_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of App User
- user_id required
Output
- output
array
- items AppUserResponse
updateAppUser
Update information about an App User
ritc.updateAppUser({
"user_id": "",
"App User Object": {}
}, context)
Input
- input
object
- user_id required
string
: Id of user - App User Object required AppUser
- user_id required
Output
- output AppUserResponse
listAppUserChannels
Channels available to a User
ritc.listAppUserChannels({
"user_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of user
- user_id required
Output
- output
array
- items UserChannel
addAppUserToChannel
Assign a channel to a user
ritc.addAppUserToChannel({
"user_id": "",
"channel_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of user - channel_id required
string
- user_id required
Output
- output UserChannel
removeAppUserFromChannel
Remove a user channel assignment
ritc.removeAppUserFromChannel({
"user_id": "",
"channel_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of User - channel_id required
string
: Id of Channel
- user_id required
Output
Output schema unknown
getAppUserChannel
Get a user channel
ritc.getAppUserChannel({
"user_id": "",
"channel_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of User - channel_id required
string
: Id of Channel
- user_id required
Output
- output
array
- items UserChannel
listAppUserRules
Rules for a User
ritc.listAppUserRules({
"user_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of user
- user_id required
Output
- output
array
- items RuleShortResponse
removeAppUserFromRule
Remove a rule user
ritc.removeAppUserFromRule({
"user_id": "",
"rule_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of User - rule_id required
string
: Id of Rule
- user_id required
Output
Output schema unknown
getAppUserRule
Get a user
ritc.getAppUserRule({
"user_id": "",
"rule_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of User - rule_id required
string
: Id of Rule
- user_id required
Output
- output
array
- items RuleFullResponse
addAppUserToRule
Assign a user to a rule
ritc.addAppUserToRule({
"user_id": "",
"rule_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of User - rule_id required
string
: Id of Rule
- user_id required
Output
- output RuleShortResponse
runRuleForAppUser
Run rule for a user
ritc.runRuleForAppUser({
"user_id": "",
"rule_id": ""
}, context)
Input
- input
object
- user_id required
string
: Id of User - rule_id required
string
: Id of Rule
- user_id required
Output
- output
object
Definitions
Action
- Action
object
- channelId
string
- createdDate
string
: The date the rule was created - description
string
- functionId
string
- id
string
- modifiedDate
string
: The date the rule was modified - name
string
- status Status
- channelId
Action59
- Action59
object
- channelId required
integer
: Id of channel used by action - codes
object
: Object containing named Javascript code sets - desc
string
: Action description - functionId required
string
: Hash id of channel function used by action - name required
string
: Action name - parameters
object
: Object containing channel-defined action parameters
- channelId required
ActionFullResponse
- Action_Full_Response
object
- channelId
integer
- codes
object
- createdDate
string
: The date the action was created - description
string
: Action description - functionId
string
- id
integer
- modifiedDate
string
: The date the action was modified - name
string
: Action name - parameters
object
- status Status
- channelId
ActionShortResponse
- Action_Short_Response
object
- channelId
string
- createdDate
string
: The date the action was created - description
string
: Action description - functionId
string
- id
string
- modifiedDate
string
: The date the action was modified - name
string
: Action name - status Status
- channelId
AdminUser
- Admin_User
object
- email
string
: Admin User email address - password
string
: Admin User password - type Type41
- email
AdminUserResponse
- Admin_User_Response
object
- createdDate
string
: The date the admin user was created - email
string
: Admin User email address - id
integer
- modifiedDate
string
: The date the admin user was modified - name
string
: Admin User name - status Status
- createdDate
ApiType
- ApiType
string
(values: Internal, REST, SDK)
App
- App
object
- desc
string
: App description - name
string
: App name
- desc
AppChannelResponse
- App_Channel_Response
object
- channelId
integer
: Channel Id - createdDate
string
: The date the user was created - id
integer
- status Status
- userId
integer
: Id of App User assigned to Channel
- channelId
AppExternalCredentials
- App_External_Credentials
object
- authType AuthType
- channel_id
string
- credentials
object
- name
string
: App external credentials api name
AppExternalCredentialsResponse
- App_External_Credentials_Response
object
- authType AuthType
- channel_id
string
- credentials
object
- id
string
- name
string
: App external credentials api name
AppResponse
- App_Response
object
- apiKey
string
: App ApiKey - createdDate
string
: The date the app was created - description
string
: App description - id
string
- modifiedDate
string
: The date the app was modified - name
string
: App name - status Status
- apiKey
AppUser
- App_User
object
- config
object
: Object containing user-defined app user configuration - name
string
: Display name of App User - password
string
: App User password
- config
AppUserResponse
- App_User_Response
object
- createdDate
string
: The date the user was created - description
string
: Description of App User - id
string
: Id of App User - modifiedDate
string
: The date the user was modified - name
string
: Display name of App User - status Status
- createdDate
AuthType
- AuthType
string
(values: apikey, basic, none, oauth2)
AuthorizeUrlResponse
- Authorize_Url_Response
object
- url
string
- url
Channel
- Channel
object
- description
string
: Channel description - functions
array
- items Function
- id
string
: Id of channel - name
string
: Channel name - type
object
: Type of channel. Choices are 'public' or 'private'. Private channels are only viewable within an account, while public channels are viewable to everyone in the system
- description
ChannelResponse
- Channel_Response
object
- description
string
: Channel description - functions
array
- items Function5
- id
string
: Id of channel - name
string
: Channel name - type
object
: Type of channel. Choices are 'public' or 'private'. Private channels are only viewable within an account, while public channels are viewable to everyone
- description
Error
- Error
object
- code
integer
- fields
string
- message
string
- code
Function
Function5
- Function5
object
- description
string
: Function description - id
string
- name
string
: Function name - type Type
- description
Function7
- Function7
object
- apiType ApiType
- desc
string
: Function description - endpoint
string
: Function endpoint - httpMethod HttpMethod
- name
string
: Function name - requestParameters
array
- items RequestParameter
- responseFormat ResponseFormat
- type Type
FunctionResponse
- Function_Response
object
- apiType ApiType
- description
string
: Function description - endpoint
string
: Function endpoint - httpMethod HttpMethod
- id
string
- name
string
: Function name - requestParameters
array
- items RequestParameter
- responseFormat ResponseFormat
- type Type
HttpMethod
- HttpMethod
string
(values: DELETE, GET, PATCH, POST)
Org
- Org
object
- desc
string
: Org description - name required
string
: Org name - type
string
: Org type
- desc
OrgResponse
- Org_Response
object
- createdDate
string
: The date the org was created - id
string
- modifiedDate
string
: The date the org was modified - name
string
: Org name - plan Plan
- planCat
object
- status
string
: Org name - type
object
- createdDate
Parameter
- Parameter
object
- key required
string
- value required
string
- key required
Plan
- Plan
string
(values: free, basic)
RequestParameter
- RequestParameter
object
- description
string
- fieldType
string
- label
string
- name
string
- schema Schema
- description
ResponseFormat
- ResponseFormat
string
(values: Html, Json, Text, Xml)
Rule
- Rule
object
- actionIds
string
: Rule description - description
string
: Rule description - name
string
: Rule name - status Status
- triggerIds
string
: Rule description
- actionIds
RuleFullResponse
- Rule_Full_Response
object
RuleResults
- Rule_Results
object
- id
string
- name
string
: Name of rule results - type Type
- id
RuleShortResponse
- Rule_Short_Response
object
- createdDate
string
: The date the rule was created - description
string
: Rule description - id
integer
: Rule Id - modifiedDate
string
: The date the rule was modified - name
string
: Rule name - status Status
- createdDate
Schema
- Schema
object
- datatype
object
- default
string
- expose
object
- required
object
- style Style
- datatype
Status
- Status
string
(values: active, inactive)
Style
- Style
string
(values: postbody, query, template)
Trigger
- Trigger
object
- channelId
string
- createdDate
string
: The date the rule was created - description
string
- functionId
string
- id
string
- modifiedDate
string
: The date the rule was modified - name
string
- status Status
- channelId
Trigger54
- Trigger54
object
- channelId required
integer
: Id of channel used by trigger - codes
object
: Object containing named Javascript code sets - desc
string
: Trigger description - functionId required
string
: Hash id of channel function used by trigger - name required
string
: Trigger name - parameters
object
: Object containing channel-defined trigger parameters
- channelId required
TriggerFullResponse
- Trigger_Full_Response
object
- channelId
integer
- codes
object
- createdDate
string
: The date the trigger was created - description
string
: Trigger description - functionId
string
- id
integer
- modifiedDate
string
: The date the trigger was modified - name
string
: Trigger name - parameters
object
- status Status
- channelId
TriggerShortResponse
- Trigger_Short_Response
object
- channelId
integer
- createdDate
string
: The date the trigger was created - description
string
: Trigger description - functionId
string
- id
integer
- modifiedDate
string
: The date the trigger was modified - name
string
: Trigger name - status Status
- channelId
Type
- Type
string
(values: action, trigger)
Type41
- Type41
string
(values: admin, guest)
UserChannel
- User_Channel
object
- channelId
integer
- userId
integer
- channelId