Ramtech React API version 1
https://api.ramtech.cloud/api
Welcome
This document details a subset of the Ramtech React API in order that you might craft your own system integrations.
The full API is very broad in scope, if you require something that isn't covered in this document please contact react@ramtechglobal.com, it might be that we can support you further.
For outbound API integrations, please consult the React Webhooks Guide instead.
/login
User Authentication
Provided with a username/password, returns OAuth tokens and user ID for use with subsequent API calls.
post /login
Body
Media type: application/json
Type: object
Properties- username: required(string)
- password: required(string)
Example:
{
username: "john",
password: "pa55word"
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": "abc-123-def",
"access_token": "fdfld9ft6jbdijvkalzn",
"refresh_token": "dpv9b7dhnn3gs6cvhxbb",
"master_company": {
"id": "123-abc-456",
"name": "Company Name"
}
}
/logout
User Logout
Explicitly end an authenticated session.
post /logout
Body
Media type: application/json
Type: object
Properties- device: required(string)
Browser or mobile platform
- refresh_token: required(string)
OAuth refresh token
- token: required(string)
Mobile/browser push notification token
Example:
{
device: "windows chrome",
refresh_token: "dpv9b7dhnn3gs6cvhxbb",
token: "device_specific_push_token"
}
HTTP status code 200
/token-refresh
Refresh Access Token
Provided a valid refresh token, returns a new access token, allowing session life to be extended.
post /token-refresh
Body
Media type: application/json
Type: object
Properties- refresh_token: required(string)
Example:
{
"refresh_token": "bdfifgjhmqwdfvthnlhnvgsfhgifbcapq"
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgO",
"expires_in": 180,
"refresh_expires_in": 1800,
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiw",
"token_type": "bearer",
"not-before-policy": 1588329665,
"session_state": "0f88d1df-b548-4f26-a40e-e8be83caf60d",
"scope": "profile email"
}
/event-trigger
Trigger Event
Generic endpoint for the raising of new events, such as fire alarms.
post /event-trigger
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
Body
Media type: application/json
Type: object
Properties- e_type_level: required(string)
Please provide as an empty string until further notice
- e_created_at: required(datetime-only)
UTC timestmp
- e_utc: required(datetime-only)
Poorly named field - please provide local timestamp.
- e_actual_utc: required(datetime-only)
UTC timestamp
- e_priority: required(integer)
Please provide value 1000 until further notice
- e_message: required(string)
Human readable message relating to the event
- e_attachments: required(string)
Base 64 encoded attachment contents
- e_latitude: required(number)
- e_longitude: required(number)
- s_id: required(string)
Site UUID
- e_type: required(integer)
Event type ID
- e_location: required(string)
Location UUID
Example:
{
"e_type_level": "",
"e_created_at": "09/10/2020 17:59:01",
"e_utc": "09/10/2020 17:59:01",
"e_actual_utc": "09/10/2020 16:59:01",
"e_priority": 1000,
"e_message": "",
"e_attachments": "",
"e_latitude": 52.9300000,
"e_longitude" -1.4400000,
"s_id": "ee4feca2-1379-4b85-a56e-8860a5b67266",
"e_type": 1000,
"e_location": "6d3f1c35-0615-4488-b6d0-775e058e7a94"
}
HTTP status code 200
/event-activity/{id}
Event Activity
Add or retreive activity details for an event.
Update an event
Get event activity
put /event-activity/{id}
Update an event
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: object
Properties- attachment: required(string)
Base 64 encoded attachment contents
- event_level_ids[]: required(object)
Please provide an empty array until further notice
- message: required(string)
Human readable text relating to the event
Example:
{
"attachment": "",
"event_level_ids": [""],
"message": "Photo of hazard"
}
HTTP status code 200
get /event-activity/{id}
Get event activity
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
URI Parameters
- id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"data":
{
"id":"123-abc-456",
"event_type":"Fire",
"location_name":"Town Hall",
"message":"",
"attachment_name":"",
"selected_event_level":[""],
"event_levels":[{"id":"e6b35465-7cec-49ab-8a74-290dc35ba74e","name":"Fire Sensor"},{"id":"90d90624-6a46-44a0-9669-d2f6ae215efb","name":"Dust Sensor"},{"id":"f62cc8f3-32cc-4bde-afb1-ea3986039158","name":"Interface Problem"},{"id":"0d8243d6-457d-44a1-bd73-7646f8cfb8be","name":"Link Problem"}],
"status_history":
[
{
"created_by":"React User2",
"created_at":"12\/10\/2020 15:15:21",
"status":1,
"comments":""
},
{
"created_by":"React User2",
"created_at":"12\/10\/2020 15:15:21",
"status":2,
"comments":""
}
],
"attachment":"",
"firebase_key":"abcde",
"end_status":0
}
}
HTTP status code 404
/end-event-activity/{id}
End Event
End an event, adding a closing comment.
put /end-event-activity/{id}
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: object
Properties- comments: required(string)
- e_ended_at: required(datetime-only)
UTC timestamp
- e_status: required(integer)
Event status ID, should be set to value 4
Example:
{
"comments": "False alarm",
"e_ended_at": "09/10/2020 16:59:01",
"e_status": 4
}
HTTP status code 200
/supported-versions
API Support Information
Provides information as to which API versions are currently supported.
get /supported-versions
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"data":
{
"Rc2-Api-Version":
{
"current": "1",
"min": "1",
"max": "1"
},
"Rc2-Mobile-Version":
{
"current": "1.4.1",
"min": "1.4.1",
"max": null
},
"Rc2-Mobile-Version-Ios":
{
"current": "1.4.1",
"min": "1.4.1",
"max": null
},
"Rc2-Mobile-Version-Android":
{
"current": "1.4.1",
"min": "1.4.1",
"max": null
}
}
}
/webhooks
Webhooks
Endpoint for configuring or querying a specific webhook (for use with outbound API integrations).
Create webhook
post /webhooks
Create webhook
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
Body
Media type: application/json
Type: object
Properties- company_id: required(string)
Company UUID
- name: required(string)
Webhook display name
- request_method: required(string)
HTTP method, e.g. POST
- auth_cert_id: required(string)
ID of previously configured SSL certificate, or empty string
- default_payload: required(integer)
Binary option of whether to include a set of default payload fields with each webhook send
- url: required(string)
Webhook target URL
- default_format: required(integer)
Use value 1 for JSON unless a custom format has been agreed
- custom_param_status: required(integer)
Binary option for including any custom parameters (below) in webhook payloads
- body_parameters[]: required(object)
Name/value pairs for custom body parameters.
- header_parameters[]: required(object)
Name/value pairs for custom header parameters.
Example:
{
"company_id": "123-abc-456",
"name": "My Webhook",
"request_method":"POST",
"auth_cert_id":"",
"default_payload":1,
"url":"https://my_webhook_api_address.com",
"default_format": 1,
"custom_param_status": 1,
"body_parameters":
[
{
"name": "body1",
"value": "b1"
}
],
"header_parameters":
[
{
"name": "header1",
"value": "h1"
}
]
}
HTTP status code 200
Get webhook
Update webhook
Delete webhook
get /webhooks/{id}
Get webhook
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
URI Parameters
- id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"data":
{
"id":"123-abc-456",
"name":"My Webhook",
"url":"https://my_webhook_api_address.com",
"request_method":"POST",
"auth_cert_id":"",
"default_payload":1,
"company":1,
"company_uuid":"123-abc-456",
"user_id":1,
"format":
{
"id":1,
"name":"JSON",
"method":"getOptions"
}
}
"parameters":
{
"body":
[
{
"rc2_webhooks_id":543,
"name":"body1",
"value":"b1"
}
],
"header":
[
{
"rc2_webhooks_id":543,
"name":"header1",
"value":"h1"
}
]
}
}
HTTP status code 404
put /webhooks/{id}
Update webhook
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: object
Properties- company_id: required(string)
Company UUID
- name: required(string)
Webhook display name
- request_method: required(string)
HTTP method, e.g. POST
- auth_cert_id: required(string)
ID of previously configured SSL certificate, or empty string
- default_payload: required(integer)
Binary option of whether to include a set of default payload fields with each webhook send
- url: required(string)
Webhook target URL
- default_format: required(integer)
Use value 1 for JSON unless a custom format has been agreed
- custom_param_status: required(integer)
Binary option for including any custom parameters (below) in webhook payloads
- body_parameters[]: required(object)
Name/value pairs for custom body parameters.
- header_parameters[]: required(object)
Name/value pairs for custom header parameters.
Example:
{
"company_id": "123-abc-456",
"name": "My Webhook",
"request_method":"POST",
"auth_cert_id":"",
"default_payload":1,
"url":"https://my_webhook_api_address.com",
"default_format": 1,
"custom_param_status": 1,
"body_parameters":
[
{
"name": "body1",
"value": "b1"
}
],
"header_parameters":
[
{
"name": "header1",
"value": "h1"
}
]
}
delete /webhooks/{id}
Delete webhook
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
/webhooks-list
List Webhooks
Returns a list of all currently configured webhooks.
get /webhooks-list
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"data":
[
{
"id":"abc-123-def",
"name":"My Webhook",
"url":"https://my_webhook_api_address.com",
"company":1,
"company_uuid":"abc-123-def",
"user_id":1,
"format":
{
"id":1,
"name":"JSON",
"method":"getOptions"
},
"hasWorkFlow":1
},
...
],
"role_id":2
}
HTTP status code 404
/event-types-all
List Event Types
Returns a list of all event types currently supported by React.
get /event-types-all
Ramtech Cloud supports OAuth 2.0 for authenticating API requests.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"data":
[
{
"id":"123-abc-456",
"code":1000,
"name":"Fire",
"icon":"fa-fire",
"icon_color":"#ce2029",
"is_mobile":"1",
"description":"Fire"
},
...
]
}