Overview
Client-mode REST API connector for the QAD Redzone public API v2: OAuth token and locations plus runs and shifts and maintenance actions and data sheets and event polling.BASE_ADDRESS defaults to https://api.rz-ops.com. Topics use mes/redzone/<object>/<verb>.
| Event | Request | Source topic |
|---|---|---|
OAuthToken | POST /public/v2/oauth/token | mes/redzone/oauth/token/create |
LocationsList | GET /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations?limit={value.json.limit}&offset={value.json.offset} | mes/redzone/locations/list |
RunsList | GET /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/runs?limit={value.json.limit}&offset={value.json.offset}&started-after={value.json.startedAfter} | mes/redzone/runs/list |
RunGet | GET /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/runs/{value.json.runId} | mes/redzone/runs/get |
CurrentRunsAtLocation | GET /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations/{value.json.locationId}/runs/current?limit={value.json.limit}&offset={value.json.offset} | mes/redzone/locations/runs/current |
CurrentShiftAtLocation | GET /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations/{value.json.locationId}/shifts/current | mes/redzone/locations/shifts/current |
RunStart | POST /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/runs/start | mes/redzone/runs/start |
RunStop | POST /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/runs/{value.json.runId}/stop | mes/redzone/runs/stop |
ScheduledRunsList | GET /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations/{value.json.locationId}/scheduled-runs?limit={value.json.limit}&offset={value.json.offset} | mes/redzone/locations/scheduled-runs/list |
ScheduledRunCreate | POST /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations/{value.json.locationId}/scheduled-runs | mes/redzone/locations/scheduled-runs/create |
MaintenanceActionsList | GET /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/maintenance/actions?limit={value.json.limit}&offset={value.json.offset} | mes/redzone/maintenance/actions/list |
MaintenanceActionCommentCreate | POST /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/maintenance/actions/{value.json.maintenanceActionId}/comments | mes/redzone/maintenance/actions/comments/create |
CompletedDataSheetsList | GET /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/completed-data-sheets?limit={value.json.limit}&offset={value.json.offset} | mes/redzone/data-sheets/completed/list |
AssetsList | GET /public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/assets?limit={value.json.limit}&offset={value.json.offset} | mes/redzone/assets/list |
EventsList | GET /public/v2/organizations/{value.json.organizationId}/events?limit={value.json.limit}&visibility-timeout={value.json.visibilityTimeout} | mes/redzone/events/list |
Authentication
OAuth 2.0 client credentials. POST /public/v2/oauth/token with {“client_id”,“client_secret”} (JSON) returns an access token; send it as Authorization: Bearer {value.json.access_token}. Client ID and secret are issued by Redzone to the customer organization. Runs, shifts, data sheets and problem types need the enterprise-integration entitlement; maintenance actions also need reliability-integration (x-entitlements in the OpenAPI spec).Keep credentials in broker secrets and never retain topics that carry tokens or client secrets.
Notes
- The Redzone OpenAPI spec (REDZONE PUBLIC API 2.0.0) is public at https://api.rz-ops.com/public/v2/openapi.json; the Developer Hub UI itself is not public.
- API credentials (client_id / client_secret) are issued by Redzone to the customer. Nothing in the public material requires a QAD partner agreement, but endpoints tagged x-entitlements enterprise-integration (runs, shifts, data sheets, problem types) and reliability-integration (maintenance actions) need those Redzone add-ons on the customer contract.
- OAuthToken is the only event whose body carries a credential (client_id / client_secret in the token request), the same pattern as the Box OAuthToken event. Never retain mes/redzone/oauth/# and restrict it with ACLs.
- List endpoints require limit (1..100) and offset (>= 0) query values; pass them on every list payload.
Basic Syntax
DEFINE ROUTE QadRedzoneRestApi WITH TYPE REST_API
ADD REST_API_CONFIG
WITH BASE_ADDRESS "https://api.rz-ops.com"
WITH ENABLE_CLIENT "true"
WITH USE_SSL "true"
WITH REQUEST_TIMEOUT '60'
WITH DEFAULT_CONTENT_TYPE "application/json"
ADD EVENT OAuthToken
WITH SOURCE_TOPIC "mes/redzone/oauth/token/create"
WITH DESTINATION_TOPIC "mes/redzone/oauth/token/create/response"
WITH METHOD "POST"
WITH ENDPOINT "/public/v2/oauth/token"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Content-Type" "application/json"
WITH BODY "{value.json.body}"
ADD EVENT LocationsList
WITH SOURCE_TOPIC "mes/redzone/locations/list"
WITH DESTINATION_TOPIC "mes/redzone/locations/list/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations?limit={value.json.limit}&offset={value.json.offset}"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
ADD EVENT RunsList
WITH SOURCE_TOPIC "mes/redzone/runs/list"
WITH DESTINATION_TOPIC "mes/redzone/runs/list/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/runs?limit={value.json.limit}&offset={value.json.offset}&started-after={value.json.startedAfter}"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
ADD EVENT RunGet
WITH SOURCE_TOPIC "mes/redzone/runs/get"
WITH DESTINATION_TOPIC "mes/redzone/runs/get/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/runs/{value.json.runId}"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
ADD EVENT CurrentRunsAtLocation
WITH SOURCE_TOPIC "mes/redzone/locations/runs/current"
WITH DESTINATION_TOPIC "mes/redzone/locations/runs/current/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations/{value.json.locationId}/runs/current?limit={value.json.limit}&offset={value.json.offset}"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
ADD EVENT CurrentShiftAtLocation
WITH SOURCE_TOPIC "mes/redzone/locations/shifts/current"
WITH DESTINATION_TOPIC "mes/redzone/locations/shifts/current/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations/{value.json.locationId}/shifts/current"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
ADD EVENT RunStart
WITH SOURCE_TOPIC "mes/redzone/runs/start"
WITH DESTINATION_TOPIC "mes/redzone/runs/start/response"
WITH METHOD "POST"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/runs/start"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Content-Type" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
WITH BODY "{value.json.body}"
ADD EVENT RunStop
WITH SOURCE_TOPIC "mes/redzone/runs/stop"
WITH DESTINATION_TOPIC "mes/redzone/runs/stop/response"
WITH METHOD "POST"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/runs/{value.json.runId}/stop"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
WITH BODY ""
ADD EVENT ScheduledRunsList
WITH SOURCE_TOPIC "mes/redzone/locations/scheduled-runs/list"
WITH DESTINATION_TOPIC "mes/redzone/locations/scheduled-runs/list/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations/{value.json.locationId}/scheduled-runs?limit={value.json.limit}&offset={value.json.offset}"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
ADD EVENT ScheduledRunCreate
WITH SOURCE_TOPIC "mes/redzone/locations/scheduled-runs/create"
WITH DESTINATION_TOPIC "mes/redzone/locations/scheduled-runs/create/response"
WITH METHOD "POST"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/locations/{value.json.locationId}/scheduled-runs"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Content-Type" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
WITH BODY "{value.json.body}"
ADD EVENT MaintenanceActionsList
WITH SOURCE_TOPIC "mes/redzone/maintenance/actions/list"
WITH DESTINATION_TOPIC "mes/redzone/maintenance/actions/list/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/maintenance/actions?limit={value.json.limit}&offset={value.json.offset}"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
ADD EVENT MaintenanceActionCommentCreate
WITH SOURCE_TOPIC "mes/redzone/maintenance/actions/comments/create"
WITH DESTINATION_TOPIC "mes/redzone/maintenance/actions/comments/create/response"
WITH METHOD "POST"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/maintenance/actions/{value.json.maintenanceActionId}/comments"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Content-Type" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
WITH BODY "{value.json.body}"
ADD EVENT CompletedDataSheetsList
WITH SOURCE_TOPIC "mes/redzone/data-sheets/completed/list"
WITH DESTINATION_TOPIC "mes/redzone/data-sheets/completed/list/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/completed-data-sheets?limit={value.json.limit}&offset={value.json.offset}"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
ADD EVENT AssetsList
WITH SOURCE_TOPIC "mes/redzone/assets/list"
WITH DESTINATION_TOPIC "mes/redzone/assets/list/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/enterprises/{value.json.enterpriseId}/assets?limit={value.json.limit}&offset={value.json.offset}"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"
ADD EVENT EventsList
WITH SOURCE_TOPIC "mes/redzone/events/list"
WITH DESTINATION_TOPIC "mes/redzone/events/list/response"
WITH METHOD "GET"
WITH ENDPOINT "/public/v2/organizations/{value.json.organizationId}/events?limit={value.json.limit}&visibility-timeout={value.json.visibilityTimeout}"
WITH HEADERS
ADD "Accept" "application/json"
ADD "Authorization" "Bearer {value.json.access_token}"

